0

I’m new in R and try to use it for the GCA/SCA analysis using North Carolina design 2 under agricolae (function: Carolina). I created a small dataset, named as ncd2 and used read to upload. After that I used head(ncd2) to check and everything looked fine. However, if I use data(ncd2), it gives me the following error message Warning message: In data(ncd2) : data set ‘ncd2’ not found Because of it, I can’t use carolina2 for my analysis. Any help? Thanks. Mack

MS2018
  • 1
  • 2
    Why are you trying to call `data()`. That's not necessary at all if you are using your own data. You only call `data()` if you want to load data from a package. What do you think you are unable to do with `ncd2` without calling `data()`? – MrFlick Jul 24 '18 at 18:39
  • A command of the form `f()`, it is a function call. Read the documentation for the function like `?f` (in this case `?data`). – Frank Jul 24 '18 at 19:05
  • Hi, Mr. Flick, thank you for your response. When I ran carolina2, it gave me an error message, saying no data. If I use ls(), ncd2 is there. That's why I used data() to make sure. Any idea what I should do? Thanks. – MS2018 Jul 24 '18 at 19:45
  • Well `carolina2` and `ncd2` seem to be two different names. Where does `carolina2` come from? Is that a different data set? It's very unclear exactly what you are doing. – MrFlick Jul 24 '18 at 19:52
  • ncd2 is my dataset and carolina2 is the specific package for the analysis of the North Carolina Design II (experimental design). The agricolae contains a function, named carolina2. Did I explain that clearly? If not, let me know. Thanks. – MS2018 Jul 24 '18 at 19:58
  • When asking for help, you should include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Show the code you are trying to run and exactly what errors you are getting. If you are following a guide or tutorial, provide a link to that as well. – MrFlick Jul 24 '18 at 20:48

0 Answers0