Re: [R] Date Conversion Problem

2020-08-12 Thread Eric Berger
nice On Wed, Aug 12, 2020 at 6:18 PM Bert Gunter wrote: > Extra packages are not needed. > > My question is: why change the character representation at all? See the > format argument of ?as.Date. > > > as.Date("20010102",format="%Y%m%d") > [1] "2001-01-02" ## the default format for the print

Re: [R] Date Conversion Problem

2020-08-12 Thread Bert Gunter
Extra packages are not needed. My question is: why change the character representation at all? See the format argument of ?as.Date. > as.Date("20010102",format="%Y%m%d") [1] "2001-01-02" ## the default format for the print method for Date objects Bert Gunter "The trouble with having an open

Re: [R] Date Conversion Problem

2020-08-12 Thread Eric Berger
library(lubridate) a <- "20200403" lubridate::ymd(a) # 2020-04-03 HTH, Eric On Wed, Aug 12, 2020 at 5:57 PM Stephen P. Molnar wrote: > i have written an R script which allow me to plot the number of Covid-10 > cases reported by he state of Ohio. In that se t of data the date format > is in

[R] Date Conversion Problem

2020-08-12 Thread Stephen P. Molnar
i have written an R script which allow me to plot the number of Covid-10 cases reported by he state of Ohio. In that se t of data the date format is in the form -mm-dd. My script uses: datebreaks <- seq(as.Date("2020-01-01"), as.Date("2020-08-10"), by="1 week") . .

Re: [R] Question about PERL lookahead construct in regex's

2020-08-12 Thread Bert Gunter
Thank you. That indeed dispels my brain fog! Best, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Aug 12, 2020 at 6:35 AM Stefan Evert wrote: >

Re: [R] add trailing dates with rbind

2020-08-12 Thread Joshua Ulrich
Eric, Thanks for the recommendation for xts! Frederik, Please direct future questions about xts to R-SIG-Finance, or Stackoverflow. I (and other users) are more likely to see your questions there than here on R-help. Best, Josh On Wed, Aug 12, 2020 at 8:08 AM Frederik Feys wrote: > > Thank

Re: [R] Question about PERL lookahead construct in regex's

2020-08-12 Thread Stefan Evert
> On 10 Aug 2020, at 18:36, Bert Gunter wrote: > > But this appears to be imprecise (it confused me, anyway). The usual sense > of "matching" in regex's is "match the pattern somewhere in the string > going forward." But in the perl lookahead construct it apparently must > **exactly** match

Re: [R] add trailing dates with rbind

2020-08-12 Thread Frederik Feys
Thank you so much Eric! Wonderful to have an R community helping out so quickly! > Op 12 aug. 2020, om 14:10 heeft Eric Berger het > volgende geschreven: > > Hi Frederik, > (short answer) modify the assignment statement to > agg_d_h <- rbind( agg_d_h, data.frame(Group.date=next_date,x=0)

Re: [R] add trailing dates with rbind

2020-08-12 Thread Eric Berger
Hi Frederik, (short answer) modify the assignment statement to agg_d_h <- rbind( agg_d_h, data.frame(Group.date=next_date,x=0) ) Note: replace x=0 by your-variable-name=0 Note: left-hand-side of the assignment statement should be agg_d_h (longer answer) Your approach is far from the

[R] add trailing dates with rbind

2020-08-12 Thread Frederik Feys
I am having a hell of a time, this must surely be simple to solve…. Basically I want to add trailing dates to datasets with differing starting dates so that across datasets I have the same starting date. # make dataset with the same starting date start_date = as.Date("2020-03-01") d_start_date

[R] Calculating effectsize or standarized coefficents for gls models in R

2020-08-12 Thread Ganjeh, Parisa
Hi, I am new in R and I would appreciate if you guide me how I can estimate effect size or standardized coefficients for a gls model (generalized least square) in R. if I can find the way for estimating standardized coefficients is better, because I used effect size package for other models

Re: [R] write csv of a structure

2020-08-12 Thread Ivan Krylov
On Tue, 11 Aug 2020 17:34:31 +0200 Pedro páramo wrote: > Error in write_csv(resultprob, file = "resultprob.csv", sep = ",") : > unused arguments (file = "resultprob.csv", sep = ",") There is utils::write.csv and there is readr::write_csv. Judging by the parameters you pass, you seem to want

[R] write csv of a structure

2020-08-12 Thread Pedro páramo
Hi all, I want to "save" export in a csv or plain text format the results of my calculations I use cbind and I obtain what I call "resultprob" if I put deput it shows me this dput(resultprob) structure(c(88.6572680743221, 7250.7), .Dim = 1:2) > str(resultprob) num [1, 1:2] 88.7 7250.7 I use