[R] reg expr that retains only bracketed text from strings

2019-06-11 Thread nevil amos
Hi I am trying to extract only the text contained in brackets from a vector of strings not all of the strings contain closed bracketed text, they should return an empty string or NA this is what I have at the moment mystrings<-c("ABC","A(B)C","AB(C)") substring(mystrings, regexpr("\\(|\\)",

Re: [R] Changing the label name in the plot

2019-06-11 Thread Subhamitra Patra
Hello Sir, Thank you very much for your help for which I shall be always grateful to you. Concerning your questions, "*1) Are the states in column 3 the same as those in column 1? As you initially named the data frame "ts", perhaps the values in columns 2 and are taken at different times. If

Re: [R] Changing the label name in the plot

2019-06-11 Thread Jim Lemon
Hi Subhamitra, It is time to admit that I had the wrong idea about what you wanted to do, due to the combination of trying to solve two problems at once while I was very tired. I appreciate your patience. >From your last email, you have a data frame with four columns. The first and third are

Re: [R] LaTeX Error in creating manual from Rd files

2019-06-11 Thread Duncan Murdoch
On 11/06/2019 5:54 p.m., Helmut Schütz wrote: Hi, I’m getting -- many -- errors/warnings (both when uploading to win-builder.r-project.org as well as locally): * checking PDF version of manual ... WARNING LaTeX errors when creating PDF version. This typically indicates Rd problems. LaTeX errors

[R] LaTeX Error in creating manual from Rd files

2019-06-11 Thread Helmut Schütz
Hi, I’m getting -- many -- errors/warnings (both when uploading to win-builder.r-project.org as well as locally): * checking PDF version of manual ... WARNING LaTeX errors when creating PDF version. This typically indicates Rd problems. LaTeX errors found: ! LaTeX Error: Something's

Re: [R] [Rd] Open a file which name contains a tilde

2019-06-11 Thread Travers Ching
Hi Gabriel, It may be bad practice, but you don't always have control over the file name. E.g. if someone shares a file with a tilde in it -- yes it is simple to rename but it is extra time, and you might not bother to rename a file without foreknowledge of this bug in the first place. Even

Re: [R] [Rd] Open a file which name contains a tilde

2019-06-11 Thread Gabriel Becker
Hi Frank, I'm hesitant to be "that guy", but in case no one else has brought this up to you, having files with a tilde in their names (generally but especially on a linux system, where ~ in file names has a very important special meaning in some cases, as we know) strikes me as an exceptionally

Re: [R] [Rd] Open a file which name contains a tilde

2019-06-11 Thread Duncan Murdoch
On 11/06/2019 4:34 p.m., William Dunlap via R-devel wrote: Note that R treats tildes in file names differently on Windows and Linux. On Windows, it is only replaced if it it at the beginning of the line and is followed by a forward or backward slash or end-of-line. On Linux it is replaced no

Re: [R] [Rd] Open a file which name contains a tilde

2019-06-11 Thread William Dunlap via R-help
Note that R treats tildes in file names differently on Windows and Linux. On Windows, it is only replaced if it it at the beginning of the line and is followed by a forward or backward slash or end-of-line. On Linux it is replaced no matter where it is in the text and ~someUser will be replaced

Re: [R] [Rd] Open a file which name contains a tilde

2019-06-11 Thread Frank Schwidom
Hi Gabriel, I actually want to make renames over thousands of files. But if I am not able to express the source filename of the rename operation I will not be able to get the work done. Besides the fact that there are issues I think that R is qualified for solving my problem by the method how

Re: [R] Changing the label name in the plot

2019-06-11 Thread Bert Gunter
OK. Thanks, Petr. 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 Tue, Jun 11, 2019 at 7:22 AM PIKAL Petr wrote: > Hi Bert > > names(ts) > [1] "Name" "DMs"

Re: [R] Changing the label name in the plot

2019-06-11 Thread Subhamitra Patra
Hello Sir, No, two data columns don't have the same names. 1st columns contain the data from the developed markets, whereas the 2nd columns from the emerging markets, but I provided the same header name as name, and name.1. But, whatever clustering method I got from the R bloggers that they are

Re: [R] Changing the label name in the plot

2019-06-11 Thread PIKAL Petr
Hi Bert names(ts) [1] "Name" "DMs""Name.1" "EMs" > R is clever enough not to end with same name. My error comes from ts not to be all numeric. However OP error is different therefore it is something weird with original data. Cheers. Petr From: Bert Gunter Sent: Tuesday, June 11,

Re: [R] Changing the label name in the plot

2019-06-11 Thread Bert Gunter
There appear to be two columns with the same name. Surely this will cause problems. 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 Tue, Jun 11, 2019 at 3:19

Re: [R] Parallel processes collapse into one

2019-06-11 Thread Nicola Lunardon
Hi, thanks for the hints. I am quite sure that at some points R stalls as I am used to monitor the progress of simulations (with a custom function similar to pbmclapply) and save partial results: whenever all R instances collapse into one, then no more updates show up. I was able to set

Re: [R] R-help mailing list archives

2019-06-11 Thread Marc Schwartz via R-help
> On Jun 11, 2019, at 4:03 AM, Martin Maechler > wrote: > >> Brent via R-help >>on Sun, 9 Jun 2019 03:07:38 + writes: > > [..] > [..] > [..] > >> This email list's archives: > >> Apologies in advance if this question has been

Re: [R] Changing the label name in the plot

2019-06-11 Thread PIKAL Petr
Hi Ts should be numeric matrix if I read the help page correctly. However I get different error message > k2 <- kmeans(ts, centers = 2, nstart = 25) Error in do_one(nmeth) : NA/NaN/Inf in foreign function call (arg 1) In addition: Warning message: In storage.mode(x) <- "double" : NAs introduced

Re: [R] [Rd] Open a file which name contains a tilde

2019-06-11 Thread Frank Schwidom
Hi, yes, I have seen this package and it has the same tilde expanding problem. Please excuse me I will cc this answer to r-help and r-devel to keep the discussion running. Kind regards, Frank Schwidom On 2019-06-11 09:12:36, Gábor Csárdi wrote: > Just in case, have you seen the fs package? >

Re: [R] Changing the label name in the plot

2019-06-11 Thread Subhamitra Patra
Hello Sir, Thank you very much for your help. I tried your suggestion but got some error, which I am pasting below. Error: unexpected symbol in: " header" > library(cluster) Warning message: package ‘cluster’ was built under R version 3.5.3 > k2 <- kmeans(ts, centers = 2, nstart =

Re: [R] Changing the label name in the plot

2019-06-11 Thread Jim Lemon
Hi Subhamitra, I don't have the factoextra package, but this may give you what you want: ts<-read.table(text="Name DMs Name EMs A 2.071 a 2.038 B 2.0548 b 2.017 C 2.0544 c 2.007 D 2.047 d 1.963 E 2.033 f 1.947 F 2.0327 g 1.942 G 2.0321 h 1.932 H 2.031 i 1.924 I 2.0293 j 1.913 J 2.0291 k 1.906 K

[R] R-help mailing list archives

2019-06-11 Thread Martin Maechler
> Brent via R-help > on Sun, 9 Jun 2019 03:07:38 + writes: [..] [..] [..] > This email list's archives: > Apologies in advance if this question has been asked and > answered many times already. > But know that

Re: [R] Changing the label name in the plot

2019-06-11 Thread Subhamitra Patra
Ok Sir. I am sorry that I was not knowing this thing. So, now I am pasting my data below. Name DMs Name EMs A 2.071 a 2.038 B 2.0548 b 2.017 C 2.0544 c 2.007 D 2.047 d 1.963 E 2.033 f 1.947 F 2.0327 g 1.942 G 2.0321 h 1.932 H 2.031 i 1.924 I 2.0293 j 1.913 J 2.0291 k 1.906 K 2.027 l 1.892 L

Re: [R] Changing the label name in the plot

2019-06-11 Thread PIKAL Petr
Attachments are not alowed (mostly) on this list. Use ?dput to show your data or at least part of your data illustrating the problém. Cheers Petr -Original Message- From: R-help On Behalf Of Subhamitra Patra Sent: Tuesday, June 11, 2019 8:05 AM To: ঋষি ( ऋषि / rIsHi ) Cc: r-help

Re: [R] Changing the label name in the plot

2019-06-11 Thread Subhamitra Patra
Please find the attached data. [image: Mailtrack] Sender notified by Mailtrack 06/11/19, 12:32:48 PM On Tue, Jun 11, 2019 at