Multivariate analysis with only one table

Asked

Viewed 96 times

-1

1 I am trying to relate quantities of polykets in oyster samples from different locations, the locations and quantities are in the same table, I started by boxplot to have medias and variables in R, I was able to visualize by naming which location I would like to analyze and deleting columns which are not needed

 pinheiros <-pinheiros[,-c(2:4)]
 boxplot(pinheiros, "Vila Fatima")
 boxplot(pinheiros, "Vila Fatima")
 boxplot(pinheiros, "Vila Fatima") -> VF        
 boxplot(pinheiros, "Poruquara") -> PU
 boxplot(pinheiros, "Mangue Pinheiros")-> MG 

2 I would like to join the 3 in one, I tried Plot but follow this error

plot("VF" , "PU", "MP")

Error in Plot.window(...) finite values are required for 'xlim' In addition: Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log) : Nas introduced by coercion
2: In xy.coords(x, y, xlabel, ylabel, log) : Nas introduced by coercion
3: In min(x) no non-missing Arguments to min; returning Inf
4: In max(x) : no non-missing Arguments to max; returning -Inf
5: In min(x) : no non-missing Arguments to min; returning Inf
6: In max(x) : no non-missing Arguments to max; returning -Inf

  • Oops, it would be easier to help with a sample of the data. Try dput(head(dados)). But speaking of your function plot is not valid. You create a chart with an x and a y and then you can add more data with lines or points. But if the result is the 3 boxplots together you can use boxplot(VF , PU, MP).

  • Instructions as boxplot(pinheiros, "Vila Fatima") do not make sense, the string "Vila Fatima" is not there to do anything. Can you please, edit the question with the departure of dput(pinheiros) or, if the base is too large, dput(head(pinheiros, 20))? The basis pinheiros already filtered with the first introduction of the question.

1 answer

0

To print multiple Plots you can use. ` par(mfrow=c(2,1))

Plot(VF) Plot(PU) .... ` But the ideal is dput, to fix this crazy error ae.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.