Re: [R] Plots in ioslides and R markdown

2018-08-24 Thread Patrick Connolly
On Thu, 23-Aug-2018 at 07:23AM -0700, Jeff Newmiller wrote: |> This is not reproducible because you have not provided the plot |> code or sample data. Output of sessionInfo would probably be |> appropriate as well. I took it as read that the plotting functions themselves aren't an issue since

Re: [R] looking for formula parser that allows coefficients

2018-08-24 Thread Gabor Grothendieck
The isChar function used in Parse is: isChar <- function(e, ch) identical(e, as.symbol(ch)) On Fri, Aug 24, 2018 at 10:06 PM Gabor Grothendieck wrote: > > Also here is a solution that uses formula processing rather than > string processing. > No packages are used. > > Parse <- function(e) { >

Re: [R] looking for formula parser that allows coefficients

2018-08-24 Thread Gabor Grothendieck
Also here is a solution that uses formula processing rather than string processing. No packages are used. Parse <- function(e) { if (length(e) == 1) { if (is.numeric(e)) return(e) else setNames(1, as.character(e)) } else { if (isChar(e[[1]], "*")) { x1 <- Recall(e[[2]])

[R] installing R 3.5.1

2018-08-24 Thread Bogdan Tanasa
Dear all, I am trying to install R 3.5.1 on my Ubuntu 14.04 system; however, I am getting the following message : sudo apt-get install r-base [...] The following packages have unmet dependencies: r-base : Depends: r-recommended (= 3.5.1-1trusty) but it is not going to be installed E: Unable to

Re: [R] R shared library (/usr/lib64/R/lib/libR.so) not found.

2018-08-24 Thread Rolf Turner
See in-line below. On 08/25/2018 01:10 AM, Ista Zahn wrote: On Thu, Aug 23, 2018 at 6:57 AM Rolf Turner wrote: I *think* that this is an R question (and *not* an RStudio question!) I think this is actually and Ubuntu question, and probably belongs on R-sig-debian. Well, it's about

Re: [R] lattice barchart() with two variables

2018-08-24 Thread Rich Shepard
On Fri, 24 Aug 2018, Richard M. Heiberger wrote: color for the legend comes from trellis.par.get You can control that for an individual plot with the par.settings argument. tmp <- data.frame(y=sample(10), group=rep(c("Median", "Maximum"), each=5),

Re: [R] lattice barchart() with two variables

2018-08-24 Thread Rich Shepard
On Fri, 24 Aug 2018, Bert Gunter wrote: For the legend, you can use the full "key" argument for more control. Bert, This I did. For the scales, again, the docs provide the answer: the "at" and "labels" components of "x" component of the scales lists can explicitly control the x -labels,

Re: [R] Unclear about the output from summary of ca.jo from package urca

2018-08-24 Thread John C Frain
I have posted a reply to your original quesstion on Cross Validated explaining how the notation arises. John C Frain 3 Aranleigh Park Rathfarnham Dublin 14 Ireland www.tcd.ie/Economics/staff/frainj/home.html mailto:fra...@tcd.ie mailto:fra...@gmail.com On Thu, 23 Aug 2018 at 10:12, Ashim Kapoor

Re: [ESS] Hang when opening remote session

2018-08-24 Thread Marcora, Edoardo via ESS-help
I am having the same problem here! I turned tramp logging to the max and discovered that the wrong path to the R executable is used. However, I haven’t yet found a way to fix this… never had a problem before with the same exact setup (but older emacs and ESS versions).

Re: [ESS] Hang when opening remote session

2018-08-24 Thread Marcora, Edoardo via ESS-help
I am having the same issues! I turned on TRAMP logging and the issue seems to be in the fact that ESS send the wrong path to the R executable. However, I haven’t found a way to fix this yet… any idea? I never had a problem before. I have (add-to-list 'tramp-remote-path 'tramp-own-remote-path)

Re: [R] lattice barchart() with two variables

2018-08-24 Thread Bert Gunter
For the legend, you can use the full "key" argument for more control. The docs in ?xyplot for "key" Should answer your questions. "col" controls text color within the "text" component and rectangle color within the "rectangle" component , for example. I think this should work as an alternative to

Re: [R] lattice barchart() with two variables

2018-08-24 Thread Richard M. Heiberger
color for the legend comes from trellis.par.get You can control that for an individual plot with the par.settings argument. tmp <- data.frame(y=sample(10), group=rep(c("Median", "Maximum"), each=5), year=factor(rep(1998:1999, length=10))) barchart(y ~ year,

Re: [R] lattice barchart() with two variables

2018-08-24 Thread Rich Shepard
On Wed, 22 Aug 2018, Rich Shepard wrote: More when I have results. Almost there. I've read the auto.key section in ?barchart and looked at examples from stackoverflow on the web without seeing my syntax errors. I would like help on two issues: 1. What I want is to have the legend text

[R] Obtaining Complete Dataset with Imputed Values

2018-08-24 Thread Paul Bernal
Dear friends, hope all is well with you, I am working with package mi for data inputation. Currently working with R version 3.5.0 (64-bit). Say my data is defined as dat, and I do the following: datimputations <- mi(dat[2:5], n.iter=50) completedat <- complete(datimputations) After using the

Re: [R] Need some help with data-wrangling in R

2018-08-24 Thread Rui Barradas
Hello, Cross-posting is not very well seen by R-Help. Please wait for an answer to one of your posts before posting somewhere else. https://stackoverflow.com/questions/52008756/how-to-get-a-list-of-ip-addresses-from-an-ip-range-using-r Rui Barradas On 24/08/2018 17:34, Amit Govil wrote:

Re: [R] Need some help with data-wrangling in R

2018-08-24 Thread Bert Gunter
" list of network blocks till 3rd octet:" This is incomprehensible to me. If that is so for others, also, I suggest that you provide a reproducible example (see posting guide) to explain what you mean. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along

[R] Need some help with data-wrangling in R

2018-08-24 Thread Amit Govil
Hi, I have log data in which one of the columns have IP ranges and the next column is corresponding ports. Eg: IPRange Port 10.78.64.0-10.78.66.255 D, A, C I need to expand the IPRange column into a list of network blocks till 3rd octet: IPRange IP Port 192.100.176.0-192.100.179.255

Re: [R] Multiple counters in a single for loop

2018-08-24 Thread MacQueen, Don via R-help
I don't know of any such option, but it's easy enough to achieve something more or less equivalent. x <- runif(5) for (ir in seq(nrow(myi <- cbind(x, 1:length(x) { i <- myi[ir,1] j <- myi[ir,2] cat(i,j,'\n') } I consider that for() statement to be ugly and unreadable. Normally I

Re: [R] Multiple counters in a single for loop

2018-08-24 Thread Bert Gunter
Sort of, but you typically wouldn't need to in R because of vectorization, which buries the iteration in the underlying C code. Here's an example that may clarify what I mean: x <- cbind(1:5,6:10) x ## a 2 column matrix ## get squares of all elements of x ## method 1 m1 <-x^2 ##method 2: square

Re: [R] Plots in ioslides and R markdown

2018-08-24 Thread Jeff Newmiller
a) Keep the mailing list in the conversation... someone else may have useful input, and others may benefit from reading the discussion. b) If the issue can be reproduced on your end with something like a basic plot(mpg~disk, data=mtcars) call, then you should use that instead of your

[R] Multiple counters in a single for loop

2018-08-24 Thread Deepa
Hello, Is there an option to include multiple counters in a single for loop in R? For instance, in python there is for i,j in zip(x,range(0,len(x))): Any suggestions? [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] Cant schedule R job using taskscheduleR

2018-08-24 Thread Christofer Bogaso
Hi, I am trying to schedule an R job using taskscheduler_create() function available in package taskscheduleR. Below is my code: > library(taskscheduleR) Warning message: package ‘taskscheduleR’ was built under R version 3.5.1 > taskscheduler_create(taskname = "ABC", rscript =

Re: [R] R shared library (/usr/lib64/R/lib/libR.so) not found.

2018-08-24 Thread Ista Zahn
On Thu, Aug 23, 2018 at 6:57 AM Rolf Turner wrote: > > > I *think* that this is an R question (and *not* an RStudio question!) I think this is actually and Ubuntu question, and probably belongs on R-sig-debian. > > I have, somewhat against my better judgement, decided to experiment with > using

Re: [R] How to add a geom_smooth() line

2018-08-24 Thread Jeff Reichman
Got it thank you From: Riley Finn Sent: Thursday, August 23, 2018 10:24 PM To: reichm...@sbcglobal.net Cc: R-help@r-project.org Subject: Re: [R] How to add a geom_smooth() line Jeff, You need to reshape your data frame. If you use ggplot, you will often have to present your data in

[R] Algorithm Net Analyte Signal (NAS) in R

2018-08-24 Thread Vittorio Colagrande via R-help
Dear R-group I would like to ask a possible algorithm in R and related documetation for the development of analysis "Net Analyte Signal" (NAS) in order to solve of problem of spectral interference in Analytical Chemistry. I will greatly appreciate any clarification you could provide.

Re: [R] Unclear about the output from summary of ca.jo from package urca

2018-08-24 Thread peter dalgaard
Well, reading the code is not much harder than reading the papers (not that that helps much, been there...) I don't actually know the answer, but the notation comes from this bit in ca.jo(): if (spec == "longrun") { ZK <- cbind(x[-c((N - K + 1):N), ], 1)

Re: [R] Unclear about the output from summary of ca.jo from package urca

2018-08-24 Thread Ashim Kapoor
Dear Bert, I have read some of the references. I do understand what the 2 matrices( the cointegrating relationships and the alpha / loading matrix which gives the speed of the mean reversion) are. What I do not understand is the format of the output of the package. My main query is that why do

Re: [R] R shared library (/usr/lib64/R/lib/libR.so) not found.

2018-08-24 Thread Berwin A Turlach
G'day Peter, On Thu, 23 Aug 2018 08:45:37 -0700 Peter Langfelder wrote: > The manual, specifically > > https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Installation > > documents this way of choosing the installation directory. Yes, with the caveat that one needs GNU or Solaris