knitr::opts_knit$set(root.dir = 'C:/2022/cogs')

Exploring RMarkdown Functionality

This activity shows the relationship between Age and Basal area, and age and Stocking and finally Age and mean top height.

iris

plots_df <- read.csv("ytgen.csv",stringsAsFactors=FALSE)
plots_df

Charts and Graphs

Scatterplot

This scatter plot shows the relationship between Age and Basal area.

ggplot(plots_df, aes(x = Age, y = BasalArea
))+
  geom_point()

This Scatter plot Plot shows the relationship between of Age vs mean top height

ggplot(plots_df, aes(x = Age, y = TopHeight

))+  geom_point()

This scatter plot shows the relationship between Age and Stocking.

ggplot(plots_df, aes(x = Age, y = Stocking

))+  geom_point()

Leaflet map of the area of interest

## Warning in OGRSpatialRef(dsn, layer, morphFromESRI = morphFromESRI, dumpSRS
## = dumpSRS, : Discarded datum New_Zealand_Geodetic_Datum_2000 in Proj4
## definition: +proj=tmerc +lat_0=0 +lon_0=173 +k=0.9996 +x_0=1600000 +y_0=10000000
## +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
fw_latlon <- spTransform(fw, CRS("+proj=longlat +datum=WGS84"))

mappoly <- leaflet() %>%
  addTiles() %>%
  setView( lng = 178.19, lat= -37.78, zoom = 11) %>% 
   addPolygons(data = fw_latlon)
 
mappoly