Re: [R] value of variable in ls()

2015-10-18 Thread jim holtman
Is this what you want:: > a <- 1 > b <- 2 > # get current objects > x <- ls() > # create list of values > my_list <- lapply(x, get) > # now add the names > names(my_list) <- x > my_list # print values $a [1] 1 $b [1] 2 Jim Holtman Data Munger Guru What is the problem that you are trying to

[R] package or namespace load failed for ‘dismo’

2015-10-18 Thread Jefferson Ferreira-Ferreira
Hello everyone. I installed dismo package, but I've been receiving the following loading error: *Loading required package: raster* *Loading required package: sp* *Error : .onLoad failed in loadNamespace() for 'dismo', details:* * call: NULL* * error: 'tmpDir' It is not an exported object

Re: [R] condition in triple summation

2015-10-18 Thread Jeff Newmiller
Learn to post using plain text format. We are seeing garbage on the screen. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live

Re: [R] Replace NaN with value from the same row

2015-10-18 Thread Jonathan Reardon
Ok, i will do, thanks for your help. J > Subject: RE: [R] Replace NaN with value from the same row > From: jdnew...@dcn.davis.ca.us > Date: Sun, 18 Oct 2015 12:55:14 -0700 > To: jonathanrear...@outlook.com > CC: r-help@r-project.org > > You should (re-)read the intro document that comes with R,

[R] condition in triple summation

2015-10-18 Thread Sherouk Moawad via R-help
Dear R-Expertsx=c(0,0.3, 0.5,0.6)sum(sapply(1:4, function(i) {sum(sapply(1:3, function(j){sum(sapply(1:2, function(k) {(i>j)*(j>k)*exp(x[i]+x[j]+x[k])}))}))})) I want to restrict the condition (i>j>k) to only those cases where i>1>1>1In other words'if i=1 then i>=jif j=1 then j>=kother wise

Re: [R] package or namespace load failed for ‘dismo’

2015-10-18 Thread Jeff Newmiller
I don't know why this is happening for you, but if you want help here the Posting Guide asks you to update your R to the latest version first, since new packages sometimes won't work in old versions of R. --- Jeff Newmiller

Re: [R] How to plot shades between curves?

2015-10-18 Thread Jim Lemon
Hi Jackson, >From your description, I think you are trying to illustrate the deviation of Capa.diss, so I will offer an entirely different method. If you do want the primary line on the left of the plot with a big space on the right, presumably to add more stuff there, try this:

Re: [R] Replace NaN with value from the same row

2015-10-18 Thread Jeff Newmiller
You should (re-)read the intro document that comes with R, "An Introduction to R". Pay particular attention to sections 2., 2.7, and 5.2. The "idx" variable that I defined is a vector in the current environment (in your case apparently a local function environment). It is not a column in your

[R] Problem with custom.model.names in plotreg (texreg)

2015-10-18 Thread Antonello Preti
Hi, I need some advice. I'm using the package 'texreg' to extract effects in a multinomial model. While using the 'plotreg' command I've got a problem with the subcommand 'custom.model.names'. I'm able to have this subcommand working with the 'screenreg' command. However, when I use the

[R] value of variable in ls()

2015-10-18 Thread Christian Hoffmann
This may seem trivial: ls() gives me names of variables as a character vector. How can I print the values 'behind' those character values: ls() > "a" > a [1] 5 How can I do e.g. print("unknown"(ls())) and get the variable values in my current environment? -- Christian W. Hoffmann CH -

Re: [R] How to plot shades between curves?

2015-10-18 Thread Benno Pütz
> > plot(Capa.diss,Capa.diss.age,ylim = > rev((range)(Capa.diss.age=c(min(Capa.diss.age), > 10500))),xlim=(c(0,30)),type="l") > Capa.diss2<-Capa.diss*0.7 > par(new=TRUE) > plot(Capa.diss2, Capa.diss.age, col='black',type="l",ylim = > rev((range)(Capa.diss.age=c(min(Capa.diss.age), 10500))), >

[R] R package related to solving calibration transfer problem

2015-10-18 Thread islah na
Hi, I'm new to R (and also chemometrics). I have problem using same calibration model on spectrums obtained from two spectrometers of same brand. There's little different in the wavelength, less than 1 nm though and also different in their intensity level. What i understand, this problem is a

[R] A question about SDE package

2015-10-18 Thread Shojaei Arani, Mohammad
Hello Friends, I am trying to use the functions ksdrift and ksdiff both in SDE package. Unfortunately. It does not work for my data (attached). The following code shows how I tried to use it: setwd("D:/Mohammad/Different/New folder") mydata <- read.csv("Best.csv", header=FALSE)

Re: [R] value of variable in ls()

2015-10-18 Thread ruipbarradas
Hello, I'm not sure I understand, but something like this? a <- 5 get("a") See ?get Hope this helps, Rui Barradas   Citando Christian Hoffmann : > This may seem trivial: > > ls() gives me names of variables as a character vector. How can I print > the values 'behind'

Re: [R] Replace NaN with value from the same row

2015-10-18 Thread Jeff Newmiller
Please reply to all so the answers are seen on the mailing list, where my mistakes can be corrected and others can learn from any valid answers I manage to provide. I warned you that df is the name of a common function. I used the name of the variable that you referred to in your question,

Re: [R] No speed up using the parallel package and ncpus > 1 with boot() on linux machines

2015-10-18 Thread Chris Evans
As with Milan's answer: perfect explanation and hugely appreciated. A few follow up questions/comments below. - Original Message - > From: "Jeff Newmiller" > To: "Chris Evans" > Cc: r-help@r-project.org > Sent: Saturday, 17 October, 2015

Re: [R] No speed up using the parallel package and ncpus > 1 with boot() on linux machines

2015-10-18 Thread Chris Evans
- Original Message - > From: "Milan Bouchet-Valat" > To: "Chris Evans" , r-help@r-project.org > Sent: Saturday, 17 October, 2015 18:13:40 > Subject: Re: [R] No speed up using the parallel package and ncpus > 1 with > boot() on linux machines >

[R] How to plot shades between curves?

2015-10-18 Thread Jackson Rodrigues
Dear all, I have to compare several curves that range through different scales (x axis) along the same time, so to make them comparable I brought all of them to the same scale (x axis) and obviously kept the age axis (y axis) for all of them. As result, some variations (wiggles) simply

Re: [R] How to plot shades between curves?

2015-10-18 Thread Ben Tupper
Hi, Thanks for the reproducible example! (Don't forget to make your email client send text-only messages, not html, when sending to this list). Would log scale work for you? Capa.diss<-c(0.7261102, 0.6655960, 0.5638357,0.8585834,0.6964527,0.8434504,

[R] Replace NaN with value from the same row

2015-10-18 Thread Jonathan Reardon
Hi everyone, A simple question, but i cannot figure this out. I have a data-frame with 4 columns (onset, offset, outcome, mean): onset offset outcome mean8 72071 72503 1 7244615 142598 143030 1NaN30 293729 294161 1 294080 For each 'NaN' in the mean column, i want to

Re: [R] Replace NaN with value from the same row

2015-10-18 Thread Jeff Newmiller
Next time send your email using plain text format rather than HTML so we see what you saw. Try idx <- is.na( df$mean ) df[ idx, "mean" ] <- df[ idx, "offset" ] BTW there is a commonly-used function called df, so you might improve clarity by using DF for your temporary data frame name.

[R] Replace NaN from 1 column with a value from the same row

2015-10-18 Thread Jonathan Reardon
Hi everyone, Ignore my previous post, i realised that the rows and columns i typed into the email were unreadable, sincere apologies for this. A simple question, but i cannot figure this out. I have a data-frame with 4 columns (onset, offset, outcome, mean):