Re: [R] Linear model and approx function

2023-12-09 Thread Bert Gunter
1. You should regress Elevation on Volume, no? 2. You are calling lm incorrectly for prediction. Please read ?lm and related links carefully and/or consult a tutorial. R-Help is really not the first place you should look for this sort of detailed info. 3. I think this is what you want: lm1 <- lm

[R] Linear model and approx function

2023-12-09 Thread javad bayat
Dear all; I have a dataframe with several columns. The columns are the elevation, volume and the area of the cells (which were placed inside a polygon). I have extracted them from DEM raster to calculate the volume under polygon and the elevation for a specific volume of the reservoir. > head(x6

Re: [R] regarding CCA plot

2023-12-09 Thread Gilson Correia de Carvalho
Dear Shailendra, For me the problem is not related to R or Rstudio or even vegan. The CCA analysis can not be done with denuded site, as the sum will be zero. "all row sums must be >0 in the community data matrix" Best regards, GCC

Re: [R] regarding CCA plot

2023-12-09 Thread Ivan Krylov
Dear Shailendra Pal, Welcome to the R-help mailing list! Most of us are not members of RStudio in any way. Your problem is also purely about programming in R, so you've come to the right place. You have also done the right thing by showing us the code. On Fri, 8 Dec 2023 16:08:51 +0530 shailendra

[R] regarding CCA plot

2023-12-09 Thread shailendra pal
Hii rstudio members I am learning rstudio, For my manuscript I am trying to plot CCA using species and environmental data. But I am getting error like Error in cca.default(sptrans, envtrans) : all row sums must be >0 in the community data matrix *My code is like * library(vegan) library(ggplot