October 7, 2014 This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com. When you click the Knit button a document will be generated that includes both content as well as the output of any embedded …
Category Archives: rclab
floating forests
I stumble with this great effort to better understand the spatial and temporal dynamics of giant kelp forest in the world. Jarett Brynes and Zooniverse put together this citizen science effort to gather kelp forest data from satellite images. Check it out
Merge example
This is an example of how to use the function “Merge” in R. Create a data frame 1: df1 = data.frame(id=c(1:6),Product=c(rep(“Toaster”,3),rep(“Radio”,3))) Create a second data frame: df2 = data.frame(id=c(2,4,6),State=c(rep(“Alabama”,2),rep(“Ohio”,1))) Now, merge both data frames: both<-merge(df1, df2) Another way to do it: both<-merge(df1, df2, all.x=TRUE) Yet another way: both<-merge(df1, df2, all=FALSE)