similar to: Problem with filling dataframe's column

Displaying 20 results from an estimated 7000 matches similar to: "Problem with filling dataframe's column"

2023 Jun 11
1
Problem with filling dataframe's column
Dear Rui; Many thanks for your email. I used one of your codes, "data2$LU[which(data2$Layer == "Level 12")] <- "Park"", and it works correctly for me. Actually I need to expand the codes so as to consider all "Levels" in the "Layer" column. There are more than hundred levels in the Layer column. If I use your provided code, I have to write it
2023 Jun 11
1
Problem with filling dataframe's column
?s 21:05 de 11/06/2023, javad bayat escreveu: > Dear R users; > I am trying to fill a column based on a specific value in another column of > a dataframe, but it seems there is a problem with the codes! > The "Layer" and the "LU" are two different columns of the dataframe. > How can I fix this? > Sincerely > > > for (i in 1:nrow(data2$Layer)){ >
2023 Jun 11
1
Problem with filling dataframe's column
?s 22:54 de 11/06/2023, javad bayat escreveu: > Dear Rui; > Many thanks for your email. I used one of your codes, > "data2$LU[which(data2$Layer == "Level 12")] <- "Park"", and it works > correctly for me. > Actually I need to expand the codes so as to consider all "Levels" in the > "Layer" column. There are more than hundred
2023 Dec 06
2
Volume of polygon
The volume of a polygon = 0. Polyhedra have volumes. This may be irrelevant, but if the lake is cylindrical == constant cross sectional area at all depths, then height doubles when the volume does and vice versa. Otherwise you have to know how area varies with height or use more sensible approximations thereto. Cheers, Bert On Tue, Dec 5, 2023, 20:13 javad bayat <j.bayat194 at
2023 Dec 06
2
Volume of polygon
Dear all; I am trying to calculate the volume of a polygon shapefile according to a DEM raster. I have provided some codes at the end of this email.I dont know if the codes are correct or not. Following this, I have another question too. I want to know if the volume of the reservoir rises or doubles, what would be the elevation? I would be more than happy if anyone could help me. Sincerely "
2023 Dec 06
1
Volume of polygon
Hi, As already mentioned, this is a great topic for R-sig-geo, where you'd probably get specialist answers like the lake morphology package https://cran.r-project.org/web/packages/lakemorpho/index.html which is explicitly designed for this kind of question. Sarah On Tue, Dec 5, 2023 at 11:13?PM javad bayat <j.bayat194 at gmail.com> wrote: > > Dear all; > I am trying to
2024 Apr 10
1
Question regarding reservoir volume and water level
Dear all; Thank you for your reply. David has explained an interesting method. David I have DEM file of the region and I have extracted the xyz data from that. Also I can extract bathymetry data as xyz file. I have calculated the storage (volume) of reservoir at the current elevation. But the method I have used to calculate the volume is different from your method. I have crop DEM by the reservoir
2018 Jan 30
2
Calculating angle of a polyline
Dear R users I am trying to find a formula to calculate the angle of a polyline. Is there a way to do this? Many thanks. -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat194 at yahoo.com [[alternative HTML version deleted]]
2024 Apr 07
2
Question regarding reservoir volume and water level
Dear all; I have a question about the water level of a reservoir, when the volume changed or doubled. There is a DEM file with the highest elevation 1267 m. The lowest elevation is 1230 m. The current volume of the reservoir is 7,000,000 m3 at 1240 m. Now I want to know what would be the water level if the volume rises to 1250 m? or what would be the water level if the volume doubled (14,000,000
2012 Oct 19
3
saving to docx
hi all, how can i saving R output to docx or Jpeg format? [[alternative HTML version deleted]]
2024 Apr 09
1
Question regarding reservoir volume and water level
Water engineer here. The standard approach is to 1) get the storage vs. elevation data from the designers of the reservoir or, barring that, 2) get the bathymetry data from USBR or state DWR, or, if available, get the DEM data from USGS if the survey was done before the reservoir was built or 3) get a boat+sonar with GPS? +lots of time and survey the bottom elevation yourself. Put the xyz
2024 Apr 07
1
Question regarding reservoir volume and water level
Homework? -- Sent from my Android device with K-9 Mail. Please excuse my brevity. On April 7, 2024 8:27:18 AM EDT, javad bayat <j.bayat194 at gmail.com> wrote: >Dear all; >I have a question about the water level of a reservoir, when the volume >changed or doubled. >There is a DEM file with the highest elevation 1267 m. The lowest elevation >is 1230 m. The current volume of
2024 Apr 07
1
Question regarding reservoir volume and water level
John, Your reaction was what my original reaction was until I realized I had to find out what a DEM file was and that contains enough of the kind of depth-dimension data you describe albeit what may be a very irregular cross section to calculate for areas and thence volumes. If I read it correctly, this can be a very real-world problem worthy of a solution, such as in places like California
2018 Jan 30
2
Calculating angle of a polyline
Assuming your polyline is defined by two vectors, one for the x coordinates, one for the y coordinates, you can try the following library(NISTunits) polyangles <- function(xV,yV) { stopifnot( (length(xV)==length(yV)) && (length(xV) >= 3)) v <- function(i) { c( xV[i]-xV[i-1], yV[i]-yV[i-1])} vlen <- function(v) { sqrt(sum(v*v)) } lV <- rep(NA_real_,length(xV)) for
2018 Jan 30
0
Calculating angle of a polyline
A polyline by definition has many angles, so your question is ill-formed. And this is a question about math, not R, so is off topic here. I suggest reading Wikipedia. -- Sent from my phone. Please excuse my brevity. On January 29, 2018 11:10:02 PM PST, javad bayat <j.bayat194 at gmail.com> wrote: >Dear R users >I am trying to find a formula to calculate the angle of a polyline. Is
2024 Apr 07
1
Question regarding reservoir volume and water level
Aside from the fact that the original question might well be a class exercise (or homework), the question is unanswerable given the data given by the original poster. One needs to know the dimensions of the reservoir, above and below the current waterline. Are the sides, above and below the waterline smooth? Is the region currently above the waterline that can store water a mirror image of the
2023 Nov 20
1
Calculating volume under polygons
Dear all; I am trying to calculate volume under each polygon of a shapefile according to a DEM. when I run the code, it gives me an error as follows. " Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'addAttrToGeom': sp supports Z dimension only for POINT and MULTIPOINT. use `st_zm(...)` to coerce to XY dimensions
2018 Jan 30
0
Calculating angle of a polyline
I like to use complex numbers for 2-dimensional geometry. E.g., > polyAngles2 function (xV, yV) { stopifnot((length(xV) == length(yV)) && (length(xV) >= 3)) z <- complex(re = xV, im = yV) c(NA, diff(Arg(diff(z))), NA) # radians, positive is counter-clockwise } > x <- c(0:3) > y <- c(0,0,1,1) > polyAngles2(x,y) / pi * 180 [1] NA 45 -45 NA Bill
2024 Mar 16
1
Problem when trying to install packages
Dear all; I found a useful video on youtube that has explained how to install Rtools. I followed the instructions and the problem was solved. " Installing R version 4.0 + RTools 4.0 + RStudio For Data Science (#R #RTools #RStudio #DataScience) - YouTube <https://www.youtube.com/watch?v=h2IPWVXaUuU> " Sincerely On Sat, Mar 16, 2024 at 10:15?AM Bert Gunter <bgunter.4567 at
2024 Apr 07
1
Question regarding reservoir volume and water level
?s 13:27 de 07/04/2024, javad bayat escreveu: > Dear all; > I have a question about the water level of a reservoir, when the volume > changed or doubled. > There is a DEM file with the highest elevation 1267 m. The lowest elevation > is 1230 m. The current volume of the reservoir is 7,000,000 m3 at 1240 m. > Now I want to know what would be the water level if the volume rises to