Re: [R] Lattice xyplot(): adding a legend

2016-10-19 Thread David Winsemius
> On Oct 19, 2016, at 4:04 PM, Rich Shepard wrote: > > On Wed, 19 Oct 2016, Rich Shepard wrote: > >> I did read that but mis-applied what I read. Tried auto.key but that did >> not work as desired. Now I know to learn how to apply 'key'. > > Almost there after

Re: [R] Lattice xyplot(): adding a legend

2016-10-19 Thread Duncan Mackay
I had not seen Davids reply so will add to my note The legend is for special keys or multiple keys eg https://stat.ethz.ch/pipermail/r-help/2010-May/240341.html It may involve draw.key() Duncan -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Duncan

Re: [R] Lattice xyplot(): adding a legend

2016-10-19 Thread Duncan Mackay
Hi Rich Without an example to check I think you need to fill in the arguments for par.settings eg par.settings = list(plot.symbol = list(c("black","red","dark green","dark blue","dark goldenrod","purple"), pch = 20,

Re: [R] Optimize selected variables but not all - nloptr

2016-10-19 Thread ProfJCNash
I refer to such parameters as "masked" in my 2014 book Nonlinear parameter optimization with R tools. Recently I put package optimrx on R-forge (and optimr with fewer solvers on CRAN) that allows for masks with all the parameters. The masks can be specified as you suggest with

Re: [R] Optimize selected variables but not all - nloptr

2016-10-19 Thread Jeff Newmiller
You provided the data but not the broken code. -- Sent from my phone. Please excuse my brevity. On October 19, 2016 2:59:08 PM PDT, Narendra Modi wrote: >Hello All, >I have a matrix with initial values as below and I need to optimize >the variables that are greater than

Re: [R] Lattice xyplot(): adding a legend

2016-10-19 Thread Rich Shepard
On Wed, 19 Oct 2016, Rich Shepard wrote: I did read that but mis-applied what I read. Tried auto.key but that did not work as desired. Now I know to learn how to apply 'key'. Almost there after another careful reading Section 9.2.3 ff in the book. Here's the command to produce the plot:

Re: [R] Finding starting values for the parameters using nls() or nls2()

2016-10-19 Thread dave fournier
Actually this converges very nicely if you use these starting values that I obtained with AD Model Builder th 9.1180e-01 b05.2104e+00 b1 -4.6725e-04 The R result looks like nls.m2 Nonlinear regression model model: Retention ~ expFct(Area, b0, b1, th) data:

[R] Optimize selected variables but not all - nloptr

2016-10-19 Thread Narendra Modi
Hello All, I have a matrix with initial values as below and I need to optimize the variables that are greater than 0. TAU fij fij2 [1,] 14.33375 0.000 0.01449572 [2,] 14.33375 0.000 0. [3,] 14.33375 0.000 0. [4,] 14.33375 0.000 0.02206446

Re: [R] Confidence interval on quantile regression (quantreg)

2016-10-19 Thread Cade, Brian
Depending on the procedure used for estimating the CI, especially if the default rankscore inversion method, then it is possible that legitimate end points of the intervals for some quantiles with a given alpha (e.g., 0.05 for 95% CI) cannot be refined beyond plus or minus infinity. Of course,

Re: [R] read.table() question

2016-10-19 Thread Rich Shepard
On Wed, 19 Oct 2016, Duncan Murdoch wrote: I don't get that from those 9 observations, so there's likely something else going on further down in the file. Duncan, Sigh. I thought I had removed all 'T's (for trace amounts) from the file, but I hadn't. Yes, this explains it. Many thanks,

Re: [R] read.table() question

2016-10-19 Thread Marc Schwartz
> On Oct 19, 2016, at 4:12 PM, David Winsemius wrote: > > >> On Oct 19, 2016, at 1:54 PM, Rich Shepard wrote: >> >> The file, daily_records.dat, contains these data: >> >> "station","date","amount" >> "0.3E",2014-01-01, >> "0.3E",2014-01-02,

Re: [R] Error message in SIS package

2016-10-19 Thread Maity, Arnab K
Thank you all. That helps. I provided "x" as matrix. Actually the data is huge. When I work with a small subset of the data the error goes away. Let me try to post a reproducible data which can throw the same error. Arnab Kumar Maity Department of Statistics Texas A University 3143 TAMU, Room

Re: [R] read.table() question

2016-10-19 Thread Duncan Murdoch
On 19/10/2016 4:54 PM, Rich Shepard wrote: The file, daily_records.dat, contains these data: "station","date","amount" "0.3E",2014-01-01, "0.3E",2014-01-02, "0.3E",2014-01-03,0.01 "0.3E",2014-01-04,0.00 "0.3E",2014-01-05,0.00 "0.3E",2014-01-06,0.00 "0.3E",2014-01-07,0.10

[R] read.table() question

2016-10-19 Thread Rich Shepard
The file, daily_records.dat, contains these data: "station","date","amount" "0.3E",2014-01-01, "0.3E",2014-01-02, "0.3E",2014-01-03,0.01 "0.3E",2014-01-04,0.00 "0.3E",2014-01-05,0.00 "0.3E",2014-01-06,0.00 "0.3E",2014-01-07,0.10 "0.3E",2014-01-08,0.22 "0.3E",2014-01-09,0.49 Using

Re: [R] rsync: failed to connect to cran.r-project.org (137.208.57.37): No route to host (113)

2016-10-19 Thread Duncan Murdoch
On 19/10/2016 11:36 AM, Etienne Borocco wrote: Hello, I folowed this tutorial here: http://singmann.org/installing-r-devel-on-linux/ I tried to install r-dev to compile gstoos that I can't manage to compile now on my ubuntu 16.04 distribution. I get an error with rsync: 1. bash

Re: [R] Error message in SIS package

2016-10-19 Thread David Winsemius
> On Oct 17, 2016, at 1:54 PM, Maity, Arnab K wrote: > > I try to run the following code: > > sis.fit <- SIS(y = Surv(time = y[, 1], event = y[, 2]), x = x, family = > "cox", penalty = "lasso", tune = "cv", > nfolds = 10, type.measure = "deviance", nsis =

[R] Use optim with multiple processors

2016-10-19 Thread Eva Liliane Ujeneza
Dear all, I am trying to estimate the parameters* 3N + 2 *of a function using optim, using a big longitudinal dataset of *N* patients observations. I defined two functions: funct0 which calculate the residual sum of square for a single individual, and *funct1* which calls funct0 using multiple

[R] rsync: failed to connect to cran.r-project.org (137.208.57.37): No route to host (113)

2016-10-19 Thread Etienne Borocco
Hello, I folowed this tutorial here: http://singmann.org/installing-r-devel-on-linux/ I tried to install r-dev to compile gstoos that I can't manage to compile now on my ubuntu 16.04 distribution. I get an error with rsync: 1. bash ./tools/rsync-recommended There is the output of the shell:

Re: [R] Lattice xyplot(): adding a legend

2016-10-19 Thread Rich Shepard
On Wed, 19 Oct 2016, David Winsemius wrote: The `legend` function is used with base graphics plotting (as is the par function). David, And that's how I used it before so it is the wrong template for this plot. Mea culpa! I think you might first read ?Lattice since it makes reference to

Re: [R] Lattice xyplot(): adding a legend

2016-10-19 Thread David Winsemius
> On Oct 19, 2016, at 10:48 AM, Rich Shepard wrote: > > After reading ?xyplot and pages 161-162 in Deepayan's book I'm still not > getting the syntax correct to add a legend to a scatterplot. The data are > attached as filename rain.dput. > > Without the legend (and

Re: [R] nls.lm

2016-10-19 Thread David Winsemius
> On Oct 19, 2016, at 12:16 PM, Mike meyer <1101...@gmx.net> wrote: > > How do you reply to a specific post on this board instead of the thread? > I am too incompetent to find this out myself. Most of us use a mail-client that supports 'reply-to-all'. And the Posting Guide asks you to include

[R] nls.lm

2016-10-19 Thread Mike meyer
How do you reply to a specific post on this board instead of the thread? I am too incompetent to find this out myself. Thanks, Michael unaffiliated __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

[R] Escaping quotes WAS: Storing long string with white space in variable

2016-10-19 Thread Charles C. Berry
On Wed, 19 Oct 2016, g.maub...@weinwolf.de wrote: Hi All, I would like to store a long string with white space in a variable: -- cut -- # Create README.md readme <- "--- title: "Your project title here" author: "Author(s) name(s) here" date: "Current date here" output: html_document ---

[R] Lattice xyplot(): adding a legend

2016-10-19 Thread Rich Shepard
After reading ?xyplot and pages 161-162 in Deepayan's book I'm still not getting the syntax correct to add a legend to a scatterplot. The data are attached as filename rain.dput. Without the legend (and testing interactively) the data plot but not the legend. Sourcing the script opens the

Re: [R] nls.lm

2016-10-19 Thread Berend Hasselman
> On 19 Oct 2016, at 19:12, Mike meyer <1101...@gmx.net> wrote: > >> From my reading of the above cited document I get the impression that the >> algorithm > (algorithm 3.16, p27) can easily be adapted to handle the case m In this case the Jacobian Jf(x) is mxn and the matrix A(x)=Jf(x)'Jf(x)

[R] nls.lm

2016-10-19 Thread Mike meyer
And finally, to put to rest the notion that the number of residuals is in any way significant for the solution of the least squares problem I submit to you the function f(x,y)=(x²+y²)² of 2 variables but only one residual f_1(x,y)=x²+y² which nonetheless has a unique minimum at the point

Re: [R] nls.lm

2016-10-19 Thread peter dalgaard
> On 19 Oct 2016, at 17:47 , Mike meyer <1101...@gmx.net> wrote: > Jf(x)'Jf(x) nonsingular, for all x, is a reasonable condition, m>=n is not. If Jf(x) has more columns than rows, then Jf(x)'Jf(x) is certainly singular. The reverse is not true, but what's wrong with a simple pre-check? What

[R] nls.lm

2016-10-19 Thread Mike meyer
>From my reading of the above cited document I get the impression that the >algorithm (algorithm 3.16, p27) can easily be adapted to handle the case m 0 and so the system becomes ill conditioned. Why can we not get around this as follows: as soon as mu is below some threshold we solve instead

[R] Confidence interval on quantile regression (quantreg)

2016-10-19 Thread Frank Black
Hi all, I am using the quantile regression package for estimating some models. However, in some cases the intervals' upper bounds are either abnormally high or low, with values such as -1.797693e+308 or 1.797693e+308. Actually, the number is the same in absolute terms. Does anyone know a

Re: [R] create n suffixes of length 1:n from string of length n

2016-10-19 Thread David Winsemius
> On Oct 19, 2016, at 9:41 AM, Jeff Newmiller wrote: > > When I replace length with nchar, it works fine for me without mapply. > > substr( rep( s, nchar(s) ), 1, seq.int( nchar(s) ) ) I failed to make the second `nchar` -> `length` substitution. It now works for me

Re: [R] Error installing packages

2016-10-19 Thread Richard M. Heiberger
I run into this type of problem quite frequently on Windows. I see no rhyme or reason for when it happens. It seems random as to which package it can't move. The problem is at least a year old, and bit one of my students yesterday. The specific is that there is a problem with copying from a

Re: [R] create n suffixes of length 1:n from string of length n

2016-10-19 Thread Jeff Newmiller
When I replace length with nchar, it works fine for me without mapply. substr( rep( s, nchar(s) ), 1, seq.int( nchar(s) ) ) -- Sent from my phone. Please excuse my brevity. On October 19, 2016 9:36:25 AM PDT, David Winsemius wrote: > >> On Oct 19, 2016, at 8:44 AM,

Re: [R] create n suffixes of length 1:n from string of length n

2016-10-19 Thread David Winsemius
> On Oct 19, 2016, at 8:44 AM, Jeff Newmiller wrote: > > These don't look like "suffixes" to me, but whatever. > > s <- "abc" > substr( rep( s, length(s) ), 1, seq.int( length(s) ) ) I suspect that `nchar` was meant instead of `length` but it still failed. How

Re: [R] nls.lm

2016-10-19 Thread ProfJCNash
I sometimes find it useful to use nonlinear least squares for fitting an approximation i.e., zero residual model. That could be underdetermined. Does adding the set of residuals that is the parameters force a minimum length solution? If the equations are inconsistent, then the residuals apart

Re: [R] Split strings based on multiple patterns

2016-10-19 Thread Joe Ceradini
Thanks for the additional approach, Greg. I had success with Gabor's recommendation but will take a look at gsubfn as well. Joe On Wed, Oct 19, 2016 at 10:19 AM, Greg Snow <538...@gmail.com> wrote: > I would suggest looking at the strapply function in the gsubfn > package. That gives you more

Re: [R] Split strings based on multiple patterns

2016-10-19 Thread Greg Snow
I would suggest looking at the strapply function in the gsubfn package. That gives you more flexibility in specifying what to look for in the structure of the data, then extract only those pieces that you want. On Fri, Oct 14, 2016 at 5:16 PM, Joe Ceradini wrote: >

[R] nls.lm

2016-10-19 Thread Mike meyer
Make that f(x,u)=||x||². __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal,

Re: [R] install R in relative path

2016-10-19 Thread Tom Graves via R-help
Thanks.  I will give this a try.  I was doing the install step and trying to configure the relative path before. Tom On Wednesday, October 19, 2016 3:38 AM, Martin Maechler wrote: > Tom Graves via R-help >    on Tue, 18 Oct

[R] nls.lm

2016-10-19 Thread Mike meyer
@SE: yes, not every system of equations with more variables than equations is solvable, we need an additional condition e.g. full rank of the coefficient matrix. Uniqueness of the solution was not required. @BH: Yes this is the document, it is a nice presentation. I did not read the first page

Re: [R] create n suffixes of length 1:n from string of length n

2016-10-19 Thread Jeff Newmiller
These don't look like "suffixes" to me, but whatever. s <- "abc" substr( rep( s, length(s) ), 1, seq.int( length(s) ) ) -- Sent from my phone. Please excuse my brevity. On October 19, 2016 8:01:10 AM PDT, Witold E Wolski wrote: >Is there a build in function, which creates

Re: [R] Error installing packages

2016-10-19 Thread David Winsemius
> On Oct 19, 2016, at 4:54 AM, Kevin E. Thorpe wrote: > > Hello. > > I am posting this on behalf of one of my students who is getting error > messages when installing some packages. I have not seen this before nor have > I been able to replicate it. I'm including

Re: [R] Bootstrapping in R

2016-10-19 Thread Bryan Mac
Hi, After running the bootstrapping, I would like to the output of the bootstrapped samples. How can I view the bootstrapped samples of each variable? Bryan Mac bryanmac...@gmail.com > On Oct 18, 2016, at 3:57 AM, Rui Barradas wrote: > > It means that the sd of the

Re: [R] nls.lm

2016-10-19 Thread Berend Hasselman
> On 19 Oct 2016, at 14:09, Mike meyer <1101...@gmx.net> wrote: > > @pd: you know that a System of equations with more variables than equations > is always solvable > and if a unique solution is desired one of mimimal norm can be used. > Not true. Take the system with 3 variables and 2

Re: [R] create n suffixes of length 1:n from string of length n

2016-10-19 Thread Bob Rudis
purrr::map(paste0(letters, collapse=""), ~purrr::map2_chr(., 1:nchar(.), ~substr(.x, 1, .y)))[[1]] seems to crank really fast at least on my system what did you try that was slow? On Wed, Oct 19, 2016 at 11:01 AM, Witold E Wolski wrote: > Is there a build in function, which

[R] create n suffixes of length 1:n from string of length n

2016-10-19 Thread Witold E Wolski
Is there a build in function, which creates n suffixes of length 1:n from string of length n? e.g given abcd produces "a" "ab" "abc" FAST. equally nice to have would be: e.g. given c("a", "b", "c") produces "a" "a","b" "a","b","c" Thank you Witold -- Witold Eryk Wolski

Re: [R] rstudio mailing list

2016-10-19 Thread Bert Gunter
Try searching at Rstudio??? They have an faq, community forum, etc. Bert On Oct 19, 2016 11:28 AM, "Witold E Wolski" wrote: > Is there a mailing list for Rstudio related questions? I searched the > web but did not find one. > > Thank you > > -- > Witold Eryk Wolski > >

Re: [R] nls.lm

2016-10-19 Thread S Ellison
> Mike meyer > @pd: you know that a System of equations with more variables than equations > is always solvable > and if a unique solution is desired one of mimimal norm can be used. Here's an example of what you _said_: x + y + z = 2 3x - y +4z = 4 Find a unique single-valued solution for

[ESS] Interacting with a remote SAS session

2016-10-19 Thread Sparapani, Rodney
Hi! I have the same problem with ESS 16.04 and I am creating an issue on github. It looks like the bug is coming from ess-remote. Doing a backtrace, I see… Debugger entered--Lisp error: (wrong-type-argument stringp nil) get-process(nil) ess-process-put(funargs-cache #s(hash-table size 65

Re: [R] nls.lm

2016-10-19 Thread Berend Hasselman
> On 19 Oct 2016, at 14:09, Mike meyer <1101...@gmx.net> wrote: > > @pd: you know that a System of equations with more variables than equations > is always solvable > and if a unique solution is desired one of mimimal norm can be used. > You won't get a minimum norm solution by using a least

Re: [R] Storing long string with white space in variable

2016-10-19 Thread Jeff Newmiller
The best way to do this is to put your code in a package and put the files into a dedicated directory in the package that you just copy files from using system.file. R does not have Python """ strings or Perl "here" files. You can create a script that reads the files in with readlines and

Re: [R] nls.lm

2016-10-19 Thread ProfJCNash
Peter is right that the conditions may be embedded in the underlying code. (Ask Kate!) My nlmrt package is all in R, so the conditions are visible. I'm currently in process of rejigging this using some work Duncan Murdoch helped with a while ago (I've had some other things get in the way), so

Re: [R] Error installing packages

2016-10-19 Thread Jeff Newmiller
Different mirror? -- Sent from my phone. Please excuse my brevity. On October 19, 2016 4:54:50 AM PDT, "Kevin E. Thorpe" wrote: >Hello. > >I am posting this on behalf of one of my students who is getting error >messages when installing some packages. I have not seen

Re: [R] Error installing packages

2016-10-19 Thread Marc Schwartz
> On Oct 19, 2016, at 6:54 AM, Kevin E. Thorpe wrote: > > Hello. > > I am posting this on behalf of one of my students who is getting error > messages when installing some packages. I have not seen this before nor have > I been able to replicate it. I'm including

[R] nls.lm

2016-10-19 Thread Mike meyer
@pd: you know that a System of equations with more variables than equations is always solvable and if a unique solution is desired one of mimimal norm can be used. According to "Methods for nonlinear least squares problems" by Madsen, Nielsen and Tingleff the LM-algorithm solves Systems of the

[R] Storing long string with white space in variable

2016-10-19 Thread G . Maubach
Hi All, I would like to store a long string with white space in a variable: -- cut -- # Create README.md readme <- "--- title: "Your project title here" author: "Author(s) name(s) here" date: "Current date here" output: html_document --- ```{r setup, include=FALSE}

[R] Error installing packages

2016-10-19 Thread Kevin E. Thorpe
Hello. I am posting this on behalf of one of my students who is getting error messages when installing some packages. I have not seen this before nor have I been able to replicate it. I'm including the relevant (I think) information. I get the students to install rms with dependencies. As you

Re: [R] nls.lm

2016-10-19 Thread Peter Dalgaard
This would seem to apply to the add-on package minpack.lm. That package has a maintainer... Offhand, I would expect that this is a sanity check that, broadly speaking, prevents you from trying to solve a system of equations with more unknowns than equations. This is not a sufficient condition:

[R] nls.lm

2016-10-19 Thread Mike meyer
Greetings, The description of nls.lm specifies that in minimizing a sum of squares of residuals the number of residuals must be no less than the dimension of the independent variable ("par"). In fact the algorithm does not work otherwise (termination code 0). But this condition is

Re: [R] rstudio mailing list

2016-10-19 Thread Marc Schwartz
> On Oct 19, 2016, at 4:27 AM, Witold E Wolski wrote: > > Is there a mailing list for Rstudio related questions? I searched the > web but did not find one. > > Thank you > > -- > Witold Eryk Wolski It is linked to on their web site under Resources -> Support:

Re: [R] Why do we get “Don't know how to add o to a plot” Error?

2016-10-19 Thread S Ellison
> Why do we get “Don't know how to add o to a plot” Error? I seem to have responded to this post, and read answers to it, on at least two other forums. Suggest you look at the answers on R-forge and stackexchange; they are both correct. If you'd like to post a coherent summary of the answers

[R] rstudio mailing list

2016-10-19 Thread Witold E Wolski
Is there a mailing list for Rstudio related questions? I searched the web but did not find one. Thank you -- Witold Eryk Wolski __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] install R in relative path

2016-10-19 Thread Martin Maechler
> Tom Graves via R-help > on Tue, 18 Oct 2016 21:06:54 + writes: > Hello everyone, I am trying to figure out if I can install > R in a relative path? Yes. Even better you don't have to "install" it at all in the strict sense. Just *build* it and

[R] Why do we get “Don't know how to add o to a plot” Error?

2016-10-19 Thread Mohan V
Hello All, Trying to implement the twitter sentiment analysis. Everything worked fine, but when I try to make Barplots of tweets and getting the error as Error: Don't know how to add o to a plot When i tried the first time it given me the proper output. But after that it is giving me the

Re: [R] MDS, line of best fit, and id of variables

2016-10-19 Thread PIKAL Petr
Hi > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Kirsten > Green > Sent: Tuesday, October 18, 2016 9:27 PM > To: David L Carlson > Cc: r-help@r-project.org > Subject: Re: [R] MDS, line of best fit, and id of variables > > David,