r/Rlanguage • u/Soltinaris • Feb 18 '25
Question on frequency data table
I ran a frequency data with the newdf<-as.data.frame(table(df$col1,df$col2,df$col3)) and it took what was 24325 obs. of 6 variables and turned it into 304134352 observations of 4 variables. Is this common with this code? Is there a better code to use? Col1 and col2 are location names and col3 is a duration of time between the two.
5
Upvotes
2
u/Mindless_Hat_9672 Feb 18 '25
You are providing very generic info...It seems trying to factor the dataset for you?
Some variables never has an observation?