0

I have presence only data for 33 mammal species in 4 area types: Sacred forest, non-sacred forest, farming field and savanna. I am a R-beginner and have some issues with reading my data.

So my data set has 5 columns (species, Sacred forest, non-sacred forest, farming field and savanna). The species column has 33 mammal names and the other four colomns have a 0 (not present), 1(present).

I would like to do a simple ANOVA analysis, but I don't know how to properly read this data into R. I work with Rstudio.

How can Rstudio read it in the proper way?

Anne Wolma
  • 11
  • 1
  • 2
    Welcome to StackOverflow. In order to ask a better question please read [How to ask a good question](https://stackoverflow.com/help/how-to-ask) and [Minimal, Complete, and Verifiable Example](https://stackoverflow.com/help/mcve) and [How to make a great R reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – Rui Barradas Sep 17 '18 at 15:44
  • When you say "binary" do you mean the that the columns are just 0 and 1? (To us, "binary" would normally mean "not encoded as a text file", i.e. `file(..., "rb")`.) Do you have any more details of the format your file is in? – Rup Sep 17 '18 at 15:45
  • 1
    To read data in see `help("read.table")`. Also, what do you mean by *"not as numerical data"*? – Rui Barradas Sep 17 '18 at 15:45
  • @Rup probably yes, this type of data is usually in text files with 0/1 meaning absent/present. – Rui Barradas Sep 17 '18 at 15:47
  • @Rup Oh okay, yes I meant 0-1 values – Anne Wolma Sep 17 '18 at 15:57
  • 1
    I have it in excel, but I am able to change that to csv etc. It is just that if I say 'import excel' in Rstudio, you have to click on the name of the column and choose 'numeric / character / date'. I assumed that if I would say 'numeric' it would not represent the data for what it is; present/absent. – Anne Wolma Sep 17 '18 at 15:59
  • You would choose `numeric`. You can use those as you choose, 0/1 can be used as a logical (F/T), numeric counts, or presence absence depending on how you analyze the data. – Anonymous coward Sep 17 '18 at 16:50

0 Answers0