Package 'IBRtools'

Title: Integrating Biomarker-Based Assessments and Radarchart Creation
Description: Several functions to calculate two important indexes (IBR (Integrated Biomarker Response) and IBRv2 (Integrated Biological Response version 2)), it also calculates the standardized values for enzyme activity for each index, and it has a graphing function to perform radarplots that make great data visualization for this type of data. Beliaeff, B., & Burgeot, T. (2002). <https://pubmed.ncbi.nlm.nih.gov/12069320/>. Sanchez, W., Burgeot, T., & Porcher, J.-M. (2013).<doi:10.1007/s11356-012-1359-1>. Devin, S., Burgeot, T., Giambérini, L., Minguez, L., & Pain-Devin, S. (2014). <doi:10.1007/s11356-013-2169-9>. Minato N. (2022). <https://minato.sip21c.org/msb/>.
Authors: Anna Carolina Resende [aut, cre] , Diego Mauro Carneiro Pereira [aut]
Maintainer: Anna Carolina Resende <[email protected]>
License: GPL-3
Version: 0.1.3
Built: 2024-11-06 03:11:21 UTC
Source: https://github.com/ecologicaltools/ibrtools

Help Index


Biomarkers activity values with different treatments

Description

This data set gives level or activity of 28 biomarkers, generated as simulated values.

Usage

data("enzact")

Format

A data frame with 28 observations on the following 8 variables.

treatment

a character vector

biomarker1

a numeric vector

biomarker2

a numeric vector

biomarker3

a numeric vector

biomarker4

a numeric vector

biomarker5

a numeric vector

Examples

data(enzact)

Coefficient values for each biomarker within different treatments

Description

This data set gives coefficient values for each biomarker to be used for IBR index (functions ibr_index and ibr_std). Values were randomly assigned.

Usage

data("enzact_coef")

Format

A data frame with 3 observations on the following 8 variables.

treatment

a character vector

biomarker1

a numeric vector

biomarker2

a numeric vector

biomarker3

a numeric vector

biomarker4

a numeric vector

biomarker5

a numeric vector

Examples

data(enzact_coef)
## maybe str(enzact_coef) ; plot(enzact_coef) ...

Biomarkers activity values with different treatments

Description

This data set gives level or activity of 38 biomarkers, generated as simulated values.

Usage

data("enzact2")

Format

A data frame with 38 observations on the following 6 variables.

sites

a character vector

biomarker1

a numeric vector

biomarker2

a numeric vector

biomarker3

a numeric vector

biomarker4

a numeric vector

biomarker5

a numeric vector

Examples

data(enzact2)
## maybe str(enzact2) ; plot(enzact2) ...

IBR Radarchart

Description

Plots the IBR standardized values for the enzymes to be compared with one another.

Usage

ibr_chart(
  df,
  axistype,
  pcol,
  pfcol,
  plwd,
  plty,
  cglcol,
  cglty,
  axislabcol,
  cglwd,
  caxislabels,
  seg,
  legend = NULL,
  ...
)

Arguments

df

A data.frame that resulted from the function ibr_std

axistype

The type of axes, specified by any of 0:5. 0 means no axis label. 1 means center axis label only. 2 means around-the-chart label only. 3 means both center and around-the-chart (peripheral) labels. 4 is *.** format of 1, 5 is *.** format of 3. Default is 0.

pcol

A vector of color codes for plot data: Default 1:8, which are repeatedly used.

pfcol

A vector of color codes for filling polygons: Default NA, which is repeatedly usd.

plwd

A vector of line widths for plot data: Default 1, which is repeatedly used.

plty

A vector of line types for plot data: Default 1:6, which are repeatedly used.

cglcol

Line color for radar grids: Default "navy"

cglty

Line type for radar grids: Default 3, which means dotted line.

axislabcol

Color of axis label and numbers: Default "blue"

cglwd

Line width for radar grids: Default 1, which means thinnest line.

caxislabels

Character vector for center axis labels, overwriting values specified in axistype option. If NULL, the values specified by axistype option are used. Default is NULL.

seg

The number of segments for each axis (default 4).

legend

Default is NULL, when any other value is given the legend will not appear and you can manually create your own using the legend() function right after building your radarchart

...

Miscellaneous arguments to be given for plot.default().

Value

Returns a radarchart with the standardized values of biomarkers

Tips

If you have any problems with the axis labels, you can do it manually by changing two params in the function: seg and caxislabel. The caxislabel param has to be a sequence, such as: caxislabels = seq(-1,1.9,0.34), each number is: seq(minvalue, maxvalue, breakvalue)

The seg param can be any number starting from 3, you can change it with: seg = 6.

If you still can't solve the problem, try rounding your standardized values with the function round()

References

Beliaeff, B., & Burgeot, T. (2002). Integrated biomarker response: A useful tool for ecological risk assessment. Environmental Toxicology and Chemistry, 21(6), 1316–1322.

Devin, S., Burgeot, T., Giambérini, L., Minguez, L., & Pain-Devin, S. (2014). The integrated biomarker response revisited: Optimization to avoid misuse. Environmental Science and Pollution Research, 21(4), 2448–2454. https://doi.org/10.1007/s11356-013-2169-9

Minato Nakazawa (2022). fmsb: Functions for Medical Statistics Book with some Demographic Data. R package version 0.7.0. https://CRAN.R-project.org/package=fmsb

Examples

data(enzact)

ibr_std(enzact) -> enzact_chart

ibr_chart(enzact_chart, legend = FALSE)

colorvector<- c(rgb(1,0.4,0.8,0.7), rgb(0,0.6,0.6,0.7) , rgb(0.4,0.4,0.6,0.7), rgb(0,0.4,0.4,0.7))

legend(x=1.2, y=-0.3, enzact_chart$group, bty = "n", pch=20, col=colorvector, cex=0.9, pt.cex=2)

IBR (Integrated Biomarker Response) index

Description

This function calculates de Integrated Biomarker Response index proposed by Beliaeff and Burgeot, 2002 and revisited by Devin et al. 2014.

Usage

ibr_index(df)

Arguments

df

The data frame output of the function ibr_std of this package.

Details

Gives a list of two dataframes, the first data frame is IBR_total and it can be used for statistical analysis (such as ANOVA, t-test) to verify the differences between each level of the independent variable(s). The second data frame is IBR_mean_sd, it gives the mean values and standard deviation for each independent variable, which is usually presented next to a radarplot.

Value

Returns a list with two dataframes, the IBR index value per treatment and its mean and standard deviation

Warnings

You must have at least 3 biomarkers and a maximum of 9 biomarkers to perform this index correctly.

References

Beliaeff, B., & Burgeot, T. (2002). Integrated biomarker response: A useful tool for ecological risk assessment. Environmental Toxicology and Chemistry, 21(6), 1316–1322.

Devin, S., Burgeot, T., Giambérini, L., Minguez, L., & Pain-Devin, S. (2014). The integrated biomarker response revisited: Optimization to avoid misuse. Environmental Science and Pollution Research, 21(4), 2448–2454. https://doi.org/10.1007/s11356-013-2169-9

Examples

data(enzact)

outstd<- ibr_std(enzact)

ibr_index(outstd)

Standardized values for IBR (Integrated Biomarker Response) index

Description

Returns a data frame with standardized values of IBR useful to do a radar chart. This data is fit for our function ibr_chart() from this package that creates this type of plot.

Usage

ibr_std(df, z)

Arguments

df

A data frame containing values the enzymes activities with at least two levels of one independent variable.

z

A data frame with the Z coefficient for each enzyme at each level. If not provided, all z values will be 1.

Value

Returns a data frame with standardized values for each biomarker per treatment

Warnings

You must have at least 3 biomarkers and a maximum of 9 biomarkers to perform this index correctly.

References

Beliaeff, B., & Burgeot, T. (2002). Integrated biomarker response: A useful tool for ecological risk assessment. Environmental Toxicology and Chemistry, 21(6), 1316–1322.

Devin, S., Burgeot, T., Giambérini, L., Minguez, L., & Pain-Devin, S. (2014). The integrated biomarker response revisited: Optimization to avoid misuse. Environmental Science and Pollution Research, 21(4), 2448–2454. https://doi.org/10.1007/s11356-013-2169-9

Examples

data(enzact)
ibr_std(enzact, enzact_coef)

'IBRtools': Integrating Biomarker-Based Assessments and Radarchart Creation

Description

Several functions to calculate two important indexes (IBR (Integrated Biomarker Response) and IBRv2 (Integrated Biological Response version 2)), it also calculates the standardized values for enzyme activity for each index, and it has a graphing function to perform radarplots that make great data visualization for this type of data.

Details

It comes with 3 example datasets: enzact, enzact_coef and enzact2

You can use them to practice or to see how the functions work so you can apply in your own datasets!

To load them, just use the command: data(nameofdataset)

IBRtools functions

There are 6 functions in this package, 3 for each index.

IBR: ibr_index, ibr_std, ibr_chart

IBRv2: ibrv2_index, ibrv2_bdi, ibrv2_chart

Authors

Author, Maintainer: Anna Carolina Resende

[email protected]

https://orcid.org/0000-0003-0909-1255

Author: Diego Mauro Carneiro Pereira

[email protected]

https://orcid.org/0000-0003-1554-3684

References

Beliaeff, B., & Burgeot, T. (2002). Integrated biomarker response: A useful tool for ecological risk assessment. Environmental Toxicology and Chemistry, 21(6), 1316–1322.

Devin, S., Burgeot, T., Giambérini, L., Minguez, L., & Pain-Devin, S. (2014). The integrated biomarker response revisited: Optimization to avoid misuse. Environmental Science and Pollution Research, 21(4), 2448–2454. https://doi.org/10.1007/s11356-013-2169-9

Sanchez, W., Burgeot, T., & Porcher, J.-M. (2013). A novel “Integrated Biomarker Response” calculation based on reference deviation concept. Environmental Science and Pollution Research, 20(5), 2721–2725. https://doi.org/10.1007/s11356-012-1359-1


Standardized values for IBRv2 (Integrated Biological Responses version 2)

Description

This function calculates de standardized values for IBRv2 index proposed by Sanchez et al. 2013.

Usage

ibrv2_bdi(df)

Arguments

df

A data frame containing values the enzymes activities with a reference value on the first rows.

Details

Gives a dataframe with the standardized values for each area/treatment in your input data to be used to create the radarchart with the function ibrv2_chart from this same package.

Value

Returns a dataframe with standardized IBRv2 values for each biomarker in comparison to reference treatment

Warnings

You must have at least 3 biomarkers and a maximum of 15 biomarkers to perform this index correctly.

If you have more than one independent variable, it is necessary to separate the data.frame in subsets so there's only one reference value for each level.

References

Sanchez, W., Burgeot, T., & Porcher, J.-M. (2013). A novel “Integrated Biomarker Response” calculation based on reference deviation concept. Environmental Science and Pollution Research, 20(5), 2721–2725. https://doi.org/10.1007/s11356-012-1359-1

Examples

data(enzact2)

ibrv2_bdi(enzact2)

IBRv2 Radarchart

Description

Plots the IBRv2 standardized values for the enzymes to be compared with one another.

Usage

ibrv2_chart(
  df,
  axistype,
  pcol,
  pfcol,
  plwd,
  plty,
  cglcol,
  cglty,
  axislabcol,
  cglwd,
  caxislabels,
  seg,
  legend = NULL,
  ...
)

Arguments

df

A data.frame that resulted from the function ibrv2_std

axistype

The type of axes, specified by any of 0:5. 0 means no axis label. 1 means center axis label only. 2 means around-the-chart label only. 3 means both center and around-the-chart (peripheral) labels. 4 is *.** format of 1, 5 is *.** format of 3. Default is 0.

pcol

A vector of color codes for plot data: Default 1:8, which are repeatedly used.

pfcol

A vector of color codes for filling polygons: Default NA, which is repeatedly usd.

plwd

A vector of line widths for plot data: Default 1, which is repeatedly used.

plty

A vector of line types for plot data: Default 1:6, which are repeatedly used.

cglcol

Line color for radar grids: Default "navy"

cglty

Line type for radar grids: Default 3, which means dotted line.

axislabcol

Color of axis label and numbers: Default "blue"

cglwd

Line width for radar grids: Default 1, which means thinnest line.

caxislabels

Character vector for center axis labels, overwriting values specified in axistype option. If NULL, the values specified by axistype option are used. Default is NULL.

seg

The number of segments for each axis (default 4).

legend

Default is NULL, when any other value is given the legend will not appear and you can manually create your own using the legend() function right after building your radarchart

...

Miscellaneous arguments to be given for plot.default().

Value

Returns a radarchart with the standardized values of biomarkers in comparison to reference treatment

Tips

For this index chart, it is necessary to plot each area/treatment with the reference value separately, therefore, make sure you subset the data.frame and perform this function for each subset.

Also, you will find that the axis values are not written automatically, we suggest that our users do it manually because we couldn't yet provide an automated way to plot the zero in the correct position on the radarchart. This will be revised for next versions of this package. This can be done by changing values for seg, axistype = 1, and caxislabels.

Check the examples for further insight.

References

Sanchez, W., Burgeot, T., & Porcher, J.-M. (2013). A novel “Integrated Biomarker Response” calculation based on reference deviation concept. Environmental Science and Pollution Research, 20(5), 2721–2725. https://doi.org/10.1007/s11356-012-1359-1

Minato Nakazawa (2022). fmsb: Functions for Medical Statistics Book with some Demographic Data. R package version 0.7.0. https://CRAN.R-project.org/package=fmsb

Examples

data(enzact2)

ibrv2_bdi(enzact2) -> enzact2_std

# subsetting to compare one area with the reference value

enzact2_std[c(1,2),] -> sub1_enzact2_std

ibrv2_chart(sub1_enzact2_std)

ibrv2_chart(sub1_enzact2_std, seg =8, caxislabels = seq(-1,1.9,0.34), axistype = 1)

IBRv2 (Integrated Biological Responses version 2)

Description

This function calculates de IBRv2 index proposed by Sanchez et al. 2013.

Usage

ibrv2_index(df)

Arguments

df

A data frame containing values the enzymes activities with a reference value on the first rows.

Details

Returns a dataframe with the IBRv2 values for each area/treatment in your input data.

Please cite this package when you use it!

Value

Returns a dataframe with IBRv2 values in comparison to reference treatment

Warnings

You must have at least 3 biomarkers and a maximum of 15 biomarkers to perform this index correctly.

If you have more than one independent variable, it is necessary to separate the data.frame in subsets so there's only one reference value for each level.

References

Sanchez, W., Burgeot, T., & Porcher, J.-M. (2013). A novel “Integrated Biomarker Response” calculation based on reference deviation concept. Environmental Science and Pollution Research, 20(5), 2721–2725. https://doi.org/10.1007/s11356-012-1359-1

Examples

data(enzact2)

ibrv2_index(enzact2)