Things you’ll need to download:
Logs research activities in your online notebook template found here.
Common code you’ll need to word process in (R)markdown
To embed a link, all you need is the URL, implemented in the following way:
[hyperlinked words](URL)
To embed an image, you’ll need a URL of the image, implemented similarly as above:
To get a URL in (R)markdown:
- go to your github repository and click “Issues”
- Click “New”
- Include a title (Pictures); click and drag any image you’d like into the comment section
- Click “Submit New Issue”
- You will see the image, right click it and copy the URL.
- go to your github repository and click “Issues”
To include a table, it is best if you format it first as a csv(comma separated values). (Note, if on a mac, make sure the file type is unicode and unix). With the knitr package, you can generate tables easily from the csv. Here is an example:
Grab a dataset real fast (in R)
#packages for reading in data
library(data.table)
#grab dataset online
dat<-fread("https://raw.githubusercontent.com/adnguyen/HelmsCahan_CBP-partA_2016/master/Script_Analyses/Sampling_sites_table.csv")
#making a table
knitr::kable(dat[1:3])
n | Locale | State | Site ID | Longitude | Latitude | Tmax |
---|---|---|---|---|---|---|
1 | Notchview | MA | NO | -73.01277 | 42.49833 | 24.8 |
2 | Smokey Mountains | TN | GP | -83.49340 | 35.63650 | 25.0 |
3 | Molly Bog | VT | MB | -72.64000 | 44.50000 | 25.3 |