Re: [R] read_excel() ignore case of worksheet name?

2020-05-26 Thread Jim Lemon
Hi Ravi, The simplest way seems to be the excel_sheets function in the readxl package. If you know that the sheet name will be some form of "Table", something like this may do it: getSheetCase<-function(filepath,sheetname) { localnames<-c(sheetname,

Re: [R] [FORGED] Re: read_excel() ignore case of worksheet name?

2020-05-26 Thread Rolf Turner
There is a function excel_sheets() in the readxl package which will tell you the names of the sheets. Using that you should probably be able to take the appropriate evasive action. cheers, Rolf Turner On 27/05/20 2:59 pm, Ravi Jeyaraman wrote: I’ve already tried that and doesn’t work

Re: [R] read_excel() ignore case of worksheet name?

2020-05-26 Thread Ista Zahn
How about read_excel_table <- function(x) { readxl::read_excel( x, sheet=grep("tables", excel_sheets(x), ignore.case = TRUE, value = TRUE), .name_repair = fixColNames ) } lapply(SIS$FULL_FILEPATH, read_excel_table) --Ista On Tue,

Re: [R] read_excel() ignore case of worksheet name?

2020-05-26 Thread Erin Hodgess
Nice! On Tue, May 26, 2020 at 9:37 PM Ista Zahn wrote: > How about > > read_excel_table <- function(x) { > readxl::read_excel( > x, > sheet=grep("tables", >excel_sheets(x), >ignore.case = TRUE, >value = TRUE), > .name_repair =

Re: [R] read_excel() ignore case of worksheet name?

2020-05-26 Thread Erin Hodgess
What about getSheets, please? That will get the sheet names. On Tue, May 26, 2020 at 8:59 PM Ravi Jeyaraman wrote: > I’ve already tried that and doesn’t work > > > > *From:* Erin Hodgess [mailto:erinm.hodg...@gmail.com] > *Sent:* Tuesday, May 26, 2020 10:55 PM > *To:* Ravi Jeyaraman > *Cc:*

Re: [R] read_excel() ignore case of worksheet name?

2020-05-26 Thread Ravi Jeyaraman
I’ve already tried that and doesn’t work From: Erin Hodgess [mailto:erinm.hodg...@gmail.com] Sent: Tuesday, May 26, 2020 10:55 PM To: Ravi Jeyaraman Cc: r-help@r-project.org Subject: Re: [R] read_excel() ignore case of worksheet name? Here’s a thought, please. Could you use the tolower

Re: [R] read_excel() ignore case of worksheet name?

2020-05-26 Thread Erin Hodgess
Here’s a thought, please. Could you use the tolower function and make them all lower case? Thanks, Erin On Tue, May 26, 2020 at 8:21 PM Ravi Jeyaraman wrote: > Hello All, Is there any parameter to make read_excel() ignore the > case-sensitiveness of the worksheet? I'm using the below to

[R] read_excel() ignore case of worksheet name?

2020-05-26 Thread Ravi Jeyaraman
Hello All, Is there any parameter to make read_excel() ignore the case-sensitiveness of the worksheet? I'm using the below to ready in multiple spreadsheets and it works perfectly fine if the worksheet is named 'Tables', but fails when it's named ' TABLES'. Any thoughts? lapply(1:nrow(SIS),

Re: [R] Partial matching list elements in R 4.0

2020-05-26 Thread Bert Gunter
Hmmm... yes. I read (past tense) that passage as meaning that **when extracting** partial matching is only done with $. I did not read it as also saying that with assignment, partial matching with $ is not done, but I see how you could. As Bill D.'s example showed, even R seems confused about how

Re: [R-es] Estimación GMM de Arellano y Bond (1991)

2020-05-26 Thread Javier Marcuzzi
Estimado Pedro José Martinez De curioso busque de que se trata en https://cran.r-project.org/web/packages/plm/plm.pdf, vi que quien lo mantiene tiene un correo electrónico que termina en fr, posiblemente el autor francés pueda responder una pregunta a su cuenta de correo. En mi caso, gratamente

Re: [R] Partial matching list elements in R 4.0

2020-05-26 Thread John Harrold
Hello Bert, I've read the documentation and I didn't think it applied here. Perhaps it's my reading of that documentation I'm confused by. I stays *only when extracting*. What I'm doing here is assigning values. Is the expected behavior really to create a copy of the "misc" element in "mi" and

Re: [R] 3D NURBS import as B-spline

2020-05-26 Thread Jeff Newmiller
The unhelpful answer is yes, because R is a programming language that just requires someone with an itch. The more helpful answer is that the rgl package could be a good place to investigate making those connections... it looks like that might have been a "future work item" some time back. On

Re: [R] Partial matching list elements in R 4.0

2020-05-26 Thread William Dunlap via R-help
Another symptom of this problem is: > {x <- list(Abc=list(Pqr="Old Abc$Pqr")); x$Ab$Pqr <- "New Ab$Pqr" ; x} R version 3.6.2 (2019-12-12) | R version 4.0.0 (2020-04-24) List of 2| List of 2 $ Abc:List of 1 | $ Abc:List of 1 ..$ Pqr: chr "Old Abc$Pqr" | ..$

Re: [R] Partial matching list elements in R 4.0

2020-05-26 Thread Bert Gunter
I can't answer your question (about your R programming skills) but the behavior you complain about is as documented. In particular: "Thus the default behaviour is to use partial matching only when extracting from recursive objects (except environments) by $. Even in that case, warnings can be

[R] 3D NURBS import as B-spline

2020-05-26 Thread Дмитрий Пономаренко
Dear R-help list, I have 3D NURBS curves that I would like to import into R as B-splines. The curves are in Rhinoceros 3dm format but can be converted to IGES format. Can 3D NURBS curves be imported into R? Thank you, Zemleroi [[alternative HTML version deleted]]

[R] Partial matching list elements in R 4.0

2020-05-26 Thread John Harrold
Hello, I'm testing some code in R 4.0, and I'm having an issue with the following" # - rm(list=ls()) graphics.off() #load("/tmp/post.RData") var = list(); # If I uncomment this it fixes things: # var$options = list(mi = list(), #misc = list()) #

Re: [R] [External] Help with sub-setting

2020-05-26 Thread Burgess, Jamie
Dear all, Apologies for the late reply - I have just got back from my shift. I am unfortunately a little sleep deprived hehe Hi Bert, Thank-you for your reply Yes, apologies - the syntax was lost in translation whilst changing the names of the groups, imported data-set file name and

[R] Manage time frame package deSolve

2020-05-26 Thread Luigi Marongiu
Hello, I have set a model with deSolve's ode. I have set the time as `period = seq(1, 10, 1)` but the times I get from the ode are like 1, 1.000173... Is it possible to run ode with the time points provided by `period`? -- Best regards, Luigi __