Beginner problem with variables number

Hi
I'm struggling with Rstudio but I'm a total beginner so it's probably really easy to solve. So easy that I can't find it explained on internet!!

I do this:

dframe1 <- read.csv(file.choose())

summary(dframe1)
names(dframe1)
str(dframe1)

my file is correct, I can see it but R says 200 observations of 1 variable despite there is 12 columns in my file and I was expecting 12 variables
How can I make it work?

Thank you!!

Are you sure that your file has comma separated values? maybe it has another format, please paste a few lines from the file to take a look into its structure.

summary(dframe1)
Individual.Size.Territory.Coral.Algae.Attack.Visitor.Diet.Farming.Exploring..Defending.Other
30;5;>1m;10;10;0;Abudefduf;Omnivore;60;94;9;17 : 5
44;5;<1m;0;30;0;Abudefduf;Omnivore;39;94;0;47 : 5
30;5;>1m;10;10;1;Pomacentrus;Algivore;60;94;9;17 : 4

Like this? Thank you for your reply!

It seems like your values are separeted by ";" instead of ","
Try reading your file with this

dframe1 <- read.csv(file.choose(), sep = ";")
1 Like

Oh my god you did it!! Thank you, I spent like 4 hours trying everything!!

Your welcome!

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.