Re: [R] Bug in packages.

2022-07-13 Thread Ivan Krylov
On Wed, 13 Jul 2022 16:19:59 -0400 Charles-Édouard Giguère wrote: > Is there a mechanism to report a bug in someone package? I plan to > email the author, but I was wondering if there is an official way > like the issue function in github. Try running bug.report(package='...'). It should either

Re: [R] How to parse a really silly date with lubridate

2022-07-13 Thread Dr Eberhard W Lisse
Bui, thanks, this what Avi suggested in an email to me as well and works. It's so easy if you know it :-)-O el On 2022-07-13 23:40 , Rui Barradas wrote: Hello, Are you looking for mutate? In the example below I haven't included the filter, since the tibble only has 2 rows. But the date

Re: [R] Bug in packages.

2022-07-13 Thread Bert Gunter
https://www.r-project.org/bugs.html for info on bug reporting. Bert On Wed, Jul 13, 2022 at 1:49 PM Charles-Édouard Giguère wrote: > > Hello everyone, > Is there a mechanism to report a bug in someone package? I plan to email the > author, but I was wondering if there is an official way like

Re: [R] Does the function "c" have a character limit?

2022-07-13 Thread avi.e.gross
To be clear, Everything has limits beyond which it is not expected to have to deal with. Buffers often pick a fixed size and often need complex code to keep grabbing a bigger size and copy and add more, or arrange various methods to link multiple memory areas into a growing whole, such as

Re: [R] How to parse a really silly date with lubridate

2022-07-13 Thread Dr Eberhard W Lisse
Hi, while all of the below work in a character vector, none works in the tibble. The following DDATA %>% add_column(as.tibble(lubridate::dmy_hm(DDATA$Date)), .before = "Period") %>% rename(NewDate=value) %>%

Re: [R] aborting the execution of a function...

2022-07-13 Thread Bill Dunlap
You could write a function that returns an environment (or list if you prefer) containing the results collected before the interrupt by using tryCatch(interrupt=...). E.g., doMany <- function(names) { resultEnv <- new.env(parent=emptyenv()) tryCatch( for(name in names)

Re: [ESS] [External] Re: ESS confused about newest R

2022-07-13 Thread Stephen Eglen via ESS-help
> For me, that now starts R 4.2.0 on WIndows. > > However, given the fragility of regexps, does anyone (Martin?) know why > the ucrt now appears in versions on Windows, and whether that was > deliberate? ESS might well be the only program that machine reads that > date, but still we should try to

Re: [R] How to parse a really silly date with lubridate

2022-07-13 Thread avi.e.gross
Eberhard, Others have supplied ways to do this using various date management functions. But I want to add another option that may make sense if the dates are not all quite as predictable. You can use your own regular expressions in R as in most languages, that try to match each entry to one

Re: [R] Does the function "c" have a character limit?

2022-07-13 Thread avi.e.gross
If I follow this thread, it looks clear that the problem is superficial and not really about the c() function as it is below sea level. Is this also a problem if you replace c() with max () or list() as I think it may be? Then it is more about what length the interpreter is able to handle

Re: [ESS] [External] Re: ESS confused about newest R

2022-07-13 Thread Richard M. Heiberger via ESS-help
The change in date format makes sense. The short term workaround is to set the specific R you want. In general, that ESS code on Windows was designed to find R in any of a number of standard places. The list of what those standard places are is also a variable you can set. The details have

Re: [R] How to parse a really silly date with lubridate

2022-07-13 Thread Rui Barradas
Hello, With lubridate, note in what sequence your datetime elements occur and use the appropriate function. d <- c('9. Jul 2022 at 11:39', '10. Jul 2022 at 01:58') lubridate::dmy_hm(d) #> [1] "2022-07-09 11:39:00 UTC" "2022-07-10 01:58:00 UTC" Hope this helps, Rui Barradas Às 14:40 de

Re: [R] How to parse a really silly date with lubridate

2022-07-13 Thread Ivan Krylov
В Wed, 13 Jul 2022 15:40:43 +0200 Dr Eberhard Lisse пишет: >1 9. Jul 2022 at 11:39 >2 10. Jul 2022 at 01:58 Don't know about lubridate, but the following seems to work: Sys.setlocale('LC_TIME', 'C') strptime( c('9. Jul 2022 at 11:39', '10. Jul 2022 at 01:58'), '%d. %b %Y at

Re: [R] Does the function "c" have a character limit?

2022-07-13 Thread Richard O'Keefe
Breaking up the *line* doesn't mean breaking up the *command*. For example, x <- c( "FOOBAR", # 1 ... "FOOBAR", # 4999 "UGGLE") works fine, with source(..), with "R -f ...", and other ways. Each *line* is short, but it's still one *command*. I'd probably put that much data in a

[R] How to parse a really silly date with lubridate

2022-07-13 Thread Dr Eberhard Lisse
Hi, I have data file which generated by an otherwise very nice (diabetes log) app, but exports dates really silly. After reading the enclosed mwe.csv into R like so MWE <- read_delim('mwe.csv', delim = ';') %>% select(Date) %>% print() this comes

Re: [R] Does the function "c" have a character limit?

2022-07-13 Thread Ebert,Timothy Aaron
The limits to the size of vectors, matrices, data frames, lists, or other data structure does not have a simple answer. 1) 2^31 - 1 is the maximum number of rows.

Re: [R] Does the function "c" have a character limit?

2022-07-13 Thread David Winsemius
On 7/12/22 23:26, David Winsemius wrote: I think the restriction is not specific to `c` but rather is a limitation on the length of expressions. My foggy memory is that the limit is in the 450-500 character vicinity. Pretty sure it’s been discussed here in the past. One way to get around

Re: [R] Does the function "c" have a character limit?

2022-07-13 Thread David Winsemius
I think the restriction is not specific to `c` but rather is a limitation on the length of expressions. My foggy memory is that the limit is in the 450-500 character vicinity. Pretty sure it’s been discussed here in the past. — David. Sent from my iPhone > On Jul 12, 2022, at 11:13 PM,