names(U1) [1] \"username\" \"review_count\" \"forum_posts\" \"age\" \"avg_interval\" [6] \"avg_sim\" \"class\"
So how do I cre
You can do this:
U1.RN <- U1[0,]
Along the lines of df[0,] you can also use a boolean mask which might make the code more readable:
df[0,]
df[FALSE,]
Using dplyr, there are a few good options:
dplyr
slice(U1, 0) filter(U1, FALSE) filter(U1, NA)
The slice approach is probably clearest.
slice