forked from yh09/casb_birdProject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
project_code.Rmd
26 lines (17 loc) · 1.16 KB
/
project_code.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
title: "R Notebook"
output: html_notebook
---
This is an [R Markdown](http:https://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the *Run* button within the chunk or by placing your cursor inside it and pressing *Cmd+Shift+Enter*.
```{r}
#Recommend opening files as an object
#Code if you want to download the fire data
temp <- tempfile()
download.file("https://firms.modaps.eosdis.nasa.gov/data/download/DL_FIRE_J1V-C2_251815.zip",temp,mode = "wb")
unzip(temp, "fire_nrt_J1V-C2_251815.csv")
fireData<- read.table("fire_nrt_J1V-C2_251815.csv", sep=",", header=T)
```
Add a new chunk by clicking the *Insert Chunk* button on the toolbar or by pressing *Cmd+Option+I*.
When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the *Preview* button or press *Cmd+Shift+K* to preview the HTML file).
The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike *Knit*, *Preview* does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.