Re: [R] Question

2018-04-19 Thread Keith Jewell
On 15/04/2018 17:26, Marc Girondot via R-help wrote: Le 15/04/2018 à 17:56, alireza daneshvar a écrit : break-down point Can you explain more what you plan to do and give an example of what you have tried to do until now to do a "break down point" in R. Perhaps a "break down point" is

Re: [R] Problem with choose.files(default=..., multi=FALSE)

2017-05-10 Thread Keith Jewell
(Windows Server 2008 R2 x64) and also in Windows 10 x64 Keith Jewell On 09/05/2017 17:49, Duncan Murdoch wrote: On 09/05/2017 12:06 PM, Keith Jewell wrote: I'm very hesitant to suggest that there's a bug in such a venerable R function, but I can't see what I'm doing wrong. Any comments

[R] Problem with choose.files(default=..., multi=FALSE)

2017-05-09 Thread Keith Jewell
I'm very hesitant to suggest that there's a bug in such a venerable R function, but I can't see what I'm doing wrong. Any comments are welcome When using choose.files() where: default = something multi = FALSE selected file path is shorter than the default ... then the returned

Re: [R] Antwort: Re: RStudio: Place for Storing Options

2017-02-23 Thread Keith Jewell
RStudio seems to not pay due regard to the distinction between APPDATA and LOCALAPPDATA. See https://support.rstudio.com/hc/en-us/community/posts/200650543-File-history-and-project-history-stored-in-LOCALAPPDATA On 23/02/2017 08:00, g.maub...@weinwolf.de wrote: Hi Martin, the command

Re: [R] Strange message after reading multiple scripts from one folder

2016-07-29 Thread Keith Jewell
I can't immediately see it in the help text but it seems that source returns a list with two named elements; value and visible. I surmise that it is returned using withVisible (qv). KJ On 29/07/2016 13:26, jim holtman wrote: Hard to tell without seeing the scripts. Do you have a matrix in

Re: [R] [FORGED] Re: Generate list if sequence form two vector element

2016-06-22 Thread Keith Jewell
or as a one-liner mapply(pmin(a, b), pmax(a,b), FUN=seq, SIMPLIFY=FALSE) On 22/06/2016 10:23, peter dalgaard wrote: There's also mapply(a, b, FUN=seq, SIMPLIFY=FALSE) (turn off simplication so that you don't unexpectedly get a matrix whenever all elements of results have same length. This

[R] expand.model.frame issue

2016-06-09 Thread Keith Jewell
Following on from a stackoverflow question "Why does this simple function calling `lm(..., subset)` fail?" -- myfun <- function(form., data., subs.) lm(form., data., subs.) myfun(mpg ~ cyl + hp, mtcars, TRUE) ## Error in eval(expr, envir,

Re: [R] formula argument evaluation

2016-04-12 Thread Keith Jewell
On 12/04/2016 11:24, Adrian Dușa wrote: I have a simple function such as: foo <- function(x) { call <- lapply(match.call(), deparse) testit <- capture.output(tryCatch(eval(x), error = function(e) e)) if (grepl("Error", testit)) { return(call$x) } } and I would like

Re: [R] Issue with results from 'summary' function in R

2015-09-18 Thread Keith Jewell
On 18/09/2015 13:08, Praveen Surendran wrote: Hi all, Attached table (that contains summary for a genetic association study) was read using the command: test <- read.table('testDat.txt',header=FALSE,stringsAsFactors=FALSE) Results from the summary of the attached table is provided below:

[R] predict.poly for multivariate data

2015-07-10 Thread Keith Jewell
suggestions can be improved so I welcome correction. Otherwise, how do I go about getting these changes implemented? I see stats is maintained by R Core Team. Are they likely to pick it up from here, or do I need to take any other action? Best regards Keith Jewell ### polym

Re: [R] Problem with particular file in XML package?

2015-05-28 Thread Keith Jewell
The OP asked Has anyone else had trouble with the XML package lately and if so, how did you resolve it? For what it's worth... I failed to install XML using install() with the defaults; I can't remember the exact error message, something about access denied. Downloading XML_3.98-1.1.zip

Re: [R] rgl::writeWebGL( , prefix = , )

2015-02-03 Thread Keith Jewell
survival_2.37-7 loaded via a namespace (and not attached): [1] cluster_1.15.3 devtools_1.6.1 evaluate_0.5.5 formatR_1.0 [5] grid_3.1.0 highr_0.4 lattice_0.20-29 rpart_4.1-8 [9] svMisc_0.9-70 Internet Explorer 11 Version 11.0.9600.17420 Any advice is welcome. Keith Jewell

Re: [R] Is it possible to define another kind of NA

2014-11-13 Thread Keith Jewell
On 13/11/2014 11:08, Marc Girondot wrote: Le 13/11/2014 01:26, MacQueen, Don a écrit : Along the lines of what Bert Gunter said, the ideal way to represent LDL results depends on the functions used later to analyze them. I deal with such data on a daily basis and have never found it necessary

Re: [R] Is xyz point inside 3d convex hull?

2014-10-13 Thread Keith Jewell
Back in 2009 I posted some code to this list, see: http://tolstoy.newcastle.edu.au/R/e8/help/09/12/8784.html I submitted the function 'inhull' to the geometry package maintainer, but I don't think it was ever included. HTH Keith J On 12/10/2014 21:24, Don McKenzie wrote: Check the R-news

Re: [R] How to check to see if a variable is within a range of another variable

2014-10-02 Thread Keith Jewell
On 01/10/2014 23:54, Peter Alspach wrote: Tena koe Kate If kateDF is a data.frame with your data, then apply(kateDF, 1, function(x) isTRUE(all.equal(x[2], x[1], check.attributes = FALSE, tolerance=0.1))) comes close to (what I think) you want (but not to what you have illustrated in your

Re: [R] Windows R doesn't recognize shortcuts ?

2014-07-24 Thread Keith Jewell
On 23/07/2014 14:21, Duncan Murdoch wrote: On 23/07/2014 9:08 AM, ce wrote: Hi All, In Windows 7 , R installation: R version 3.1.1 Patched (2014-07-14 r66149) -- Sock it to Me Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) it doesn't

Re: [R] Equation of a curve

2014-04-04 Thread Keith Jewell
On 03/04/2014 16:26, Frances Cheesman wrote: Hi all, I have a number of bacterial growth curves I would like to find the equations for these and then integrate them to find the area under the curves for me to do stats on later. Is there any way I can do this in R? Thanks, Frances

Re: [R] A vector of normal distributed values with a sum-to-zero constraint

2014-04-01 Thread Keith Jewell
It seems so simple to me, that I must be missing something. Subject to Jeff Newmiller's reminder of FAQ 7.31; if the sum is zero then the mean is zero and vice versa. The OP's original attempt of: - l - 100 aux - rnorm(l,0,0.5) s - sum(aux)/l aux2 - aux-s sum(aux2)

Re: [R] princomp/prcomp packages not available for 3.0.2

2014-02-19 Thread Keith Jewell
On 19/02/2014 15:47, Rich Shepard wrote: Running 3.0.2 on Slackware here. Tried to install.packages() for both princomp and prcomp (Principal Components Analysis) but R responded by telling me neither is available for this version of R. Has anyone an idea when either (but especially

Re: [R] grep for multiple pattern?

2014-02-13 Thread Keith Jewell
On 13/02/2014 15:51, Marc Schwartz wrote: On Feb 13, 2014, at 8:43 AM, Rainer M Krug rai...@krugs.de wrote: Hi I want to search for multiple pattern as grep is doing for a single pattern, but this obviously not work: grep(an, month.name) [1] 1 grep(em, month.name) [1] 9 11 12 grep(eb,

Re: [R] More Columns than column names Error

2013-10-22 Thread Keith Jewell
Carl is right. Going to the nabble post and looking in the source data file http://r.789695.n4.nabble.com/file/n4678770/Garbage.txt I see the headings row has 'Material' tab 'Weight...' tab 'Percent'. Each of the data rows has 1 tab character between the 'Material' and 'Weight' columns and 3

Re: [R] Problem with converting F to FALSE

2013-09-05 Thread Keith Jewell
Depending what you're doing with the data, you might want colClasses=c(factor,numeric) On 05/09/2013 13:58, Joshua Wiley wrote: Hi, You can either manually specify colClasses or the asis argument. See ?read.csv for more details. If you just had those two columns, something like:

Re: [R] XLSX package + Excel creation question

2013-09-04 Thread Keith Jewell
I'll skip over the courtesy implications of double posting/pointing to stackoverflow. The stackoverflow thread makes it look as if you need to learn more Excel. Do you really not know what an Excel template is? It sounds as if you want what Excel calls conditional formatting which you can

Re: [R] just a small variable-naming question

2013-08-27 Thread Keith Jewell
In case the OP wanted to append columns, rather than rename existing columns: cbind(myData, var1=NA, var2=NA, var3=NA) col1 col2 col3 var1 var2 var3 1123 NA NA NA 2234 NA NA NA 3345 NA NA NA On 24/08/2013 17:22, arun wrote: Hi, You

Re: [R] nls: example code throws error

2013-04-26 Thread Keith Jewell
On 26/04/2013 00:16, Steven LeBlanc wrote: Greets, I'm trying to learn to use nls and was running the example code for an exponential model: snip Perhaps also, a pointer to a comprehensive and correct document that details model formulae syntax if someone has one? Thanks Best

Re: [R] approxfun values

2013-02-14 Thread Keith Jewell
Alternatively, with approx() use xout to specify which interpolated values you want returned: approx(dat, xout=dat$V1[is.na(dat$V2)]) KJ On 14/02/2013 11:43, Rui Barradas wrote: Hello, In what follows I've changed your df name to 'dat', to save some keystrokes. approxfun returns a function,

Re: [R] function coverage

2013-01-15 Thread Keith Jewell
On 14/01/2013 22:25, Hadley Wickham wrote: I think codetools could do this reasonably well with the walkCode function, but I've never done it so I don't have sample code, and walkCode is mostly an internal function. There are a couple of approaches here:

Re: [R] Effect of each term in the accuracy of Nonlinear multivariate regression fitting equation

2012-11-27 Thread Keith Jewell
In this context, linear model means linear in the _coefficients_ not (necessarily) linear in the predictors, so your model: JIM ~ z1*A + z2*B + z3*A*B^2 + z4*C*D^3 + z5*A^2*B^2 ... is a linear model (in z1, z2, ...). So you don't need to use nls, lm is probably favourite. You can use all

Re: [R] Mailing List

2012-09-05 Thread Keith Jewell
You might prefer to read list via the web or a news reader or an RSS feed, in which case http://dir.gmane.org/gmane.comp.lang.r.general might be helpful. Keith J On 05/09/2012 13:47, David Winsemius wrote: On Sep 5, 2012, at 3:00 AM, Marcus Tullius wrote: Hello there, is there a way I

Re: [R] Tendonitis and R users

2012-09-04 Thread Keith Jewell
When I suffered from wrist pain I found changing from a standard mouse to a cordless trackball gave rapid and complete relief. Your mileage may vary. Keith J I think I've avoided tendonitis by carefully stretching the affected area when I begin to feel discomfort and, as John suggests,

Re: [R] precision warning in delaunayn function

2012-07-26 Thread Keith Jewell
Does delaunayn(scale(coord),options=Qbb) help? Keith J On 26/07/2012 08:26, Jean-Luc Dupouey wrote: Dear R helpers, I try to use the 'delaunayn' function in the 'geometry' package for Delaunay triangulation in 2 dimensions. For the four following points, I get a warning message :

Re: [R] Interpreting Q-Q Plots

2012-05-15 Thread Keith Jewell
On 14/05/2012 23:21, Rich Shepard wrote: On Tue, 15 May 2012, Peter Alspach wrote: Probably highly skewed to the right, with discrete values (perhaps due to the limitations in the accuracy of the assessment equipment). Peter, Most of these data are near zero or the lower detection limit.

Re: [R] Problem with 'nls' fitting logistic model (5PL)

2012-05-03 Thread Keith Jewell
?nls.control fit- nls(MFI~a + b/((1+(nom/c)^d)^f), data=x, weights=x$weights, + start=c(a=100, b=1, c=100, d=-1, f=1), control=nls.control(warnOnly=TRUE)) Warning message: In nls(MFI ~ a + b/((1 + (nom/c)^d)^f), data = x, weights = x$weights, : step factor 0.000488281 reduced below

Re: [R] Different varable lengths

2012-04-30 Thread Keith Jewell
Missing comma between -1.180620213 and -0.525964648 Saint bahman.za...@comhem.se wrote in message news:1335779012548-4597768.p...@n4.nabble.com... Hi! I'm trying to do a lm() test on three objects. My problem is that R protests and says that the variable lengths differ for one of the

Re: [R] Area between 2 curves

2012-04-30 Thread Keith Jewell
A quick Google suggests that sintegral is in the Bolstad2 package: http://cran.r-project.org/web/packages/Bolstad2/ R. Michael Weylandt michael.weyla...@gmail.com wrote in message news:CAAmySGOCtNxWNHJDka=68criphxnppwap6fm7ufkhtx7xsz...@mail.gmail.com... You can't just decide a command exists

Re: [R] Creating polygons from scattered points

2012-03-14 Thread Keith Jewell
No time to really think about this, but: a) to convert scattered point distributions to polygons you might look at convex hulls; e.g. convhulln {geometry} b) to identify islands some kind of cluster analysis Hope that helps a little. KJ Louise Mair lm...@york.ac.uk wrote in message

Re: [R] how to run system command

2012-03-08 Thread Keith Jewell
PATH's contents. You can look at it with strsplit(Sys.getenv(PATH), .Platform$path.sep)[[1]] Bill Dunlap -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Keith Jewell Sent: Wednesday, March 07, 2012 1:02 AM To: r-h

Re: [R] how to run system command

2012-03-07 Thread Keith Jewell
Works for me: -- sessionInfo() R version 2.14.1 (2011-12-22) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252LC_MONETARY=English_United Kingdom.1252 [4] LC_NUMERIC=C

Re: [R] Sorting strings

2012-02-20 Thread Keith Jewell
Petr Savicky savi...@cs.cas.cz wrote in message news:20120220105153.gc21...@cs.cas.cz... On Mon, Feb 20, 2012 at 02:18:42AM -0800, statquant2 wrote: Hi all, I am having difficulties to understand how R sort strings: If I do R) sort(c(X.,X0B)) [1] X. X0B So for me, as far as

Re: [R] unique combinations

2011-12-21 Thread Keith Jewell
OK, someone point it out to me; my wife tells me I can't see what's in front of me :-} I read ?expand.grid carefully, went to ?combn and ?choose but still couldn't see an easy way to get what the OP asked for. The neatest I can get (which isn't very neat!) is: myVec - c(1,2,3) eg -

Re: [R] unique combinations

2011-12-21 Thread Keith Jewell
to a solution. I used [, which I couldn't see suggested on ?expand.grid. I thought I'd missed a neater solution in the help pages, and hoped someone could point it out. Best regards, Keith Jewell -- Uwe Ligges lig...@statistik.tu-dortmund.de wrote in message news

Re: [R] Adding a year to existing date

2011-11-17 Thread Keith Jewell
Just looking at the ambiguity in adding a year dates - as.Date(c('2007-03-01','2008-02-29')) tmp - as.POSIXlt(dates) tmp$year - tmp$year+1 dates2 - as.Date(tmp) dates2 [1] 2008-03-01 2009-03-01 dates2 - dates Time differences in days [1] 366 366 KJ MacQueen, Don macque...@llnl.gov wrote

Re: [R] UNC Windows path beginning with backslashes

2011-08-19 Thread Keith Jewell
) Thanks for your interest, Keith Jewell - Henrik Bengtsson h...@biostat.ucsf.edu wrote in message news:cafdcvcqe3uukmmqsjj0fpevfjgrabrgbt1g8drcxgpnsjeb...@mail.gmail.com... I think you can also do this from within R (e.g. in your .Rprofile) using the R.utils

Re: [R] UNC Windows path beginning with backslashes

2011-08-18 Thread Keith Jewell
still think I've probably re-invented a wheel and ended up with something square, but it is going round. Best regards, Keith Jewell Keith Jewell k.jew...@campden.co.uk wrote in message news:j22q11$9u9$1...@dough.gmane.org... Thanks Uwe. I'm aware (and have been forcefully reminded) that using

[R] UNC windows path beginning with backslashes: normalizePath bug??

2011-08-12 Thread Keith Jewell
the feeling I'm being silly and making hard work of all this. Any comments? Suggestions? Best regards, and thanks in advance/ Keith Jewell Keith Jewell k.jew...@campden.co.uk wrote in message news:... Hi, Back in 2010 I had a problem with 'update.packages()', which I worked around by mapping

Re: [R] UNC Windows path beginning with backslashes: normalizePath bug??

2011-08-12 Thread Keith Jewell
a drive where I can. I posted in the hope of learning from and perhaps helping those with similar problems. I hope that it is permissible to discuss non-canonical use of R on this list, I certainly did not intend disrespect for the R developers (or to make typing errors). Best regards Keith Jewell

[R] UNC windows path beginning with backslashes: normalizePath bug??

2011-08-11 Thread Keith Jewell
the feeling I'm being silly and making hard work of all this. Any comments? Suggestions? Best regards, and thanks in advance/ Keith Jewell Keith Jewell k.jew...@campden.co.uk wrote in message news:... Hi, Back in 2010 I had a problem with 'update.packages()', which I worked around by mapping

Re: [R] list.files recursively to find files in a specific way...

2011-07-20 Thread Keith Jewell
construction (where I did escape '.') as: list.files(path=file.path(list.files(path=.libPaths(), full.names=TRUE), etc), pattern=^menus\\.txt$, full.names=TRUE) Does that look OK? Best regards, Keith Jewell Prof Brian Ripley rip...@stats.ox.ac.uk wrote in message news:alpine.lfd

[R] Sys.glob() doesn't handle a UNC windows path beginning with backslashes

2011-06-30 Thread Keith Jewell
(list.files(path=.libPaths(), full.names=TRUE), etc), pattern=^menus\\.txt$, full.names=TRUE) a reasonable replacement for the Sys.glob() construction in Rcmdr? I don't want to suggest to Prof. Fox an amendment which fixes my problem but 'breaks' it for others! Thanks in advance, Keith Jewell R

Re: [R] How to capture console output in a numeric format

2011-06-27 Thread Keith Jewell
] On Behalf Of Keith Jewell Sent: Friday, June 24, 2011 11:49 AM To: r-h...@stat.math.ethz.ch Subject: Re: [R] How to capture console output in a numeric format If you don't want the information as character, why are you printing it rather than storing it in a matrix? Why not something along the lines

Re: [R] How to capture console output in a numeric format

2011-06-24 Thread Keith Jewell
If you don't want the information as character, why are you printing it rather than storing it in a matrix? Why not something along the lines of this... fr - function(x) { ## Rosenbrock Banana function on.exit(aMatrix - rbind(aMatrix,(cbind(x1, x2, f x1 - x[1] x2 - x[2] f -

Re: [R] QQ plot for normality testing

2011-05-03 Thread Keith Jewell
I have found this web page useful http://www.cms.murdoch.edu.au/areas/maths/statsnotes/samplestats/qqplot.html Your mileage may vary. Keith J Matevz Pavlic matevz.pav...@gi-zrmk.si wrote in message news:ad5ca6183570b54f92aa45ce2619f9b901208...@gi-zrmk.si... Hi all, I am trying to test

Re: [R] error in nls, step factor reduced below minFactor

2011-03-29 Thread Keith Jewell
?nls.control warnOnly a logical specifying whether nls() should return instead of signalling an error in the case of termination before convergence. Termination before convergence happens upon completion of maxiter iterations, in the case of a singular gradient, and in the case that the

Re: [R] extract printed value from a function

2011-02-24 Thread Keith Jewell
I don't think that third suggestion actually works: x - print( twotPermutation(c(2,3,4),c(3,6,5),plotit=F) ) [1] 0.289 NULL x NULL twotPermutation returns the value of invisible() which is NULL: x - print(invisible()) x This conflicts with the documented behaviour of twotPermutation which

Re: [R] A question on Duplicating

2011-02-10 Thread Keith Jewell
Unless I've made a mistake (it happens!) that gives FALSE on the data which the OP said should give TRUE. Ravi Varadhan suggested duplicated(a) duplicated(b) but that gives the same result for b - c(n, m, o, m) for which I think the OP would like FALSE I think this may do it all((a %in%

Re: [R] subsets

2011-01-20 Thread Keith Jewell
I don't think Ivan's solution meets the OP's needs. I think you could do it using %in% and the approriate logical operations e.g. aDF - data.frame(id=c(1,2,2,2,3,3,4,4,4,5), diagnosis=c(ah, ah, ihd, im, ah, stroke, ah, ihd, angina, ihd)) aDF[with(aDF,(id %in% id[diagnosis==ah]) (id %in%

Re: [R] subsets

2011-01-20 Thread Keith Jewell
I did try it. It gave me [[1]] id diagnosis 1 1ah 5 3ah 7 4ah 8 4 ihd 10 5 ihd [[2]] id diagnosis 1 1ah 2 2ah 5 3ah 7 4ah [[3]] id diagnosis 3 2 ihd 8 4 ihd 10 5 ihd Which isn't what

Re: [R] median by geometric mean -- are we missing what's important?

2011-01-18 Thread Keith Jewell
or an odd number of negative numbers it becomes 0 or imaginary (please do correct me if I'm wrong)? sqrt(prod(c(2, 0, 54))) sqrt(prod(c(-2, 2))) Greg Snow, what is the scientific question? What is the model? Cheers, Bert On Mon, Jan 17, 2011 at 9:13 AM, Keith Jewell k.jew

Re: [R] median by geometric mean

2011-01-17 Thread Keith Jewell
Just in case some of x are negative (the desired median still exists, as long as the two middle values are non -ve), how about: x - runif(20, -1, 100) exp(median(log(pmax(0,x It'll give -Inf if the two middle values are negative, when I guess we should get NaN, but I can't see a 1-line way

Re: [R] how to wrap a long line in R scripts?

2011-01-10 Thread Keith Jewell
Jonathan P Daily jda...@usgs.gov wrote in message news:of588e803b.869e9aff-on85257814.004d298d-85257814.004d4...@usgs.gov... a - rey lo ong charrr Although the indentation is just personal preference.

Re: [R] String to array

2010-12-09 Thread Keith Jewell
Romildo Martins romildo.mart...@gmail.com wrote in message news:aanlktinbiaexcobzyqdbtr62xr9q=kjvwaazaqi-k...@mail.gmail.com... Hello, how convert x in xarray (numbers)? x [1] 0 - 13 y [1] 11 - 23 z [1] 220 - 9 xarray [1] 0 13 yarray [1] 11 23 zarray [1] 220 9 Thanks,

Re: [R] colname refered by a variable

2010-12-03 Thread Keith Jewell
or even shorter df[,paste(A,C,sep=)] Santosh Srinivas santosh.srini...@gmail.com wrote in message news:aanlktikcjy7bvyfbwuwmrq4dhg4pbdau+qh_7+k+b...@mail.gmail.com... try this .. df[,colnames(df)==paste(A,C,sep=)] On Fri, Dec 3, 2010 at 12:05 PM, Yuan Jian jayuan2...@yahoo.com wrote: Hello,

Re: [R] How to get a specific named element in a nested list

2010-11-11 Thread Keith Jewell
Neat! I think replacing out - rmatch(el, name) with out - Recall(el, name) will avoid the dependence of the code on the function name Keith J Michael Bedward michael.bedw...@gmail.com wrote in message news:aanlktikv9zepxipbp7ftr8vmpgsjaptjyj_dudy-m...@mail.gmail.com... On 11 November

Re: [R] Installing R and an editor on a USB drive

2010-11-10 Thread Keith Jewell
As I recall (my memory may be faulty), Tinn-R installation required admin privileges, but running does not and the installation does not include the specific file path in any files. To make Tinn-R available on a machine where I do not have admin privileges I have a) installed onto a machine

Re: [R] Is there a way to have 'comment' keep a list?

2010-11-09 Thread Keith Jewell
I hadn't seen 'comment' before, so don't take my suggestion as authoritative. It looks useful, so I investigated a bit. This technique seems to work and is (perhaps?) easier than names: tlist - list(a=c(1:3), b=7) comment(x) - unlist(sapply(tlist, as.character)) or in one line

Re: [R] Changing sign on absolute numbers 0 problems

2010-10-21 Thread Keith Jewell
Sadz A sadz_a1...@yahoo.co.uk wrote in message news:419230.77523...@web24610.mail.ird.yahoo.com... Hi, I am trying to do some calculations turning DMS data to decimal degrees using the formula (D+(M/60)+(S/3600)), some of the D's involve -ve numbers, the easiest way to do the calculation

Re: [R] Changing sign on absolute numbers 0 problems

2010-10-21 Thread Keith Jewell
In case it helps... test - c(-0:00:53, -0:01:10., -0:01:26., -0:01:38., -0:01:43, + -0:01:59., -0:03:50., -0:04:46, -0:05:01., -0:05:16., + 3:41:33.0, 3:43:09.4, 3:44:26.3, 3:47:26.0, 3:48:19.3, + 3:52:13.4, 3:57:10.2, 4:29:37.6, 5:01:28.4, 5:08:45.6 ) require(sp)

Re: [R] Nonlinear Regression Parameter Shared Across Multiple DataSets

2010-10-15 Thread Keith Jewell
, Jared Blashka evilamaran...@gmail.comwrote: Thanks so much! It works great. I had thought the way to do it relied on combining the data sets, but I couldn't figure out how to alter the formula to work with the combination. Jared On Tue, Oct 12, 2010 at 7:07 AM, Keith Jewell k.jew

Re: [R] Nonlinear Regression Parameter Shared Across Multiple Data Sets

2010-10-12 Thread Keith Jewell
Jared Blashka evilamaran...@gmail.com wrote in message news:aanlktinffmudugqnkudvr=fmf0wrrtsbjxjexuki_...@mail.gmail.com... I'm working with 3 different data sets and applying this non-linear regression formula to each of them. nls(Y ~ (upper)/(1+10^(X-LOGEC50)), data=std_no_outliers,

Re: [R] boundary check

2010-09-24 Thread Keith Jewell
\tab inside hull\cr 0 \tab on hull (to precision indicated by tol) }} \references{ \url{http://www.mathworks.com/matlabcentral/fileexchange/10226-inhull} } \author{ Keith Jewell 2009 } \note{ submitted for inclusion in geometry package~ } %% ~Make other sections like Warning with \section{Warning

Re: [R] efficient list indexing

2010-09-22 Thread Keith Jewell
Also, it may be that you want bigfred to be a list of 5 lists each of 2 elements (happy and name) rather than a list of 10 elements. Thus (also using double bracketing) fred- list(happy = 1:10, name = squash) bigfred - replicate(5, fred, FALSE) bigfred[[2]][[2]] hth Keith J Patrick Burns

Re: [R] How to generate a particular sequence ?

2010-09-13 Thread Keith Jewell
Ted Harding ted.hard...@manchester.ac.uk wrote in message news:xfmail.100913104250.ted.hard...@manchester.ac.uk... On 13-Sep-10 09:19:21, Feng Li wrote: Dear R, I have a vector, say a = c(1,2,4,5,6,8). Can I generate a vector or array (2-by-3-by-3) of this form

Re: [R] Calculating with tolerances (error propagation)

2010-09-09 Thread Keith Jewell
Jan private jrheinlaen...@gmx.de wrote in message news:1284029454.2740.361.ca...@localhost.localdomain... Hello Bernardo, - If I understood your problem this script solve your problem: q-0.15 + c(-.1,0,.1) h-10 + c(-.1,0,.1) 5*q*h [1] 2.475 7.500 12.625 - OK, this

Re: [R] Where the data file is stored?

2010-08-12 Thread Keith Jewell
You're not seeing the .Rdata file containing the data objects. Try: list.files(getwd(),full.name=TRUE, all.files=TRUE) Stephen Liu sati...@yahoo.com wrote in message news:961426.85478...@web113203.mail.gq1.yahoo.com... - Original Message From: Alain Guillet alain.guil...@uclouvain.be

Re: [R] nls with some coefficients fixed

2010-07-21 Thread Keith Jewell
Gabor Grothendieck ggrothendi...@gmail.com wrote in message news:aanlktilszaicycu3lz2f5d_bxq1g8m8f7jsjsbj2l...@mail.gmail.com... On Tue, Jul 20, 2010 at 9:58 AM, nas...@uottawa.ca wrote: For nls, the fixing (or masking) of parameters is not, to my knowledge, possible. This is something

Re: [R] nls with some coefficients fixed

2010-07-21 Thread Keith Jewell
Gabor Grothendieck ggrothendi...@gmail.com wrote in message news:aanlktilszaicycu3lz2f5d_bxq1g8m8f7jsjsbj2l...@mail.gmail.com... On Tue, Jul 20, 2010 at 9:58 AM, nas...@uottawa.ca wrote: For nls, the fixing (or masking) of parameters is not, to my knowledge, possible. This is something

Re: [R] nls with some coefficients fixed

2010-07-20 Thread Keith Jewell
nas...@uottawa.ca wrote in message news:33466.129.6.253.2.1279634282.squir...@webmail02.uottawa.ca... For nls, the fixing (or masking) of parameters is not, to my knowledge, possible. This is something I've been trying to get in such routines for over 2 decades. Masks are available, but not

[R] nls with some coefficients fixed

2010-07-19 Thread Keith Jewell
I'm using nls to fit a variety of different models. Here I use SSgompertz as an example. I want the ability to fix one (or more) of the coefficients that would normally be optimised (e.g. fix b3=0.8). Examples; based on and using data from example(SSgompertz) #- # vanilla

Re: [R] Using if statement on function

2010-06-28 Thread Keith Jewell
You could also consider isTRUE(all.equal(FUN, mean)) isTRUE(all.equal(mean, mean)) [1] TRUE isTRUE(all.equal(mean, median)) [1] FALSE HTH Keith J Patrick Burns pbu...@pburns.seanet.com wrote in message news:4c28777f.1040...@pburns.seanet.com... If I understand the problem properly,

[R] Capturing buffered output from Rterm

2010-06-10 Thread Keith Jewell
an error nls() - I surmise this is due to output buffering (?). In an S-Plus version I turned off buffering with guiSetOption(option.name=BufferOutputWindows, value.string=F) but I don't think this is available in R (?). Has anyone any suggestions? Thanks in advance, Keith

Re: [R] Capturing errors [not buffered output] from Rterm

2010-06-10 Thread Keith Jewell
me kindly! Prof Brian Ripley rip...@stats.ox.ac.uk wrote in message news:alpine.lfd.2.00.1006101333520.25...@gannet.stats.ox.ac.uk... On Thu, 10 Jun 2010, Keith Jewell wrote: In MS Windows I a) invoke Rterm from a batch file (test.bat) b) to execute commands from a script (m:\test.rsc) c

Re: [R] how to update R files included assource ?

2010-03-29 Thread Keith Jewell
Hi, I'm afraid I really don't have time to enter into a dialogue :-{ but this fragment from a function of mine might help... -- outfile - sub(Rd$, html, hfile, ignore.case=TRUE) # name of corresponding html out.mod - file.info(outfile)[,mtime] # if html absent

Re: [R] Error Running TinnR with R

2010-03-12 Thread Keith Jewell
Many people seem to have trouble defining '.trPaths' which is the set of file names which TinnR uses to communicate with R; the user must be able to create/write/read these files/folders. In my Rprofile.site I have the single assingment: .trPaths - paste(paste(Sys.getenv(APPDATA),

Re: [R] locfit: max number of predictors = 6? How interpolate in 5-10D?

2010-02-26 Thread Keith Jewell
, not shouting, just highlighting key points for those skimming quickly) Keith Jewell Liaw, Andy andy_l...@merck.com wrote in message news:b10baa7d28d88b45af82813c4a6ffa934ce...@usctmx1157.merck.com... Well, I should think there's an obvious (if not elegant) way to test it: n - 5e3 m - 20 x

[R] update.packages with UNC library path

2010-02-26 Thread Keith Jewell
Hi all, I hit a small snag. Here is my workaround (copied verbatim from my aide memoire) in case it helps others. (or anyone knows a better way... ;-) Best regards, Keith Jewell. The site library file is defined (in Renviron.site R_LIBS_SITE=//Server02/stats/R/library

[R] locfit: max number of predictors?

2010-02-25 Thread Keith Jewell
. Can anyone confirm or deny the existence of a 'crisp' upper limit on the number of predictors in locfit? If it is 5, or thereabouts, can anyone suggest an alternative which can handle a few more? (I'm using it for multidimensional interpolation). Best regards, Keith Jewell

[R] update.packages on MS Windows with //server/share paths

2010-01-26 Thread Keith Jewell
see the problem in V2.9.2 . I do see the problem in V2.10.1, V2.10.1 Patched (2010-01-24 r51030) V2.11.0 Under development (unstable) (2010-01-24 r51030) Grateful for any suggestions, Keith Jewell - Version: platform = i386-pc-mingw32

Re: [R] update.packages on MS Windows with //server/share paths

2010-01-26 Thread Keith Jewell
] //Server02/stats/R/library/2.10 ... is controlled by R (in this example the former fails with ...not found, the latter opens the folder in Windows Explorer). Best regards, Keith Jewell - Gabor Grothendieck ggrothendi...@gmail.com wrote in message news

Re: [R] find the corresponding mean y

2010-01-12 Thread Keith Jewell
Not very clear what you want, but perhaps... ?sortedXyData ...might help. hth KJ luciferyan anniehyh...@googlemail.com wrote in message news:1263231740556-1011427.p...@n4.nabble.com... Hello, I have 49 paired data, x, y. I have sampled x (where replacement is true), and find its mean. How

[R] Problem with expand.grid

2009-12-22 Thread Keith Jewell
for backwards compatibility. but I don't think that's relevant, I have no factors. I'm probably being silly. Can anyone point out where? Best... Keith Jewell --please do not edit the information below-- Version: platform = i386-pc-mingw32 arch = i386 os = mingw32 system = i386

Re: [R] Problem with expand.grid

2009-12-22 Thread Keith Jewell
rows, data has 10 Keith Jewell k.jew...@campden.co.uk wrote in message news:hgqqja$rk...@ger.gmane.org... Hi All, This example code dDF - structure(list(y = c(4.75587, 4.8451, 5.04139, 4.85733, 5.20412, 5.92428, 5.69897, 4.78958, 4, 4), t = c(0, 48, 144, 192, 240, 312, 360, 0

Re: [R] Problem with expand.grid

2009-12-22 Thread Keith Jewell
bangs head on desk Thanks, Prof Ripley (and everyone else who's responding while I type this!). I thought I was being stupid. What I wanted was: expand.grid(lapply(dDF, unique)) which works fine! hangs head in shame Seasonal greetings to all, Keith Jewell Prof Brian Ripley rip

Re: [R] mutlidimensional in.convex.hull (wasmultidimensionalpoint.in.polygon??)

2009-12-18 Thread Keith Jewell
! Keith Jewell inhull - function(testpts, calpts, hull=convhulln(calpts), tol=mean(mean(abs(calpts)))*sqrt(.Machine$double.eps)) { # # R implementation of the Matlab code by John D'Errico 04 Mar 2006 (Updated 30 Oct 2006) # downloaded from http://www.mathworks.com

Re: [R] mutlidimensional in.convex.hull(wasmultidimensionalpoint.in.polygon??)

2009-12-18 Thread Keith Jewell
Syntax suggestions implemented. Inhull's original author consulted. Function submitted for potential inclusion in geometry package. Seasons greetings to all. Keith Jewell - baptiste auguie baptiste.aug...@googlemail.com wrote in message

Re: [R] mutlidimensional in.convex.hull (was multidimensionalpoint.in.polygon??)

2009-12-11 Thread Keith Jewell
and code the Matlab algorithm, but this is a small part of a much bigger task, on which I must progress. So I'll thank Baptiste, Duncan and Charles for their invaluable help and move on. Best regards, Keith Jewell __ R-help@r-project.org mailing list https

Re: [R] multidimensional point.in.polygon??

2009-12-10 Thread Keith Jewell
in the dark :-( Any hints? Thanks in advance, Keith Jewell - baptiste auguie baptiste.aug...@googlemail.com wrote in message news:de4e29f50912040550m71fbffafnfa1ed6e0f4451...@mail.gmail.com... Hi, Yet another one of my very naive ideas

[R] mutlidimensional in.convex.hull (was multidimensional point.in.polygon??)

2009-12-10 Thread Keith Jewell
speak Matlab, but this looks non-trivial to code in R. I'll do it if I have to, but if it already exists it would be nice. If I do have to code it, I'd really appreciate an expression in algebra rather than Matlab! Any pointers will be much appreciated, Keith Jewell Duncan Murdoch murd

[R] multidimensional point.in.polygon??

2009-12-04 Thread Keith Jewell
thought convhulln must need to do that often! Thanks in advance for any pointers, Keith Jewell __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

[R] Problem with NLSstClosestX; and suggested fix

2009-10-14 Thread Keith Jewell
} --- Comments/corrections welcome. Keith Jewell = sessionInfo() R version 2.9.2 (2009-08-24) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United Kingdom.1252

Re: [R] How to use nls when [selfStart] function returns NA or Inf??

2009-09-22 Thread Keith Jewell
!) value when the right answer is NA Any suggestions/comments gratefully received. Keith Jewell === Gabor Grothendieck ggrothendi...@gmail.com wrote in message news:971536df0909210923r3fd13fb0we72850bf73232...@mail.gmail.com... With a small number of parameters just use brute

  1   2   >