Answers for "create a r dataframe"

R
1

create dataframe or table in r

#R data frame is made up of two or more vectors
names <- c("Mark", "Luke", "John", "Matt")
age <- c(25, 30, 35, 40)

people <- data.frame(names, age)
Posted by: Guest on September-22-2021
0

creating a df in "R"

tibble(
  x = 1:5, 
  y = 1, 
  z = x ^ 2 + y
)
#> # A tibble: 5 x 3
#>       x     y     z
#>   <int> <dbl> <dbl>
#> 1     1     1     2
#> 2     2     1     5
#> 3     3     1    10
#> 4     4     1    17
#> 5     5     1    26Copy
Posted by: Guest on June-11-2021

Browse Popular Code Answers by Language