Description Usage Arguments Author(s) References See Also Examples
Functions to prepare CONOP input files referred to as eventfile and loadfile. Function prep.weight allow the user to modify loadfile to include weights (to deal with outliers).
1 2 3 4 5 | prep.conop(Input, lofo, relaxed = FALSE, paired = TRUE)
prep.eventfile(Input, taxa_list)
prep.weight(Input, method = "badspecies", bad, weight.bad = "0.50",
inconsistent, weight.inconsistent = "0.50",
paclist, abmat, mbsf, pacman.sample.ratio = 0.1, weight.pacman = "0.50")
|
Input |
Object of class CONOPinput to modify. |
lofo |
Output of function |
relaxed |
If |
paired |
If |
taxa_list |
Vector of taxa names to be used in the analysis (for non-bioevents, it will need to be modified later manually or with other functions such as |
method |
|
bad |
For |
weight.bad |
Weight (from 0 to 1) for |
inconsistent |
For |
weight.inconsistent |
Weight (from 0 to 1) for |
paclist |
Output of function |
abmat |
For |
mbsf |
Vector of sample depth (same order as the samples in |
pacman.sample.ratio |
Ratio of anomalous occurrences per sample above which the function is desired to weight down the sample (numeric value from 0 to 1). |
weight.pacman |
Weight (from 0 to 1) for |
Johan Renaudie.
Lazarus et al. 2012. Pacman profiling: a simple procedure to identify stratigraphic outliers in high-density deep-sea microfossil data. Paleobiology, 38(1): 858-875. Sadler, 2007. CONOP version 7.43
CONOPinput-class and read.config.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #Here is an example routine to prepare files for CONOP9
example <- new("CONOPinput") #Create an empty container
setwd("~/path/to/datasets/") #Set the wd to the folder containing the datasets to process
sites <- c("Morgan Creek","Potomac",...) #vector of section names
files <- c("morgan.csv","potomac.csv",...) #vector of dataset filenames
sectfile <- data.frame(seq_along(sites), substring(sites,1,3), seq_along(sites), #Create the SectFile
as.character(sites), rep(1,length(sites)), stringsAsFactors=FALSE)
colnames(sectfile) <- 1:5
example@Sectfile <- sectfile
example@Config <- read.config("/path/to/conop9.cfg") #No function to create the config file yet, so need to write it on your own.
l <- list() #will contains the LOFO table of each section
tax <- c() #will contains the unique, sorted taxa names
for(i in seq_along(files)){
temp <- read.table(files[i], sep=",", header=TRUE, check.names=FALSE, row.names=1)
l[[i]] <- lofo(temp[,-1],temp[,1]) #Assuming the datasets are samples (rows) vs taxa (columns) with column 1 being the depth of the samples.
tax <- sort(unique(c(rownames(l[[i]]),tax)))
}
example <- prep.eventfile(example,tax)
example <- prep.conop(example,l,relaxed=FALSE,paired=TRUE)
write(example)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.