Difference between revisions of "File:Nadat.csv"
From Testiwiki
(uploaded a new version of "File:Nadat.csv": And again to UTF-8 (previous was ANSI)) |
(rcode for calculating diversity indices) |
||
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("f/f0/Nadat.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) | ||
+ | |||
+ | cat("Printing alpha diversities for transects.\n") | ||
+ | |||
+ | out <- diversity(amount = data$value, species = data$variable, transect = data$transect) | ||
+ | out | ||
+ | |||
+ | cat("Printing summary of diversity indices.\n") | ||
+ | out <- diversity.table(amount = data$value, species = data$variable, transect = data$transect) | ||
+ | out | ||
+ | </rcode> |
Revision as of 19:31, 28 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 | 18:19, 28 February 2012 | (27 KB) | Jouni (talk | contribs) | And again to UTF-8 (previous was ANSI) |
18:15, 28 February 2012 | (27 KB) | Jouni (talk | contribs) | Öökkösiä muunnettu sopivammiksi. | |
16:38, 28 February 2012 | (27 KB) | Kalle (talk | contribs) |
- You cannot overwrite this file.
File usage
There are no pages that link to this file.