read_tsv
from the package readr
and assign it to an object called trees
:
trees <- read_tsv("TREE_SURVEYS.txt",
col_types = list(HEIGHT = col_double(),
AXIS_2 = col_double()))
$
to add a new column to the trees
data frame that is named canopy_area
and contains
the estimated canopy area calculated as the value in the AXIS_1
column
times the value in the AXIS_2
column.trees
data frame with just the SURVEY
, YEAR
, SITE
, and canopy_area
columns.canopy_area
on the x axis and HEIGHT
on the y
axis. Color the points by TREATMENT
and create a subplot per species using the function facet_wrap()
. This will plot the points for each variable in
the SPECIES
column in a separate subplot. Label the x axis “Canopy Area
(m)” and the y axis “Height (m)”. Make the point size 2.AXIS_1
and AXIS_2
that are over 20 and update the data frame. Then, remake the graph.