Re: [R] inconsistency in display of character vector....

2018-07-08 Thread Eric Berger
> If (identical(snlcqn, snlcqna)) snlcqn else snlcqna ?? Why not just always return snicqna ? On Mon, Jul 9, 2018 at 9:43 AM, PIKAL Petr wrote: > Hi > > You definitely should not use HTML formated mail. This is plain text > mailing list for reason. > > If you experience space between "NSE/"

Re: [R] inconsistency in display of character vector....

2018-07-08 Thread PIKAL Petr
Hi You definitely should not use HTML formated mail. This is plain text mailing list for reason. If you experience space between "NSE/" and pasted second part, you should read paste help page which states paste (..., sep = " ", collapse = NULL) so it has space as separator. You should use pa

Re: [R] about ECDF display in ggplot2

2018-07-08 Thread Bogdan Tanasa
Dear Jeff, thank you for your email. Yes, in order to be more descriptive/comprehensive, please find attached to my email the following files (my apologies ... I am sending these as attachments, as I do not have a web server running at this moment) : -- the R script (R_script_display_ECDF.R) tha

Re: [R] replicate rows

2018-07-08 Thread radmuzom .
While Eric's solution should work for your case, here is a slightly more general version where the number of replications is dependent on a column in the data frame. In the example, the number of replications required is the ceiling of the number of 30 day intervals between start date and end da

Re: [R] inconsistency in display of character vector....

2018-07-08 Thread MacQueen, Don via R-help
In addition to what Ben and Jeff have said, I think you can simplify your function considerably. See these examples: > substr( c('abc', 'abcd','abcde') , c(2,1,3), c(2,2,4)) [1] "b" "ab" "cd" > foo <- c('abc', 'abcd','abcde') > substr( foo , 1, nchar(foo)-2) [1] "a" "ab" "abc" > foo <- c('

Re: [R] Fwd: Question

2018-07-08 Thread Hasan Diwan
Farshad, On Sun, 8 Jul 2018 at 09:29, Farshad Fathian wrote: > > Thank you so much for your reply. But when I install the "RWinEdt" package, > the R unable to install it. I see the below warning: > > "Error: package or namespace load failed for ‘RWinEdt’: > package ‘RWinEdt’ was installed by an R

Re: [R] Fwd: Question

2018-07-08 Thread Jeff Newmiller
I recommend that you post the output of sessionInfo() and copy-paste the commands you attempted to use that failed. Note that I don't use this package or its associated non-free editor, but the CRAN installation check shows no significant problems, though the package hasn't been updated recentl

Re: [R] Fwd: Question

2018-07-08 Thread Farshad Fathian
Thank you so much for your reply. But when I install the "RWinEdt" package, the R unable to install it. I see the below warning: "Error: package or namespace load failed for ‘RWinEdt’: package ‘RWinEdt’ was installed by an R version with different internals; it needs to be reinstalled for use wit

[R] Help with mixOmics rcc-tune

2018-07-08 Thread Kim O
Dear, I am using the mixOmics rCCA package, but I am encountering a problem that I cannot solve with the documentation only: *How should I interpret the "optimal score" (opt.score) returned by tune.rcc? * It does not say what this score actually represent? My best guess would be the average c

Re: [R] Fwd: Question

2018-07-08 Thread Jeff Newmiller
Read the vignette at [1], which mentions the Read me.txt file [2]. I found both links using Google... you could too. [1] https://cran.r-project.org/web/packages/RWinEdt/index.html. [2] https://github.com/cran/RWinEdt/blob/master/inst/ReadMe.txt On July 8, 2018 7:08:53 AM PDT, Farshad Fathian w

Re: [R] Do there need to be the same number of y-values for each x-value when using tapply?

2018-07-08 Thread Martin Maechler
The answer to your Q is surely a "no": That's exaxtly the point of tapply that the number of y values may vary. The msg tells you that the x & y full vectors must have the same length. Hoping that helps. Martin [[alternative HTML version deleted]]

[R] Fwd: Question

2018-07-08 Thread Farshad Fathian
Dear all, Hello, I am going to install the “RWinEdt” package on R software. I had installed it on R before, but when I downloaded the newest versions of R software (R-3.4.3 and R-3.5.1 versions), this package is not installed on it. Please help and guide me to know how I can install and use th

Re: [R] consider running tools::compactPDF(gs_quality = "ebook")

2018-07-08 Thread Bert Gunter
I believe R-package-devel is the right place to post this, not r-help. See https://www.r-project.org/mail.html for details. Cheers, Bert 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 "Bloo

Re: [R] Fw: inconsistency in display of character vector....

2018-07-08 Thread Jeff Newmiller
Using dput and sending your questions with the plain text option as described in [1] will allow you to share your data with less ambiguity. To be sure you have supplied all the code needed for us to reproduce your problem, use [3]. [1] http://stackoverflow.com/questions/5963269/how-to-make-a-gr

Re: [R] inconsistency in display of character vector....

2018-07-08 Thread Ben Tupper
Hi, You will be hard pressed to get helpful answers as you have not provided any way for list readers to replicate your data and code. Check out this https://rseek.org/?q=reproducible+example On the other hand, ... (1) I have a hunch that one place you are getting tripped up by your effort t

Re: [R] replicate rows

2018-07-08 Thread Eric Berger
Hi Catalin, This should work. I set the number of repetitions and sample sizes as variables so it would be clear how to modify for your actual case. nreps<- 3 sampSize <- 2 w <- unlist( lapply(1:nreps, function(i) { rep(paste("R",i,sep=""),sampSize) } ) ) aa2 <- cbind( as.data.frame(aa), w)

[R] replicate rows

2018-07-08 Thread catalin roibu
Dear R users, I want to replicate sampled rows in data frame. The sampling results must be in this form: a b Rep [1,] 3 4.0 R1 [2,] 6 8.0 R1 [3,] 1 0.1 R2 [4,] 6 8.0 R2 [5,] 1 0.1 R3 [6,] 5 7.0 R3 I have a code but I didn't succeed to insert to rep column. This is my code: a<-c(1,2,3,4,

[R] consider running tools::compactPDF(gs_quality = "ebook")

2018-07-08 Thread Søren Højsgaard
Dear all, I run R CMD build --compact-vignettes="both" gRbase and/or R CMD build --compact-vignettes="gs+qpdf" gRbase and in the log from r-devel (on winbuilder) I get * checking sizes of PDF files under 'inst/doc' ... WARNING 'gs+qpdf' made some significant size reductions: compacte