I'm a beginner in R and Rstudio and I have to master it for my studies (Biology). However I tried to make a plot out of a simple dataset made with Excel. I struggled to import it in R by converting it in .csv then I made it a data frame with (as.data.frame) then I extracted two columns (x and y) that I "merged" with cbind
(because merge doesn't seem to give results) to make a simple plot. So I used the plot function.
And then I received errors messages. I tried to change different parameters but I still receive error messages. I read comments about R and Rstudio saying that it was great for graphics and plots but I'm really struggling to make something out of that. As I'm learning alone, have someone an idea of a serious source that could explain how such language works for complete beginner ? Because it's extraterrestrial language for me.
Here is an extract of error messages:
Error in file.exists(pythonPath) :
file name conversion problem -- name too long?
Error in plot.window(...) : 'xlim' nécessite des valeurs finies
In addition: Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf
Error in plot.window(...) : valeur 'xlim' incorrecte
In addition: Warning message:
In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
Here is the csv file:
Identifiant,Zone,Sous-zone,Espece,Nombre de plants,Interruption de développement,Type irrigation,Nombre de plants - succès,Pourcentage succès
Pdt1P,P,Potager,Solanum tuberosum,32,Non,Tradi,,0
Pdt1B,B,Figuier,Solanum tuberosum,68,Non,Tradi,,0
Cho1B,B,Figuier,Brassica oleracea,3,Oui,Tradi,,0
Ai1B,B,Figuier,Allium sativum,16,Non,Tradi,,0
Fe2B,B,Caravane,Vicia faba,30,Non,Tradi,,0
Maï1P,P,Potager,Zea mays,20,NA,Tradi,,0
Ech1P,P,Potager,Allium ascalonicum,16,NA,Tradi,,0
Oi1P,P,Potager,Allium cepa,1,NA,Tradi,,0
Pch2P,P,Disque,Cicer arietinum,30,,Tradi,,0
Me2P,P,Disque,Mentha aquatica,2,Non,Tradi,2,100
Fra2P,P,Disque,Fragaria vesca,8,Non,Tradi,,0
Fra3B,B,Piscine,Fragaria vesca,8,Non,Tradi,,0
Citl3P,P,T3,Cymbopogon nardus,3,,intérieur,,0
Ta3P,P,T3,Colocasia esculenta,2,,intérieur,,0
Thank you for listening to my message I hope someone could help me.
- Goal: make a simple plot out of a excel dataset and mastering plot making in R
- Import issues: converting dataset in data frame and exctracting interest columns (1 and 5).-Done Ok
- Graphic issues: Impossible to make a simple plot out of it. changing xlim, extracting interest columns, looking for others parameters.