[R] Runs of at least 5 days with certain value in a rasterbrick in R

2021-01-20 Thread Adam Dragula
Dear R users, I am working with a rasterbrick named X, which has got 6300 time layers. Those 6300 time layers represent every winter day since 1.1.1950 till 31.12. I dropped all 29th of february so that I had 90 time layers for every season. Values throughout the whole domain are between 0.5 and

Re: [R] Different results on running Wilcoxon Rank Sum test in R and SPSS

2021-01-20 Thread bharat rawlley via R-help
Thank you for your time, Professor John! Much appreciated!  Yours sincerely Bharat Rawlley  Sent from Yahoo Mail on Android On Thu, 21 Jan 2021 at 4:40 AM, John Fox wrote: Dear Bharat Rawlley, On 2021-01-20 1:45 p.m., bharat rawlley via R-help wrote: >  Dear Professor John, > Thank you

Re: [R] help post

2021-01-20 Thread Jeff Newmiller
I think Parrot is a distribution of Linux, which would likely use the bash command shell. The saved workspace would be in a file named ".RData" in whatever the current directory was when you quit R. Many experienced users of R avoid creating such files as mistakes from old sessions can come bac

Re: [R] Different results on running Wilcoxon Rank Sum test in R and SPSS

2021-01-20 Thread John Fox
Dear Bharat Rawlley, On 2021-01-20 1:45 p.m., bharat rawlley via R-help wrote: Dear Professor John, Thank you very much for your reply! I agree with you that the non-parametric tests I mentioned in my previous email (Moods median test and Median test) do not make sense in this situation as th

Re: [R] help post

2021-01-20 Thread David Winsemius
On 1/20/21 8:00 AM, Imran Shimanto wrote: Dear Sir, How can i find the save workplace what i was practiced on parrot os terminal? # execute at your console ?save.image How can i save program on parrot terminal and how i can find the saved file ?? You should contact the people who mainta

Re: [R] Help with changing date format in R

2021-01-20 Thread Marc Schwartz via R-help
Hi, Internally, once you have a Date class object in R, the "printed" output displayed will be the default, which I believe is influenced by your locale. See ?format.Date. That being said, in your example data below, 07022020, could be either July 2, 2020, or February 7, 2020. How do you know

Re: [R] Help with changing date format in R

2021-01-20 Thread Jeff Newmiller
Perhaps d$date <- as.Date(d$date, format = ifelse("K"==d$observer, "%d%m%Y", "%m%d%Y" )) On January 20, 2021 8:08:33 AM PST, krissievdh wrote: >Hi, > >I have a big database where one-third of the data is in a different >date >format than the rest. I'll add an example table to show you. > >| pl

Re: [R] Help with changing date format in R

2021-01-20 Thread Sarah Goslee
Hi, If the date format is determined by observer, you could for instance use subset to divide it into two data frames, fix the dates and recombine, or use ifelse to use the correct format based on observer. This is a basic data manipulation task, and there are lots of ways approach it. Sarah On

Re: [R] Different results on running Wilcoxon Rank Sum test in R and SPSS

2021-01-20 Thread bharat rawlley via R-help
Dear Professor John,  Thank you very much for your reply!  I agree with you that the non-parametric tests I mentioned in my previous email (Moods median test and Median test) do not make sense in this situation as they treat PFD_n and drug_code as different groups. As you correctly said, I want

[R] Help with changing date format in R

2021-01-20 Thread krissievdh
Hi, I have a big database where one-third of the data is in a different date format than the rest. I'll add an example table to show you. | plot | observer | date| | 1 | K | 31012020 | | 2 | K | 070220

[R] help post

2021-01-20 Thread Imran Shimanto
Dear Sir, How can i find the save workplace what i was practiced on parrot os terminal? How can i save program on parrot terminal and how i can find the saved file ?? I am learning R from W3schools.com and i am enjoying that. After that how can i learn advance R ? [[alternative HTML versio

Re: [R] writing a function to work with dplyr::mutate()

2021-01-20 Thread Steven Rigatti
This works perfectly. Ah, just needed a vector as output instead of a 1-column df. Thank you!!! On Tue, Jan 19, 2021 at 2:18 PM Bill Dunlap wrote: > Your translate... function seems unnecessarily complicated and reusing the > name 'var' for both the input and the data.frame containing the input

Re: [R] Find the number of clusters using clusGAP function in R

2021-01-20 Thread John Kane
Crossposted at https://community.rstudio.com/t/find-the-number-of-clusters-using-clusgap-function-in-r/93586 There is nothing wrong with crossposting but one should mention it to help avoid duplication of effort On Wed, 20 Jan 2021 at 09:46, Jovani T. de Souza wrote: > Could you help me find th

[R] Find the number of clusters using clusGAP function in R

2021-01-20 Thread Jovani T. de Souza
Could you help me find the ideal number of clusters using the `clusGap `function? There is a similar example in this link: https://www.rdocumentation.org/packages/factoextra/versions/1.0.7/topics/fviz_nbclust But I would like to do it for my case. My code is below: library(cluster) df <

[R] Fwd: Converting "day of year" to "year", "month" and "day"

2021-01-20 Thread Jibrin Alhassan
-- Forwarded message - From: Jibrin Alhassan Date: Wed, Jan 20, 2021 at 2:18 PM Subject: Re: [R] Converting "day of year" to "year", "month" and "day" To: Rui Barradas Rui, I am grateful. All the 1826 rows have been displayed. My sincere appreciation to all for your time and inp

Re: [R] Converting "day of year" to "year", "month" and "day"

2021-01-20 Thread Jibrin Alhassan
Jeff, Thank you so much for the challenge. It is inspiring. Jibrin On Sun, Jan 17, 2021 at 7:04 PM Jeff Newmiller wrote: > This is an opportunity for you to think for yourself (r-help) instead of > expecting solutions neatly wrapped and delivered (r-do-my-work-for-me). > Remove the no-longer-nee

Re: [R] Converting "day of year" to "year", "month" and "day"

2021-01-20 Thread Jibrin Alhassan
Hello Peter, Thanks for your input. What I need runs like this. df1 <- read.table("SWSdata_1998_2002", header = TRUE) > df1$date <- as.Date(paste(df1$year, df1$day), + Error: unexpected end of input > df1$date <- as.Date(paste(df1$year, df1$day),format = "%Y %j",origin = "1998-01-01") > df2 <- df1[

Re: [R] rbind common header to file list

2021-01-20 Thread Eric Berger
for ( file in filelist ) On Wed, Jan 20, 2021 at 2:21 PM Miluji Sb wrote: > Thank you for your reply and the solution. Yes, I would like the date to be > the column header for all the files in the list. > > This is what tried following your suggestion; > > filelist = list.files(pattern = ".*.t

Re: [R] Monospaced font not shown correctly (Xubuntu 20.04)

2021-01-20 Thread Rasmus Liland
On 2021-01-20 12:29 +0100, Wolfgang Viechtbauer wrote: > > That looks like a more elegant solution, not requiring hardcoding paths. > Thanks for the suggestion! Thanks, no problem R __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] Converting "day of year" to "year", "month" and "day"

2021-01-20 Thread Jibrin Alhassan
Hi Bert, Thanks for your time. I will check some relevant tutorias. I am very grateful. Jibrin Th On Fri, Jan 15, 2021 at 7:49 PM Bert Gunter wrote: > There are many good tutorials for R. As a "newbie", you need to avail > yourself of them. Although this forum is meant to "help", it is not > des

Re: [R] rbind common header to file list

2021-01-20 Thread Miluji Sb
Thank you for your reply and the solution. Yes, I would like the date to be the column header for all the files in the list. This is what tried following your suggestion; filelist = list.files(pattern = ".*.txt") date <- 2101 for (file %in% filelist){ datalist <- read.table(file) write.t

Re: [R] Monospaced font not shown correctly (Xubuntu 20.04)

2021-01-20 Thread Rasmus Liland
On 2021-01-20 09:45 +, Viechtbauer, Wolfgang (SP) wrote: > And to conclude this little saga (that nobody is probably reading, but at > least then there is a solution in the archives): > > Adding the following to ~/.config/fontconfig/fonts.conf worked for me: > > > > > > >

Re: [R] Monospaced font not shown correctly (Xubuntu 20.04)

2021-01-20 Thread Viechtbauer, Wolfgang (SP)
And to conclude this little saga (that nobody is probably reading, but at least then there is a solution in the archives): Adding the following to ~/.config/fontconfig/fonts.conf worked for me: Courier /usr/share/fonts/truetype/dejavu/De

Re: [R] Monospaced font not shown correctly (Xubuntu 20.04)

2021-01-20 Thread Viechtbauer, Wolfgang (SP)
Ah, nevermind. X11Fonts() is only for Xlib. I'll see if I can figure out how to get 'fc-match Courier' to point to a otf/ttf font. I guess this is explained here: https://www.freedesktop.org/software/fontconfig/fontconfig-user.html Best, Wolfgang >-Original Message- >From: R-help [mail

Re: [R] Monospaced font not shown correctly (Xubuntu 20.04)

2021-01-20 Thread Viechtbauer, Wolfgang (SP)
Dear Paul, Thanks for the helpful reply. Indeed: > fc-match Times NimbusRoman-Regular.otf: "Nimbus Roman" "Regular" > fc-match Helvetica NimbusSans-Regular.otf: "Nimbus Sans" "Regular" are OpenType fonts. Also: X11(type="Xlib", family="mono") plot(1) works. So does X11(family="Courier New") #