Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
r_symposium_open_science [2017/04/20 19:43] monsauce [In line code] |
r_symposium_open_science [2017/04/21 18:48] (current) monsauce [Open science resources] |
||
|---|---|---|---|
| Line 90: | Line 90: | ||
| *plain text | *plain text | ||
| - | ***bold** | + | * two asterisks on each side for **bold** |
| **italics* | **italics* | ||
| *# Header 1 | *# Header 1 | ||
| Line 140: | Line 140: | ||
| require(RCurl) | require(RCurl) | ||
| require(tidyr) | require(tidyr) | ||
| + | require(ggplot2) | ||
| doubs.URL <- getURL("https://raw.githubusercontent.com/Monsauce/QCBS-Open-Science-Workshop/master/doubsspe.csv") | doubs.URL <- getURL("https://raw.githubusercontent.com/Monsauce/QCBS-Open-Science-Workshop/master/doubsspe.csv") | ||
| doubs<-read.csv(text=doubs.URL) | doubs<-read.csv(text=doubs.URL) | ||
| - | #the data is in long form so let's convert it to wide | + | #the data is in wide form so let's convert it to long |
| - | doubs.wide<-gather(doubs, species, count, CHA:ANG) | + | doubs.long<-gather(doubs, species, count, CHA:ANG) |
| ``` | ``` | ||
| </code> | </code> | ||
| - | |||
| ====In line code==== | ====In line code==== | ||
| Line 153: | Line 153: | ||
| The data set had a total richness of `r length(unique(doubs.long$species))` | The data set had a total richness of `r length(unique(doubs.long$species))` | ||
| - | | + | |
| + | ====Plots in R markdown==== | ||
| + | The bestest part of R Markdown is not only can you run your analyses and combine them with text, but you can also make the plots for your manuscript so they automatically update when you change your data frame. There is some extra sytnax in the code chunks you need for plots, like plot dimensions and suppressing warnings and messages. Let's make a plot for the mean number | ||
| + | |||
| + | <code rsplus | display plot> | ||
| + | ```{r, fig.width=5, fig.height=6.5, echo=FALSE} | ||
| + | #note you can set the size parameters of the figure | ||
| + | Figure.1<-ggplot(doubs.long, aes(count))+geom_histogram()+facet_wrap(~X)+theme_minimal()+ | ||
| + | xlab("Number of individuals")+ylab("Number of species") | ||
| + | |||
| + | plot(Figure.1) | ||
| + | ``` | ||
| + | </code> | ||
| + | |||
| + | Now add a figure caption at the bottom of your code chunk. | ||
| + | |||
| + | R Markdown code (.Rmd) from the exercises can be found [[https://github.com/Monsauce/QCBS-Open-Science-Workshop|here]] | ||
| + | |||
| + | |||
| + | =====bioRxiv===== | ||
| + | Once your manuscript is ready. You can post it on a pre-print server like [[http://biorxiv.org/collection/ecology|bioRxiv]] so that your research is accessible to anyone, anywhere even if you are submitting the paper to a journal. | ||
| + | |||
| + | {{ ::biorxiv.png?300 |}} | ||
| + | |||
| + | =====Open science resources===== | ||
| + | There are many ways to engage in open science, even by simply making your data open, publishing open access or posting a pre-print you are affecting enormous positive consequences on the accessibility of science to other scientists and the general public. Imagine a world where the USSR and the USA collaborated to go to the moon, or labs working together, sharing data on the world's most pressing problems instead of competitng to get to the finish line first? Or a world where text books are free and available to anyone? Isn't that a world you want to create? | ||
| + | |||
| + | We've only scratched the surface on the open science practices. Mozilla (the people that make Firefox) is committed to making the web and science more open and they have compiled a number of resources to help you practice in the open. | ||
| + | |||
| + | *[[https://kirstiejane.github.io/OpenAdvice/|Mozilla Open Advice]] | ||
| + | *[[https://joeyklee.github.io/friendly-github-intro/|Mozilla GitHub intro]] | ||
| + | |||
| + | ====Meet other open scientists==== | ||
| + | Want to dive into open science!? | ||
| + | |||
| + | *[[https://www.scienceopen.com/|Science Open]]: A platform for open science research | ||
| + | *Join the [[http://www.ooocanada.ca/|OOO Canada Network]]! | ||
| + | *[[https://github.com/Open-Data-Science-at-SIO/RRROBOTS|Reporducibility workshop]] from fellow Mozilla Open leader Hao Ye | ||
