What will be the output of the following R code?
> rpois(10, 1)
> rpois(10, 1)
A. [1] 7 0 1 1 2 1 1 4 1 2
B. [1] 0 8 1 1 2 1 1 4 1 2
C. [1] 0 0 1 1 2 1 1 4 1 2
D. [1] 0 0 0 0 0 0 0 1 4 1 2
Answer: Option C
> rpois(10, 1)
A. [1] 7 0 1 1 2 1 1 4 1 2
B. [1] 0 8 1 1 2 1 1 4 1 2
C. [1] 0 0 1 1 2 1 1 4 1 2
D. [1] 0 0 0 0 0 0 0 1 4 1 2
Answer: Option C
In dplyr, what function is used to select specific columns from a data frame?
A. select_cols()
B. choose_cols()
C. select()
D. pick()
How do you filter rows in a dplyr data frame based on a specific condition using filter()?
A. filter_rows()
B. row_filter()
C. filter_conditions()
D. filter()
In dplyr, what does the arrange() function do?
A. Sorts the data frame in ascending order
B. Arranges the columns in a specified order
C. Orders the rows based on a specific column
D. Sorts the data frame in descending order
What function is used to create a new variable in a dplyr data frame based on existing variables?
A. create_var()
B. mutate()
C. new_variable()
D. add_column()
Join The Discussion