Description Usage Arguments Value Examples
View source: R/Cardinal direction.R
This function inserts a new variable "cardinal.dir" into the dataframe passed to it..
1 | insert_cardinal_dir(data, dir_col, abbr = TRUE)
|
data |
a dataframe containing the data. |
dir_col |
direction column to convert to cardinal factor. |
abbr |
TRUE/FALSE should the results be abbreviated (N versus North) |
the original dataframe with the cardinal variable included as a factor
1 2 3 4 5 | insert_cardinal_dir(waves, dir_deg)
#use with dplyr
library(dplyr)
waves %>% insert_cardinal_dir(waves, dir_deg)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.