[R] Fwd: Create new polygon from a polygon

2021-04-21 Thread javad bayat
-- Forwarded message - From: javad bayat Date: Fri, Apr 16, 2021 at 9:00 AM Subject: Create new polygon from a polygon To: Dear all; I have a polygon and I want to divide it into 2 new polygons. The first one must be 54 percent of the initial polygon area and the remaining area

Re: [R] Occurrence by season

2021-04-21 Thread Bert Gunter
Simpler, and no loops needed per column: ## this makes the idea clear > x <- 1:12 > (x %% 12) %/% 3 ## first modulo, then integer divide [1] 0 0 1 1 1 2 2 2 3 3 3 0 ## add 1 if you prefer 1 to 4. Better yet, probably, is to turn it into a factor: > f <- factor(c("win","spr","sum","fal")[x+1]) > f

Re: [R] R versions > 4.0.2 fail to start in Windows 64-bit

2021-04-21 Thread Bill Dunlap
Does this happen when you start R with the --vanilla flag? When you remove or rename ./.RData? -Bill On Tue, Apr 20, 2021 at 8:37 PM N. Jordan Jameson wrote: > I have a 64-bit Windows machine and I've installed R versions 4.0.0 through > 4.0.5 and only versions 4.0.2 and below will successfull

Re: [R] Occurrence by season

2021-04-21 Thread Eric Berger
Hi Ani, Before the for loops add the following line when[,-1] <- when[,-1]%%12 + 1 This changes the month numbering so that Dec becomes 1, Jan becomes 2, etc Then your for loop does what you want. HTH, Eric On Wed, Apr 21, 2021 at 11:09 AM ani jaya wrote: > Dear r community, > > I have a d

[R] Occurrence by season

2021-04-21 Thread ani jaya
Dear r community, I have a data frame that shows the month of occurrence of the maximum value on let say 10 stations in 30 years. I want to make percentages based on seasons (DJF, MAM, JJA, and SON). I can do that by the code below but only when we put season by JFM, AMJ, ...(or 123; 456; 789;..)