interpolate | R Documentation |
This function finds NA values and interpolates using averaging values of nearby genus and species
interpolate(df, taxa=c('genus','family'), clmns=1:length(df))
df |
a data frame |
taxa |
a vector of taxonomic ranks (corresonding to columns) to assist in guiding the interpolating |
clmns |
the names of the columns to interpolate over |
a modified data frame without missing values in the columns specified
path <- system.file("extdata","primate-example.data.csv", package="mmodely")
gs.tab <- read.csv(path, row.names=1)
clmns <- match(c('mass.Kg','DPL.km'),names(gs.tab))
df.2 <- interpolate(df=gs.tab, taxa='genus', clmns=clmns)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.