File:20linjaa.csv: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<rcode include="page:Diversity_index|name:answer|page:OpasnetBaseUtils|name:generic"> | |||
cat("Loading necessary packages and functions.\n") | |||
library(OpasnetBaseUtils) | |||
library(reshape) | |||
library(xtable) | |||
cat("Loading data and transforming it into the right format.\n") | |||
data <- opasnet.csv("1/12/20linjaa.csv") | |||
data <- melt(data, id.var = 1:4) | |||
names(data)[1] <- "transect" | |||
cat("Showing the first rows of data.\n") | |||
head(data) | |||
q.wiki <- c(0,1,2,3,4) | |||
out <- diversity(amount = data$value, species = data$variable, transect = data$transect) | |||
cat("Gamma diversities for transects.\n") | |||
print(xtable(out[[3]]), type = 'html', html.table.attributes = "class='sortable'") | |||
out <- diversity.table(amount = data$value, species = data$variable, transect = data$transect) | |||
cat("Summary of diversity indices.\n") | |||
print(xtable(out), type = 'html', html.table.attributes = "class='sortable'") | |||
</rcode> | |||
Latest revision as of 17:01, 29 February 2012
File history
Click on a date/time to view the file as it appeared at that time.
| Date/Time | Dimensions | User | Comment | |
|---|---|---|---|---|
| current | 16:40, 29 February 2012 | (1 KB) | Kalle (talk | contribs) |
You cannot overwrite this file.
File usage
There are no pages that use this file.