I have an integer as a column that I would like to split into multiple, seperate integers
Creating a list of dataframes using split()
doesn't work for my later purposes
df <- as.data.frame(runif(n = 10000, min = 1, max = 10))
where split()
creates a list of dataframe which I can't use for further purposes, where I need a separate integer as "Values"
map.split <- split(df, (as.numeric(rownames(df)) - 1) %/% 250) # this is not the trick
My goal is to split the column into different integer (not saved under the Global Environment "Data", but "Values")
This would be the slow way:
VecList1 <- df[1:250,]
VecList2 <- df[251:500,]
with
str(VecList1)
Int [1:250] 1 1 10 5 3 ....
Any advice welcome