[R] timestamp shifted by hour(s) while mering zoo objects

2010-03-07 Thread Keith
r shifted. I only noticed this but don't know why and how to fix it. Does anyone have idea about this issue? Best regards, Keith __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide ht

Re: [R] timestamp shifted by hour(s) while mering zoo objects

2010-03-07 Thread Keith
t;- read.zoo(textConnection(data02.Lines), sep=",", format="%H:%M:%S %d.%m.%Y", FUN = as.chron, strip.white=TRUE, skip=1) mc <- merge(data01c, data02c) time(mc) <- time(mc) + as.numeric(times("01:00:00")) mc On Sun, Mar 7, 2010 at 3:36 PM, Keith wrote: Th

[R] Error in pruning hclust object using maptree package

2010-03-15 Thread Keith
) : clip.clust: no data provided for hclust object Does anyone have the idea? My environment is R version 2.10.1 (2009-12-14) x86_64-pc-linux-gnu [1] maptree_1.4-6 Best regards, Keith __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/

Re: [R] Error in pruning hclust object using maptree package

2010-03-16 Thread Keith
2010 16:37, Keith wrote: Dear R users, Due to too many children in my clustering result, I would like to prune the tree-like hclust object into a certain groups. However, an error: > clip.clust: no data provided for hclust object always shows up. Firstly, I tried the example in the maptree

[R] Plotting hourly time-series data loaded from file using plot.ts

2009-07-15 Thread Keith
orrect but the x-axis is still wrong. Does anyone know how to plot correct Factor1 and Factor2 with respect to the 1st column time format? Or, probably should I use some other packages? Besides, how can I plot these two time-series data (Factor1 and Factor2) in two separate plots? Best regards, Keith _

Re: [R] Plotting hourly time-series data loaded from file using plot.ts

2009-07-16 Thread Keith
ns NAs At the beginning, I thought it is the problem of NA, and tried to removed the records with NA. Still, the message appeared until I reduce the number of records to around 280 and it works well with or without NAs. Does anyone has any idea to solve the problem? Regards, Keith On Wed,

Re: [R] Plotting hourly time-series data loaded from file using plot.ts

2009-07-17 Thread Keith
the index entries in ‘order.by’ are not unique 4: In zoo(rval, x.index[i]) : some methods for “zoo” objects do not work if the index entries in ‘order.by’ are not unique These looks the same problem again. Does anyone has any idea solving this? Regards, Keith On Thu, Jul 16, 2009 at 4:51

[R] Lag representation in ccf() while zoo object is used?

2009-07-24 Thread Keith
of the zoo object. I am not sure if I'm right and would like someone here could certify this (or not). Besides, does anyone know any default argument to adjust the 3600 into 1 while plotting? The only idea I have is to divide the lag manually by 3600 and then plot it later.

[R] Time Zone names on Windows

2009-10-20 Thread Keith
is other way to set the tz to GMT+1 instead using my workaround to have a neutral meaning in my script? Regards, Keith __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-proj

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 common

[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 value

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

2017-05-10 Thread Keith Jewell
nally (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 doin

[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, encl

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 als

[R] [R-pkgs] New package: simstudy

2016-07-11 Thread Goldfeld, Keith
comments. - Keith Keith Goldfeld Department of Population Health School of Medicine, New York University 227 East 30th Street, 6th Floor New York, NY 10016 This email message, including any attachments, is for the sole use of the intended

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 yo

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 wi

[R] predict.poly for multivariate data

2015-07-10 Thread Keith Jewell
I've got the wrong end of the stick and/or my 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 othe

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

2015-02-03 Thread Keith Jewell
L was the template for the next. E.g. in the above example with two scenes: outfile <- writeWebGL(dir=getwd(), template = file.path(getwd(), "template.html"), prefix="") # position to next scene outfile <- writeWebGL(dir=getwd(), template = outfile, prefix="A"

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] 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 'ev

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 wro

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 I agree that LDL is a special case of what could be named ODL (Out of detection limit). To answer to Bert Gunter, indeed if LDL (or ODL) va

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: su

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] 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 %loca

Re: [R] Location of HTML help files

2008-07-31 Thread Keith Ponting
ing there by following the link on the R documentation page (file:///C:/Program%20Files%20(x86)/R/R-2.7.1/doc/html/index.html) Keith Ponting Aurix Ltd, Malvern WR14 3SZ UK __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

[R] Unexpected nls behaviour

2008-08-01 Thread Keith Jewell
Initial(Aform, DF)) but that seems clumsy. Can anyone point out my mistake? Or is this a limitation of nls in R (I hesitate to use the b*g word). Thanks in advance, Keith Jewell -- I don't think it's relevant but, for completeness: > sessionInfo

Re: [R] Unexpected nls behaviour: Solved

2008-08-04 Thread Keith Jewell
ot a successive integers sequence") Lval <- list(xy$y) names(Lval) <- mCall["Coeffs"] Lval } , parameters = c("Coeffs") ) Sorry for wasting anyones time. Keith Jewell - "Keith Jewell" <[EMAIL PROTECTED]

[R] Fix for nls bug???

2008-08-05 Thread Keith Jewell
but don't know how. Or I could have totally the wrong end of the stick... Comments, corrections and advice are welcome. Thanks in advance, Keith Jewell --- > sessionInfo() R version 2.7.0 (2008-04-22) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.125

Re: [R] Opening R from Tinn without setting directory each time

2008-08-06 Thread Keith Jewell
ll have to redefine the R location each time I start Tinn-R (but it's still worth it!). Hope that helps someone Keith Jewell "bartjoosen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > If you first install a newer version of R and aftwards remove a

Re: [R] Fix for nls bug???

2008-08-08 Thread Keith Jewell
ected behaviour"? Thanks again, Keith Jewell - "Prof Brian Ripley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Your example works in R-patched, as a consequence of investigations of a > different problem. (See the comments in the posting guide abo

Re: [R] Fix for nls bug??? [already fixed in R-patched]

2008-08-08 Thread Keith Jewell
Dear Prof. Ripley, Thanks for that. Just to wrap up the thread, I confirm that my problem is fully fixed in R-patched. Best regards, Keith Jewell --- "Prof Brian Ripley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, 8 Aug 2008, Keith Jewe

[R] "nested" getInitial calls; variable scoping problems

2008-08-18 Thread Keith Jewell
tial thus... getInitial(ssA, data, mCall, LHS = NULL, ...) it will call getInitial.selfStart without calling getInitial.formula. In that case perhaps eval(... parent.frame()) will find the argument? Or, at least I could attach the argument to the dataframe as a parameter. But this a

Re: [R] "nested" getInitial calls; variable scoping problems: Solved??

2008-08-19 Thread Keith Jewell
l(object, data) # do the getInitial }, parameters = c("Coeff") ) getInitial(y ~ ssA("this", "that", "other"), data= data.frame(x=c("test"), y=1)) getInitial(y ~ ssB("this", "that", "other"),

Re: [R] Upgrade 'R'

2008-09-02 Thread Keith Jewell
simple update.packages(). HTH. Comments welcome. Keith Jewell --- "Leon Yee" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, Kevin > >You can get some hints by browsing in this mailist with the subject of > &qu

Re: [R] Upgrade 'R'

2008-09-02 Thread Keith Jewell
"Prof Brian Ripley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Tue, 2 Sep 2008, Keith Jewell wrote: > >> As possible help to others, and also as a request for comments on how I >> might do things better, I describe how I've recen

[R] tolerance intervals

2009-08-10 Thread keith parker
Is anyone aware of R code for calculating sample size in the context of tolerance intervals? Thanks, Keith [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] How should a SelfStart function handle illegal parameter values?

2009-09-04 Thread Keith Jewell
ly do want to use nls rather than a bounded optimisation tool (such as optim) because this fits into a much bigger picture predicated on nls. I'd appreciate any suggestions. Keith Jewell > sessionInfo() R version 2.9.1 (2009-06-26) i386-pc-mingw32 locale: LC_COLLATE=English_

[R] How should a SelfStart function handle illegal parameter values?

2009-09-10 Thread Keith Jewell
error). I can't see a way of making nls either stick to legal parameter values, or accept NA/NaN/Inf as indicating "bad" parameter values. I really do want to use nls rather than a bounded optimisation tool (such as optim) because this fits into a much bigger p

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

2009-09-21 Thread Keith Jewell
d have trouble specifying anyway), or b) (ideally) accept NA/NaN/Inf as indicating "bad" parameter values, equivalent to very large errors in 'y' values I really do want to use nls rather than a bounded optimisation tool (such as optim) because this fits

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

2009-09-22 Thread Keith Jewell
A or Inf; but a) it's non-trivial to choose an appropriate extreme b) it might "break" numericDeriv c) it offends me (!) to return a (wrong!) value when the right answer is NA Any suggestions/comments gratefully received. Keith Jewell === "Gabor Grothe

[R] locfit: max number of predictors?

2010-02-25 Thread Keith Jewell
ce 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 _

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

2010-02-26 Thread Keith Jewell
fy neighbours??), and I don't want to re-invent wheels. Can anyone suggest an ALTERNATIVE route for INTERPOLATION in 5-10 DIMENSIONS? Best... (apologies for capitals, not shouting, just highlighting key points for those skimming quickly) Keith Jewell "Liaw, Andy" wrote in message

[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

Re: [R] Error Running TinnR with R

2010-03-12 Thread Keith Jewell
Data/Roaming/Tinn-R/tmp/', 'C:/Users/dennis/AppData/Roaming/Tinn-R/tmp/search.txt', 'C:/Users/dennis/AppData/Roaming/Tinn-R/tmp/objects.txt', 'C:/Users/dennis/AppData/Roaming/Tinn-R/tmp/file.r', 'C:/Users/dennis/AppDat

Re: [R] Find multiple elements in a vector

2009-07-23 Thread Keith Jewell
Try which(x %in% y) HTH KJ "Philip Twumasi-Ankrah" wrote in message news:519822.56196...@web39502.mail.mud.yahoo.com... This should work which((x==2)|(x==3)) --Quotable Quotes- A Smile costs Nothing But Rewards Everything - Anonymous Happiness is not perfected u

Re: [R] What does .[foo] really mean?

2009-08-03 Thread Keith Jewell
It's a place holder. See http://en.wikipedia.org/wiki/Foo HTH KJ "Simon Tian" wrote in message news:2119d1440908012150j373bfaf5v9d498bded94f...@mail.gmail.com... > Hi R users, > > I really want to know what exactly ".[foo]" means. > > Thanks in advance. -Simon > > [[alternative HTML version de

[R] netlabR package in English

2010-03-25 Thread Keith McMillan
Dear R users, Is documentation for the netlabR package available in English? If not does anyone know if or when it will be? Regards, Keith This e-mail and any files transmitted with it are confidential

Re: [R] how to update R files included as"source" ?

2010-03-29 Thread Keith Jewell
arget' file and decides whether to process it. Hope that helps, Keith J --- "arnaud chozo" wrote in message news:caebefd51003290824m67bebf96wd61315359ae97...@mail.gmail.com... > Hi all, > > I have a main file main.R in which I include some other R files. For &

[R] Kennard-stone or other uniform subset sampling algorithm?

2010-04-13 Thread Woolner, Keith
/help/07/01/.html https://stat.ethz.ch/pipermail/r-help/2009-January/184856.html Any pointers or suggestions of packages containing alternative algorithms would be appreciated. Thanks, Keith [[alternative HTML version deleted]] ___

[R] Problem with NLSstClosestX; and suggested fix

2009-10-14 Thread Keith Jewell
dev2) lim1 + (lim2 - lim1) * dev1/(dev1 + dev2) } # new line inserted } --- Comments/corrections welcome. Keith Jewell = > sessionInfo() R version 2.9.2 (2009-08-24)

[R] How to create a "heatline" -- heatmap in one dimension?

2009-10-29 Thread Woolner, Keith
, but where you can specify a vector of color values. Is there a package that has such functionality already, and if not, what would be most elegant way to approach it? If it matters, I'm running R 2.9.1 on XP 32-bit. Thanks for any suggestions. -- Keith

[R] Vista truncated Sys.getenv("PATH") when and only when running as administrator

2009-11-26 Thread Keith Ponting
MONETARY=English_United Kingdom.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United Kingdom.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base This may be related to http://tolstoy.newcastle.edu.au/R/e6/devel/09/01/0259.ht

[R] multidimensional point.in.polygon??

2009-12-04 Thread Keith Jewell
hink there must be a better way of testing for a point inside a polygon, I'd have 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/list

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

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

[R] global variables in a function

2009-12-10 Thread Keith Jones
Y'all, I would like to have most of the variables in my function to be global instead of local. I have not found any references that tell me now to do that. If I have missed a reference please excuse me and tell me what I have missed. Thanks, Keith

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

2009-12-10 Thread Keith Jewell
al/fileexchange/10226-inhull> of (what looks like) my algorithm. I don't 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

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

2009-12-11 Thread Keith Jewell
in reason I thought it non-trival (for me) to code in R was my ignorance; lines like... nullsp = null(xyz(tess(i,2:end),:) - repmat(xyz(tess(i,1),:),p-1,1))'; ...seem important but I don't know what 'null' and 'repmat' do. I don't even understand the algebra bei

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

2009-12-18 Thread Keith Jewell
, if anyone has comments, criticisms, suggestions for improvement I would be interested. Enjoy! Keith Jewell inhull <- function(testpts, calpts, hull=convhulln(calpts), tol=mean(mean(abs(calpts)))*sqrt(.Machine$double.eps)) { # # R implementation of the Matlab

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" wrote in message news:de4e29f50912180238m45c4b7c

[R] Problem with expand.grid

2009-12-22 Thread Keith Jewell
.9.0) 'stringsAsFactors' argument to expand.grid() was not working: it now does work but has default TRUE 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... Ke

Re: [R] Problem with expand.grid

2009-12-22 Thread Keith Jewell
ent has 100 rows, data has 10 "Keith Jewell" 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,

Re: [R] Problem with expand.grid

2009-12-22 Thread Keith Jewell
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! Seasonal greetings to all, Keith Jewell "Prof Brian Ripley" wrote in message

Re: [R] Wilcoxon nonparametric p-values

2009-05-19 Thread Keith Jewell
I just tried it in Minitab and got -- Test of median = 8.500 versus median not = 8.500 N for Wilcoxon Estimated N Test Statistic P Median C1 20 19 80.5 0.573 8.460 - One tailed gave me closer to the textbook, but still not

[R] subset POSIXct

2009-06-22 Thread Keith Jones
subset of the rows where the minutes are 53. The hour is immaterial. I can not find a wildcard character to use to select the rows. as.character(wtd$dt) %in% "2009-06-21 ??:53:00" or as.character(wtd $dt) %in% "2009-06-21 **:53:00" does not work. What would you recomm

Re: [R] Factor to continuous

2009-04-14 Thread Keith Jewell
I suspect the OP is looking for FAQ 7.10 http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-convert-factors-to-numeric_003f HTH Keith J "Luc Villandre" wrote in message news:49e495fe.1090...@dms.umontreal.ca... > Hi, > > You'll need to be more specific about th

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" 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 can I find the corresp

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

2010-01-26 Thread Keith Jewell
aths()), basename(.libPaths( > .libPaths() [1] "//Server02/stats/R/library/2.10" "//Server02/stats/R/R-Current/library" doesn't actually change the internal paths. I don't see the problem in V2.9.2 . I do see the problem in V2.10.1, V2.10.1 Patched (2010-01-24

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

2010-01-26 Thread Keith Jewell
the same result, especially when (as in this case) the syntax of the file spec... > .libPaths()[1] [1] "//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 Explo

[R] Linear regression and stand deviation at the Linux command line

2024-08-22 Thread Keith Christian
seems most capable of generating. standard_deviation_data.csv file contents (Are line numbers, commas, etc. needed or no?) 1 16837 2 9498 3 31389 4 2365 5 17384 Many thanks, --Keith __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more,

Re: [R] Linear regression and stand deviation at the Linux command line

2024-08-23 Thread Keith Christian
Hi Ivan, Thanks for the suggestions. Will try them. Keith On Fri, Aug 23, 2024 at 1:57 AM Ivan Krylov wrote: > > В Thu, 22 Aug 2024 13:07:37 -0600 > Keith Christian пишет: > > > I'm interested in R construct(s) to be entered at the command > > li

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 could

Re: [R] XLSX package + Excel creation question

2013-09-04 Thread Keith Jewell
al to.) and a value. For example, the following format displays numbers that are less than or equal to 100 in a red font and numbers that are greater than 100 in a blue font. [Red][<=100];[Blue][>100] -- R package xlsx allows such formats (?DataFormat) as does R package

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] 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: http://stackoverflow.com/questions/14276

[R] How do I get Garamond font in R?

2013-01-17 Thread Keith Weintraub
Folks, I run R on a early 2009 MacBook Pro running Mountain Lion. I have a bunch of fonts in my user Library one of which is Garamond. I have tried the ttf_import function to no avail. I played with this for a couple of hours at least and I have gotten nowhere. Here is a bit of one of my sess

Re: [R] Query on package to use for investment quotes

2013-01-29 Thread Keith Weintraub
Bruce, Have you looked at the Edgar database here: http://www.sec.gov/edgar.shtml You should be able to get daily mutual fund quotes. KW -- [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mail

[R] Packages with functionality related to Oil/Gas exploration

2013-01-30 Thread Keith Weintraub
Folks, As the subject describes: I would like to know if there are packages that have functionality tailored for standard Oil/Gas exploration and monetization. Thanks, KW -- [[alternative HTML version deleted]] __ R-help@r-project.org maili

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,

[R] What happened to "financial" package?

2013-02-26 Thread Keith Weintraub
Folks, I have been using the cf function from the "financial" package for a few years now. Upon updating my version of R to ... I found that the package no longer exists in the main collection of R packages. Has this package been renamed or merged with another package? If the functionality i

Re: [R] What happened to "financial" package?

2013-02-27 Thread Keith Weintraub
is still a problem please let me know. Also I read the digests daily. What is the best way to reply to a message in the digest? Thanks for the help, KW > On 26/02/2013 14:45, Keith Weintraub wrote: >> Folks, >> I have been using the cf function from the "financial" pack

[R] string split at xth position

2013-03-13 Thread Keith Weintraub
Here is another way require(stringr) aaa<-paste0("a", 1:20) bbb<-paste0("b", 101:120) ab<-paste0(aaa,bbb) ab ptrn<-"([ab][[:digit:]]*)" unlist(str_extract_all(ab, ptrn)) > Hi, > > I have a vector of strings like: > c("a1b1","a2b2","a1b2") which I want to spilt into two parts like: > c("a1"

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: > > > > Perhaps also, a pointer to a comprehensive and correct document that details model formulae syntax if someone has one? > > Thanks& Best

[R] Estimating credit card default probabilities.

2012-10-25 Thread Keith Weintraub
Folks, I am working on a credit card defaults and transition probabilities. For example a single credit card account could be in a number of states: up-to-date, 30, 60, 90 days in arrears or in default. * Are there packages in R that do estimation of the transition probabilities given historica

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 [[a

[R] Aggregate data frame across columns

2012-11-07 Thread Keith Weintraub
Folks, I have a data frame with columns 200401, 200402, ..., 201207, 201208. These represent years/months. What would be the best way to sum these columns by year? What about by quarter? Thanks for your time, KW -- [[alternative HTML version deleted]] __

Re: [R] Aggregate data frame across columns

2012-11-07 Thread Keith Weintraub
Arun, Jeff, Bert, Thanks for your help. I have put a subset of my data below in mySubset. I would like to be able to sum the rows by year. In this case the results would be the result data.frame below. How can I automate something like this and how would I do it quarterly if necessary. The

[R] Creating yyyymm regexp strings on the fly for aggregation.

2012-11-08 Thread Keith Weintraub
Folks, This question is somewhat related to a previous posting of mine. I just can't seem to create a generic solution. Here is a function that I found searching around the internet: splitIt <- function(x, n) {split(x, sort(rank(x) %% n))} I use it like so: > splitIt(1:12, 2) $`0` [1] 1 2 3 4

Re: [R] Creating yyyymm regexp strings on the fly for aggregation.

2012-11-09 Thread Keith Weintraub
names(res) <- as.integer(names(res)) + 1L >res > } > > fun(2010:2011, 1) > fun(2010:2011, 2) > fun(2010:2011, 4) > fun(2010:2011, 12) > > > Hope this helps, > > Rui Barradas > Em 09-11-2012 03:39, Keith Weintraub escreveu: >> Folks, >>

[R] Question about VAR (Vector Autoregression) in differences.

2012-11-21 Thread Keith Weintraub
Folks, I have been using the VAR {vars} program to find a fit for the following bi-variate time series (subset): bivariateTS<-structure(c(0.950415958293559, 0.96077848972081, 0.964348957109053, 0.967852884998915, 0.967773510751625, 0.970342843688257, 0.97613937178359, 0.980118627997436, 0.98

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 t

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 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", month.nam

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 prcomp

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] 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 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] R licensing query

2010-06-17 Thread Ed Keith
e not permuted me to install Vim on my computer. I had to use MS Visual C++ editor or MS Notepad for all text editing. Since I usually get payed by the hour, it just cost them more, and increases my income, but I still find it incredibly annoying. -EdK Ed Keith e_...@yahoo.com Blog: edkeith.blogspo

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" wrote in message news:4c28777f.1040...@pburns.seanet.com... > If I understand the problem properly, &

Re: [R] F# vs. R

2010-07-08 Thread Ed Keith
It's been a long time since I used Fortran, and I have only dabbled in F#, but I do not think translating Fortran (or R) to F# will be easy. F# is basicly a functional language (like ML) and a very differant mind set than Fortran (or R). -EdK Ed Keith e_...@yahoo.com

[R] nls with some coefficients fixed

2010-07-19 Thread Keith Jewell
ant to get into nls internals. Any suggestions? Thanks in advance, Keith J __ 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-guide.html and provide

  1   2   3   4   >