Difference between revisions of "File:20linjaa.csv"

From Testiwiki
Jump to: navigation, search
 
 
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

+ Show code

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeDimensionsUserComment
current16:40, 29 February 2012 (1 KB)Kalle (talk | contribs)
  • You cannot overwrite this file.

There are no pages that link to this file.