Re: [R] error message from read.csv in loop

2021-07-10 Thread Migdonio González
Thank you very much for the clarification. I will try to use a more precise language next time. Warm regards Migdonio G. On Sat, Jul 10, 2021 at 11:30 AM Bert Gunter wrote: > "It seems that your problem is that you are using single quotes inside of > the double quotes." > > That is FALSE. From

Re: [R] error message from read.csv in loop

2021-07-10 Thread Duncan Murdoch
On 10/07/2021 12:30 p.m., Bert Gunter wrote: "It seems that your problem is that you are using single quotes inside of the double quotes." That is FALSE. From ?Quotes: "Single and double quotes delimit character constants. They can be used interchangeably but double quotes are preferred (and

Re: [R] problem for strsplit function

2021-07-10 Thread Robert Knight
My method would be to use parse and deparse and substitute. It would iterate over each file name and build a new list of file names with the last four characters removed to have only the left side, and only the last four remaining to have only the right side. Then a new dataframe would be

Re: [R] error message from read.csv in loop

2021-07-10 Thread Bert Gunter
"It seems that your problem is that you are using single quotes inside of the double quotes." That is FALSE. From ?Quotes: "Single and double quotes delimit character constants. They can be used interchangeably but double quotes are preferred (and character constants are printed using double

[R] syvcoxph and cox.zph for testing the PH assumption

2021-07-10 Thread Youyi Fong
Hello, is it kosher to call cox.zph on a syvcoxph model fit? I see that someone proposed a modified version of cox.zph that uses resid(fit, 'schoenfeld', **weighted=TRUE**). https://stats.stackexchange.com/questions/265307/assessing-proportional-hazards-assumption-of-a-cox-model-with-caseweights

Re: [R] error message from read.csv in loop

2021-07-10 Thread Migdonio González
Hello Kai, Just as you did to store the data inside of rr. Try class(rr[[1]]) or class(rr[[2]]) and so on to explore a bit more. The variable rr is a list that contains dataframes within it. To access the dataframes you must use the syntax rr[[i]] where i is the index of the element of the list

Re: [R] error message from read.csv in loop

2021-07-10 Thread Migdonio González
It seems that your problem is that you are using single quotes inside of the double quotes. This is not necessary. Here is the corrected for-loop: for (j in 1:nrow(ora)) { mycol <- ora[j,"fname"] mycsv <- paste0(mycol,".csv") rdcsv <-

Re: [R-es] Gráfica con dos ejes

2021-07-10 Thread Griera
Hola: Con ggplot2, al ser dos variables totalmente diferentes, es complicado. Con los graficos basicos aquí está un ejemplo: https://www.r-bloggers.com/2015/04/r-single-plot-with-two-different-y-axes/ set.seed(2015-04-13) d = data.frame(x =seq(1,10), n = c(0,0,1,2,3,4,4,5,6,6),

[R] [Rd] R 4.1.1 scheduled for August 10

2021-07-10 Thread Peter Dalgaard via R-help
Full schedule is available on developer.r-project.org. (This comes somewhat late this year, partly because we needed to squeeze in 4.0.5 before 4.1.0 could be released.) -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg,

Re: [R] How to estimate the parameter for many variable?

2021-07-10 Thread SITI AISYAH ZAKARIA
Dear Rui and Jim, Thank you very much for your feedback. Yes, now I get the output. And after this I will use this output as the marginal distribution to continue the analysis on spatial extremes. Thanks again. See you later. On Fri, 9 Jul 2021 at 17:18, Rui Barradas wrote: > Hello, > >

Re: [R] error message from read.csv in loop

2021-07-10 Thread Rui Barradas
Hello, 1. When there are systematic errors, use ?try or, better yet, ?tryCatch. Something like the code below will create a list of errors and read in the data if none occurred. The code starts by creating an empty list for tryCatch results. It uses ?file.path instead of noquote/paste0 to