Re: [R] [R studio] Plotting of line chart for each columns at 1 page

2018-12-15 Thread Subhamitra Patra
Thank you very much sir. Actually, I excluded all the non-trading days. Therefore, Each year will have 226 observations and total 6154 observations for each column. The data which I plotted is not rough data. I obtained the rolling observations of window 500 from my original data. So, the no. of ob

Re: [R] Combine lists into a data frame or append them to a text file

2018-12-15 Thread Jim Lemon
Hi Ek, I thought there would be a simple fix for this, but had to write a little function: fillList<-function(x) { maxrows<-max(unlist(lapply(x,length))) return(lapply(x,"[",1:maxrows)) } that fills up the rows of each list with NAs. I got the expected result with: testlist<-list(a=1:8,b=1:9,c

Re: [R] Combine lists into a data frame or append them to a text file

2018-12-15 Thread Bert Gunter
FWIW, I had no trouble writing a test case to a file with either version of your code. As we have no idea what your data look like, I don't know how anyone can diagnose the problem. But maybe I'm wrong and someone else will recognize the issue. Cheers, Bert Bert Gunter "The trouble with having a

[R] Combine lists into a data frame or append them to a text file

2018-12-15 Thread Ek Esawi
Hi All, I have an R object that is made up of N number of lists which are all of different number of columns and rows. I want to combine the N lists into a single data frame or write (append) them into text file. I hope the question is clear and doesn’t require an example. I am hoping to accompli

Re: [R] [R studio] Plotting of line chart for each columns at 1 page

2018-12-15 Thread Jim Lemon
Hi Subhamitra, Thanks. Now I can provide some assistance instead of just complaining. Your first problem is the temporal extent of the data. There are 8613 days and 6512 weekdays between the two dates you list, but only 5655 observations in your data. Therefore it is unlikely that you have a comple

Re: [R] Dealing with special characters at end of line in file

2018-12-15 Thread J C Nash
Many thanks. I'd misread the doc re fixed, and misunderstood the number of escapes. Sigh. JN On 2018-12-15 10:45 a.m., Bert Gunter wrote: > ... or used the fixed = TRUE argument. > >> z <-"In  Alvarez Cabral street by no. 105.\\000" > >> sub("\\000","", z, fixed = TRUE) > [1] "In  Alvarez Cab

Re: [R] Dealing with special characters at end of line in file

2018-12-15 Thread Bert Gunter
... or used the fixed = TRUE argument. > z <-"In Alvarez Cabral street by no. 105.\\000" > sub("\\000","", z, fixed = TRUE) [1] "In Alvarez Cabral street by no. 105." Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka

Re: [R] Dealing with special characters at end of line in file

2018-12-15 Thread David L Carlson
Each of the backslashes need to be escaped with a backslash: > ctxt <- "In Alvarez Cabral street by no. 105.\\000" > sub("000", "", ctxt) [1] "In Alvarez Cabral street by no. 105." --- David L. Carlson Department of Anthropology Texas A&M

[R] Dealing with special characters at end of line in file

2018-12-15 Thread J C Nash
I am trying to fix up some image files (jpg) that have comments in them. Unfortunately, many have had extra special characters encoded. rdjpgcom, called from an R script, returns a comment e.g., "In Alvarez Cabral street by no. 105.\\000" I want to get rid of "\\000", but sub seems to be giving

[R] Read text files with Chinese characters

2018-12-15 Thread Patrick Giraudoux
Dear listers, There is number of requests about reading Chinese characters from Excel or text files. I had to cope with the issue and wrote a small manual about it. It might not be an optimal solution, but at least it works :-) One can download the pdf at: https://chrono-environnement.univ-fco