Description Usage Arguments Details Author(s) See Also Examples
View source: R/findFirstLast.R
This function can be used to find the first or the last occurence of each unique value in a column.
1 | findFirstLast(myDF, findFirst = TRUE)
|
myDF |
a data.frame or a matrix. |
findFirst |
a logical variable indicating the first or the last occurence. |
By default, it finds the first occurence (i.e. findFirst = TRUE). If instead, we want to find the last, we must set findFirst = FALSE.
Artemis Toumazi <artemis.toumazi@gmail.com>, Sarah Zohar <sarah.zohar@inserm.fr>, Anand N. Vidyashankar <avidyash@gmu.edu>, Jie Xu <jxu13@gmu.edu> and Moreno Ursino <moreno.ursino@inserm.fr>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ################################################################
### Give a toxicity data for each simulation and each trial. ###
################################################################
### Using a toxicity data for each simulation and each trial including in the dfmeta package.
data("Toxdata")
dim(Toxdata)
colnames(Toxdata)
## NOTE: The toxicity dataset must have the same structure as below. ##
## Check it before running the VarWT function! ##
str(Toxdata)
analyf0 <- Toxdata[order(Toxdata$simulation), ] # sort the imported data by simulation.
## Using the function findFirstLast to find when starts the first trial. ##
first.trial = findFirstLast(analyf0)$Trial
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.