Basic Functions Flashcards
What function should I call to round up a number? What package do I need to load?
ceiling( )
No package needs to be loaded since this function is from base package.
How can I check the version of a package?
By calling function:
packageVersion(“tidyverse”)
How can I find the file path of a specific R package in my system?
system.file(package = “tidyverse”)
What function do I call to see a brief description of a package? How does the function do that?
packageDescription(“tidyverse”)
It parses the DESCRIPTION file of the package and returns it as an object of class “packageDescription”.
How can I search for all the available functions that start with “read” ?
apropos(“^read”)
How can I get the list of functions/objects within a specific package? What’s the type and class of the returned object?
ls(“package:readr”)
It returns a character vector with them names of the functions. Class and type are character.
How can I get the list of functions/objects within a specific package starting with a specific word?
ls(“package:readr”) %>%
str_subset(“^read_”)
What is a vignette and how do I use one?
Vignettes are optional suplemental documentation provided by packages that look more like Tutorials.
I can access a vignette of a package using function vignette provided by utils:
vignette(“readr”)
Qual função eu uso para declarar polinômios?
poly