Re: [R] Issue with littler vs. R and source()

2025-03-08 Thread Steve Martin via R-help
Hi John, Does it work if you run R CMD r -i FailBill.R? Steve Original Message On 3/7/25 10:45, J C Nash wrote: > I want to use littler (i.e. "r -i ") to run an R script so I can > set up a clickable icon for a program which uses package staplr. > Act

Re: [R] Unable to add the CRAN apt repository

2023-12-04 Thread Steve Gutreuter
Yes, thanks. On Mon, 2023-12-04 at 14:08 -0500, Steve Gutreuter wrote: > Thanks!  "jammy" made it work.   > > For some reason,  lsb_release -cs is returning "victoria" rather than "jammy", > and > > $> sudo apt update > Hit:1 http://a

Re: [R] Unable to add the CRAN apt repository

2023-12-04 Thread Steve Gutreuter
tu jammy-cran40/ InRelease [3,626 B] Get:9 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ Packages [41.2 kB] A Mint problem?   On Mon, 2023-12-04 at 21:57 +0300, Ivan Krylov wrote: > On Mon, 04 Dec 2023 13:41:47 -0500 > Steve Gutreuter wrote: > > > $> sudo /us

[R] Unable to add the CRAN apt repository

2023-12-04 Thread Steve Gutreuter
//cloud.r-project.org/bin/linux/ubuntu victoria-cran40/ Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. Any hints will be much appreciated! -- Steve Gutreuter [[a

Re: [R] How long does it take to learn the R programming language?

2022-09-27 Thread Steve Pointer
en follow the on-screen guide. Steve P __ 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] readxl question

2020-08-26 Thread Upton, Stephen (Steve) (CIV)
>From your example, it appears you are reading in the same excel file for each function to get a value. I would look at creating a function that extracts what you need from each file all at once, rather than separate reads. Stephen C. Upton SEED (Simulation Experiments & Efficient Designs) Center

Re: [R] Help with a third ggplot error

2019-06-17 Thread Upton, Stephen (Steve) (CIV)
And slightly differently with strcapture (using Jim Lemon's reprex): mydf <- strcapture("([a-zA-Z ]+)([0-9]+\\.[0-9]+)",scdf$V1,data.frame(Channel="none",Price=0)) change the regex as needed, following Boris' advice. steve On 6/17/19, 5:09 AM, "R-h

[R] Trouble building R 3.5.0 under Ubuntu 18.04

2018-05-22 Thread Steve Gutreuter
ibR.so' failed make[3]: *** [libR.so] Error 1 make[3]: Leaving directory '/home/steve/src/R/R-3.5.0/src/main' Makefile:135: recipe for target 'R' failed How does one set the -fPIC flag? I have never had trouble compiling under Mint, which is based on Ubuntu. Thanks! Stev

Re: [R] boot.stepAIC fails with computed formula

2017-08-22 Thread Steve O'Hagan
The error is "the model fit failed in 50 bootstrap samples Error: non-character argument" Cheers, SOH. On 22/08/2017 17:52, Bert Gunter wrote: Failed? What was the error message? Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking t

[R] Apply a multi-variable function to a vector

2016-09-09 Thread Steve Kennedy
s? I'd like something that would simply work from the definition of the function. If that is possible. Thanks, Steve Kennedy CONFIDENTIALITY NOTICE: This e-mail message, including a...{{dropped:11}} __ R-help@r-project.org mailing list -- To UN

Re: [R] Trouble getting rms::survplot(..., n.risk=TRUE) to behave properly

2016-06-02 Thread Steve Lianoglou
Ah! Sorry ... should have dug deeper into the examples section to notice that. Thank you for the quick reply, -steve On Thu, Jun 2, 2016 at 8:59 AM, Frank Harrell wrote: > This happens when you have not strat variables in the model. > > > -- > Fra

[R] Trouble getting rms::survplot(..., n.risk=TRUE) to behave properly

2016-06-02 Thread Steve Lianoglou
3.3 rpart_4.1-10 [25] sandwich_2.3-4 scales_0.4.0mvtnorm_1.0-5 [28] foreign_0.8-66 chron_2.3-47zoo_1.7-13 === Thanks, -steve -- Steve Lianoglou Computational Biologist Genentech __ R-help@r-project.org mailing list

[R] "predict" values from object of type "list"

2016-02-17 Thread Steve Ryan
Hi Guys, I could need some help here. I have a set of 3d points (x,y,v). These points are not randomly scattered but lie on a surface. This surface can be taken as a calibration plane for x and y -values. My goal is to quantify this surface and than predict the v-values for given pairs of x- and y

Re: [R] Special characters in regular expressions

2015-09-24 Thread Upton, Stephen (Steve) (CIV)
and a somewhat convoluted solution, if A or K are always in the second "position" x <- c("LBAM 5|A|15C|3h", "LBAM 5|K|15C|2h") unlist(lapply(strsplit(x,"\\|"),function(y) paste(y[c(1,3,4)],collapse="|"))) Stephen C. Upton SEED (Simulation Experiments & Efficient Designs) Center Operations Rese

Re: [R] Hep with regex! - combination of ^, |, \\, _ and $

2015-09-18 Thread Upton, Stephen (Steve) (CIV)
And unless I'm mistaken, escaping the underscore is superfluous (I'd be curious to know if it's a function of locale). x[grep("_", x)] x[grep("^q10.*_1$", x)] both work. steve Stephen C. Upton SEED (Simulation Experiments & Efficient Designs) Cent

[R] apply with multiple references and database interactivity

2015-08-15 Thread Steve E.
. More details on what the script is accomplishing are included below. Thanks in advance for your help and consideration. Steve Here, I have a df that includes a list of keywords that need to be edited, and the corresponding edit. The script goes through a database of people, identifies whether any

Re: [R] Opposite color in R

2015-07-27 Thread Steve Taylor
I wonder if the hcl colour space is useful? Varying hue while keeping chroma and luminosity constant should give varying colours of perceptually the same "colourness" and brightness. ?hcl pie(rep(1,12),col=hcl((1:12)*30,c=70),border=NA) -Original Message- From: R-help [mailto:r-help-b

[R] modifying a package installed via GitHub

2015-07-17 Thread Steve E.
ckage (and, conversely, how to uninstall my local, modified version if I wanted to go back to the unmodified version available on GitHub). Any advice would be appreciated. Thanks, Steve -- View this message in context: http://r.789695.n4.nabble.com/modifying-a-package-installed-via-GitHub-tp4710016

[R] valid LRT between MASS::polr and nnet::multinom

2015-07-07 Thread Steve Taylor
ratio test", data.name = "housing" ), class='htest' ) print(mytest) # If you want to see the fitted results: library(effects) plot(allEffects(polr1), layout=c(3,1), ylim=0:1) plot(allEffects(mnom1), layout=c(3,1), ylim=0:1) many thanks, Steve __

Re: [R] Subset() within function: logical error

2015-06-29 Thread Steve Taylor
Using return() within a for loop makes no sense: only the first one will be returned. How about: alldf.B = subset(alldf, stream=='B') # etc... Also, have a look at unique(alldf$stream) or levels(alldf$stream) if you want to use a for loop on each unique value. cheers,

Re: [R] Call to a function

2015-06-23 Thread Steve Taylor
Note that objects can have more than one class, in which case your == and %in% might not work as expected. Better to use inherits(). cheers, Steve -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Steven Yen Sent: Wednesday, 24 June 2015 11:37a To

Re: [R] Plotting Confidence Intervals

2015-05-03 Thread Steve Taylor
Have you tried: library(effects) plot(allEffects(ines),ylim=c(460,550)) -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Andre Roldao Sent: Saturday, 2 May 2015 2:50p To: r-help@r-project.org Subject: [R] Plotting Confidence Intervals Hi Guys, It's the

Re: [R] cbind question, please

2015-04-24 Thread Steve Taylor
This works for me... get0 = function(x) get(x,pos=1) sapply(big.char, get0) The extra step seems necessary because without it, get() gets base::cat() instead of cat. cheers, Steve -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Erin Hodgess Sent

[R] operations on columns when data frames are in a list

2015-04-13 Thread Steve E.
Hello R folks, I have recently discovered the power of working with multiple data frames in lists. However, I am having trouble understanding how to perform operations on individual columns of data frames in the list. For example, I have a water quality data set (sample data included below) that c

Re: [R] regex find anything which is not a number

2015-03-12 Thread Steve Taylor
How about letting a standard function decide which are numbers: which(!is.na(suppressWarnings(as.numeric(myvector Also works with numbers in scientific notation and (presumably) different decimal characters, e.g. comma if that's what the locale uses. -Original Message- From: R-help

[R] Extract year from date

2015-03-08 Thread Steve Archambault
17 18 BC-0003 41795 168.85 2018 19 BC-0004 41795 266.95 2119 20 BC-0002 41801 330.41 2220 21 BC-0003 41905 169.75 2321 22 BC-0004 41905 267.75 2422 23 BC-0002 41906 321.01 2523 Any help would be greatly

Re: [R] Date extract Year

2015-03-08 Thread Steve Archambault
17 18 BC-0003 41795 168.85 2018 19 BC-0004 41795 266.95 2119 20 BC-0002 41801 330.41 2220 21 BC-0003 41905 169.75 2321 22 BC-0004 41905 267.75 2422 23 BC-0002 41906 321.01 2523 Any he

Re: [R] Using dates in R

2015-03-04 Thread Steve Taylor
> today <- as.Date("2015-03-04") # default format Better is: today <- Sys.Date() S -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of William Dunlap Sent: Thursday, 5 March 2015 7:47a To: Brian Hamel Cc: r-help@r-project.org Subject: Re: [R] Using dates

Re: [R] Scraping HTML using R

2015-02-05 Thread Steve Lianoglou
tla* > *-* > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help >

Re: [R] Fastest way to calculate quantile in large data.table

2015-02-05 Thread Steve Lianoglou
m <- matrix(rnorm(1e6), nrow=10) R> d <- as.data.table(m) R> idxs <- sample(1:nrow(m), 500, replace=TRUE) R> system.time(for (i in idxs) x <- m[i,]) user system elapsed 0.497 0.169 0.670 R> system.time(for (i in idxs) x <- d[i,]) ## I killed it after waiting

Re: [R] the less-than-minus gotcha

2015-02-02 Thread Steve Taylor
= `<-` # this is going in my .Rprofile x := 1 -Original Message- From: Jeff Newmiller [mailto:jdnew...@dcn.davis.ca.us] Sent: Tuesday, 3 February 2015 3:54p To: Steve Taylor; r-h...@stat.math.ethz.ch Subject: Re: [R] the less-than-minus gotcha I did not start out liking <-, but I

Re: [R] the less-than-minus gotcha

2015-02-02 Thread Steve Taylor
I disagree. Assignments in my code are all lines that look like this: variable = expression They are easy to find and easy to read. -Original Message- From: Ista Zahn [mailto:istaz...@gmail.com] Sent: Tuesday, 3 February 2015 3:36p To: Steve Taylor Cc: r-h...@stat.math.ethz.ch Subject

Re: [R] the less-than-minus gotcha

2015-02-02 Thread Steve Taylor
mple of bad (obfuscated) coding, IMHO; it should be done in two lines for clarity as follows: x = y foo(x) > Using = has it's problems too. Same goes for apostrophes. Shall we discuss putting "else" at the start of line next? cheers, Steve _

Re: [R] the less-than-minus gotcha

2015-02-01 Thread Steve Taylor
All the more reason to use = instead of <- -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ben Bolker Sent: Monday, 2 February 2015 2:07p To: r-h...@stat.math.ethz.ch Subject: Re: [R] the less-than-minus gotcha Mike Miller gmail.com> writes: > > I've

Re: [R] loops in R

2014-11-05 Thread Steve Lianoglou
long run. HTH, -steve On Wed, Nov 5, 2014 at 10:02 AM, Don McKenzie wrote: > Have you read the tutorial that comes with the R distribution? This is a > very basic database calculation that you will > encounter (or some slight variation of it) over and over. The solution is a

[R] Webdings font on pdf device

2014-11-03 Thread Steve Taylor
unknown AFM entity encountered R> plot(-3:3,-3:3,type='n',xlab='',ylab='',axes=FALSE) R> text (rnorm(26),rnorm(26),LETTERS,cex=2) There were 27 warnings (use warnings() to see them) R> graphics.off() R> warnings()[1] Warning message: In text.default(rnorm(26

[R] Extract model from deriv3 or nls

2014-09-18 Thread Riley, Steve
quot;, Vmax, VmaxT, K, Kt) What I would like to do is find something that returns: rate ~ (Vmax + VmaxT*state) * conc/(K + Kt * state + conc) Is there a way to extract this? Please advise. Thanks for your time. Steve 860-441-3435 [[alternative HTML version deleted]] _

Re: [R] NA's introduced by coercion

2014-08-26 Thread Steve Lianoglou
Hi Madhvi, First, please use "reply-all" when responding to emails form this list so that others can help (and benefit from) the discussion. Comment down below: On 26 Aug 2014, at 22:15, madhvi.gupta wrote: On 08/27/2014 10:42 AM, Steve Lianoglou wrote: Hi, On Tue, Aug 26, 20

Re: [R] NA's introduced by coercion

2014-08-26 Thread Steve Lianoglou
trying to do with your data after you convert it to a "numeric" -steve -- Steve Lianoglou Computational Biologist Genentech __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] applying operations within() a matrix's environment

2014-07-04 Thread Steve Bellan
™ve also changed the code slightly below Thanks for pointing this out! Steve set.seed(1) K <- 10 v1 <- rnorm(K) v2 <- rnorm(K) v3 <- rnorm(K) steps <- 5 row.active <- matrix(rbinom(K*steps, 1, .7), nr = K, nc = steps)==1 ## changed cbind(v1,v2,v3) for(ii in 1:steps) {

[R] applying operations within() a matrix's environment

2014-07-03 Thread Steve Bellan
k on objects that aren’t environments such as matrices. > + . + Error in UseMethod("within") : no applicable method for 'within' applied to an object of class "c('double', 'numeric’)" It’s important that I keep this as a matrix and not a

Re: [R] Using R Studio Version 0.98.507, having trouble with read.table and an Excel CSV file, keep getting '+'

2014-06-21 Thread Steve Friedman
Hello Richard Initially it appears that you left off a closing " mark at the end of the file name. Also why don't you use read csv? Steve On Jun 21, 2014 12:01 PM, "Richard Lerner" wrote: > I saved what I consider a medium size Excel file--about 2000x 40 as a CSV. &

Re: [R] stop subscribing mailing list

2014-05-21 Thread Steve Friedman
Then unsubscribe. On May 21, 2014 10:00 AM, "han...@purdue.edu" wrote: > Dear, > > I would like to stop to receive any email from R-help mailing list for > this email address. Thank you. > > > Mingxuan Han > > __ > R-help@r-project.org mailing list > ht

Re: [R] help incorporating data subset lengths in function with ddply

2014-04-17 Thread Steve E.
Jeff - Thanks so very much for the solution and tips, all very much appreciated! Regards, Stevan -- View this message in context: http://r.789695.n4.nabble.com/help-incorporating-data-subset-lengths-in-function-with-ddply-tp4688926p4688999.html Sent from the R help mailing list archive at Nabbl

Re: [R] help incorporating data subset lengths in function with ddply

2014-04-16 Thread Steve E.
Hi Frede - Thank you for responding. Not quite what I am after. Notice that I included two data sets in my post, the first is the raw data whereas the second (the desired df) is similar but has a column of sequential numbers in another column at the end - that column of sequential numbers for each

[R] help incorporating data subset lengths in function with ddply

2014-04-16 Thread Steve E.
Dear R Community, I am having some trouble with a task that I hope you might be able to help with. I have a dataset that includes the time and corresponding stream discharge from numerous storms (example of structure with simplified data below). I would like to produce a field that details the dur

Re: [R] R, RStudio, and a server for my iPad.

2014-04-11 Thread Steve Lianoglou
or you to see if taking one of the 2 avenues of setting up RStudio Server yourself would be worth the pain. HTH, -steve On Fri, Apr 11, 2014 at 2:34 PM, John Sorkin wrote: > Steve, > Thank you for your help. > I have seen the material you have sent me to, but do not fully > understand i

Re: [R] R, RStudio, and a server for my iPad.

2014-04-11 Thread Steve Lianoglou
h?utf8=✓&query=ios&commit=Search HTH, -steve -- Steve Lianoglou Computational Biologist Genentech __ 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/post

Re: [R] How to make a proper use of blocking in limma using voom

2014-04-07 Thread Steve Lianoglou
in advance for the help. Noodle on that a bit and if you still have questions, please do post a follow up question on the bioconductor list. Btw, to help make your question more interpretable, since we don't have your targets file, I think it would be easier for us if you copy/paste the output o

Re: [R] Computing predictive values

2014-03-30 Thread steve tom
hundreds of subsets. I build all my lines in excel, concatenate, then copy and paste into R to save time. Cheers Steve -- View this message in context: http://r.789695.n4.nabble.com/Computing-predictive-values-tp4687832p4687844.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] forecasting

2014-03-29 Thread steve tom
Hi DM, I'm currently dealing with very similar issues. To date I've been exporting regression outputs in mass quantities (updated every 5 days) to excel, and manually linking to data to get my predictions. I've been doing a ton of research on forecast, caret, and SEM packages and am still empty

[R] Computing predictive values

2014-03-29 Thread steve tom
Hi All, I was unable to find help in search history. I have all my regression outputs in my environment tab, and wish to "run" them against my data, so that instead of having to export regression outputs to excel, and manually connect data-regression. I have predictive regressions that forecast

[R] Learn R in a Day - new ebook

2014-02-22 Thread Steve Murray
ader is encouraged to replicate on their computer. Each chapter also includes exercises (with solutions) to practice key skills and empower the reader to build on the essentials gained during this introductory course. Steve Murray [[alternative

Re: [R] Trying to install package for LMER, getting a ton of errors

2014-02-03 Thread Steve Lianoglou
tools/ http://cran.r-project.org/doc/manuals/R-admin.html#The-Windows-toolset HTH, -steve > --- Please select a CRAN mirror for use in this session --- > also installing the dependencies 'Matrix', 'minqa', 'Rcpp', 'RcppEigen' > > trying URL &#x

Re: [R] a better method than a long expression with many OR clauses

2013-12-17 Thread Steve Lianoglou
== 3: R> is.case <- rowSums(as.matrix(dd[, 3:11]) == 3) > 0) Unwind that one liner into it's individual parts to see who is doing what there. HTH, -steve -- Steve Lianoglou Computational Biologist Genentech __ R-help@r-project.org mailing

Re: [R] Exporting R graphics into Word without losing graph quality

2013-12-16 Thread Steve Taylor
> From: Duncan Murdoch... > Don't use a bitmap format (png). I disagree. Each vector format comes with its own problems. > Don't produce your graph in one format (screen display), then convert to > another (png). Open the device in the format you want for the final file. Agreed. > Use a vect

Re: [R] Exporting R graphics into Word without losing graph quality

2013-12-16 Thread Steve Taylor
, ...) } word.tif('test') plot(rnorm(100)) dev.off() Now drag the file test.tif into your Word document. Sure, it's a bitmap format rather than a vector format, but the quality is excellent and the file sizes are still quite small. None

Re: [R] Thoughts for faster indexing

2013-11-26 Thread Steve Lianoglou
group days_since <- date - d$date[.I -1] w <- exp(-days_since / decay) ## ... ## Some other stuff you are doing here which I can't ## understand with temp ... then multiple the 'score' column ## for the given row by the your correctly calculated weight `w` ## for th

Re: [R] Should there be an R-beginners list?

2013-11-24 Thread Steve Lianoglou
" https://github.com/ialbert/biostar-central Someone would just need to host it, though. Given SO's critical mass, though, I think it's hard to argue against simply using that. -steve -- Steve Lianoglou Computational Biologist Genentech ___

Re: [R] FW: Library update from version

2013-09-30 Thread Steve Lianoglou
Hi, On Mon, Sep 30, 2013 at 12:44 PM, Ista Zahn wrote: > On Mon, Sep 30, 2013 at 2:49 PM, Steve Lianoglou > wrote: >> Hi, >> >> On Mon, Sep 30, 2013 at 11:12 AM, Cem Girit wrote: >>> Hello, >>> >>> >>> >>> I

Re: [R] FW: Library update from version

2013-09-30 Thread Steve Lianoglou
e? A bit of googling could have provided several answers. This post in particular has a few answers from some people who know what they're doing w/ R, so probably a good place to start: http://stackoverflow.com/questions/1401904/painless-way-to-install-a-new-version-of-r-on-windows HTH, -stev

Re: [R] Calculating euclidean distance in R

2013-09-27 Thread Upton, Stephen (Steve) (CIV)
?read.csv to read your data in, then ?dist to calculate distances. steve -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Debasish Sahu Sent: Friday, September 27, 2013 12:26 AM To: r-help@r-project.org Subject: [R] Calculating

Re: [R] Console Output Formatting

2013-09-04 Thread Steve Friedman
Depending on the OS you are working with awk or gawk are great utilities for stripping columns from files. Also if you use a spreadsheet it is quite easy to drop a column. On Sep 4, 2013 5:59 PM, "Noah Silverman" wrote: > Hi, > > Working with R, I often want to copy and paste some values somewhe

Re: [R] why is this a factor?

2013-08-29 Thread Steve Lianoglou
Hi, On Thu, Aug 29, 2013 at 3:03 PM, Rolf Turner wrote: > On 29/08/13 12:10, Ista Zahn wrote: >> >> On Wed, Aug 28, 2013 at 7:44 PM, Steve Lianoglou >> wrote: >>> >>> Hi, >>> >>> On Wed, Aug 28, 2013 at 3:58 PM, Ista Zahn wro

Re: [R] why is this a factor?

2013-08-28 Thread Steve Lianoglou
then break when you go the nuclear-global-override route. -steve -- Steve Lianoglou Computational Biologist Bioinformatics and Computational Biology Genentech __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do r

Re: [R] how to use a column name from the data frame in the function

2013-08-22 Thread Steve Lianoglou
hing to do is to use some combo of substitute/eval/quote and friends, I'd strongly encourage you to think again ... -steve -- Steve Lianoglou Computational Biologist Bioinformatics and Computational Biology Genentech __ R-help@r-project.org ma

Re: [R] First time r user

2013-08-18 Thread Steve Lianoglou
ce you read and understand the looping-patterns section, you'll be able to handle your data like a pro and you can move on to asking more interesting questions ;-) If something is unclear there, though, please do raise that issue. HTH, -steve On Sun, Aug 18, 2013 at 7:22 AM, Bert Gunt

Re: [R] First time r user

2013-08-18 Thread Steve Lianoglou
, ff. Look at the HPC Task view for more info along those lines: http://cran.r-project.org/web/views/HighPerformanceComputing.html > > Best regards and again thank you for the help, > > Paul > El 18/08/2013 02:35, "Steve Lianoglou" escribió: > >> Hi Paul, >

Re: [R] First time r user

2013-08-18 Thread Steve Lianoglou
ough, data.table enables one to do split/apply/combine calculations over these data quite efficiently. The first time I used it, I was honestly blown away. If you find yourself wanting to work with such data, you could do worse than read through data.table's vignette and FAQ and give it a spin. H

Re: [R] First time r user

2013-08-17 Thread Steve Lianoglou
ather beautiful), but when my data gets into the 1000++ rows, I'll universally switch to data.table. HTH, -steve On Sat, Aug 17, 2013 at 4:33 PM, Dylan Doyle wrote: > > Hello R users, > > > I have recently begun a project to analyze a large data set of approximately >

[R] bySum error in ffbase package ?

2013-08-16 Thread Steve Chen
d to a 'numeric', not a 'symbol' Any idea ? Steve Chen [[alternative HTML version deleted]] __ 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] Matrix Multiplication using R.

2013-08-15 Thread Steve Taylor
The function crossprod() might be useful? crossprod(X) is a more efficient way of producing t(X) %*% X -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Praveen Surendran Sent: Thursday, 15 August 2013 10:30p To: r-help@r-project.

Re: [R] How can I create a data.table with 1000 variables (Var1:Var1000)

2013-08-15 Thread Steve Taylor
How about this: df1000cols = setNames(as.data.frame(matrix(numeric(0),ncol=1000)),paste0("V",1:1000)) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Pooya Lalehzari Sent: Friday, 16 August 2013 8:27a To: Bert Gunter Cc: r-help@r

Re: [R] How to extract last value in each group

2013-08-15 Thread Steve Lianoglou
Hi, On Thu, Aug 15, 2013 at 4:03 PM, arun wrote: > HI Steve, > > Thanks for testing. > > When I run a slightly bigger dataset: > set.seed(1254) > name<- sample(letters,1e7,replace=TRUE) > number<- sample(1:10,1e7,replace=TRUE) > > datTest<- data.f

Re: [R] How to extract last value in each group

2013-08-15 Thread Steve Lianoglou
ystem.time(res7<- dat2[cumsum(rle(dat2[,1])$lengths),]) user system elapsed 0.292 0.004 0.294 There's got to be some other explanation for the heavily degraded performance you're observing... our R & data.table versions also match. -steve -- Steve Lianoglou Computation

Re: [R] How to extract last value in each group

2013-08-15 Thread Steve Lianoglou
always assume that the data has been handed to me by a rather clever and insidious adversary and taking steps to ensure you are getting what you want (whether using an index on a data.table, or some combo of split + max/which.max) probably is a good way to go. My 2 cents, -steve -- Steve Liano

Re: [R] How to extract last value in each group

2013-08-14 Thread Steve Lianoglou
Or with plyr: R> library(plyr) R> ans <- ddply(x, .(Date), function(df) df[which.max(df$Time),]) -steve On Wed, Aug 14, 2013 at 2:18 PM, Steve Lianoglou wrote: > While we're playing code golf, likely faster still could be to use > data.table. Assume your data is in a

Re: [R] How to extract last value in each group

2013-08-14 Thread Steve Lianoglou
While we're playing code golf, likely faster still could be to use data.table. Assume your data is in a data.frame named "x": R> library(data.table) R> x <- data.table(x, key=c('Date', 'Time')) R> ans <- x[, .SD[.N], by='Date'] -steve

Re: [R] How to "vectorize" subsetting

2013-08-14 Thread Steve Lianoglou
ons, run (don't walk) over to check out the plyr package: http://plyr.had.co.nz And read through this relevant chapter in Hadley's book: https://github.com/hadley/devtools/wiki/functionals#data-structure-functionals It will take you through looping, to *apply-ing, to plyr-ing HT

Re: [R] Off-topic? Linux laptop for R

2013-08-11 Thread Steve Lianoglou
nux well. Once you satisfy that constraint, I'm relatively sure that the chances of running R "well" is quite high. Whether or not the machine can run R well doesn't say much about how easily linux will be installed (and fully functional). HTH, -steve On Sun, Aug 11, 2013 at 1:19

Re: [R] Advice on use of R for Generalised Linear Modelling

2013-08-11 Thread Steve Lianoglou
n large data. If your data can actually be loaded (perhaps via a sparse matrix), then you can try that. HTH, -steve -- Steve Lianoglou Computational Biologist Bioinformatics and Computational Biology Genentech __ R-help@r-project.org mailing list h

Re: [R] ifelse() applied on function

2013-08-11 Thread Steve Lianoglou
t; return()) > > Really appreciate if someone helps me out. How about something like: loop <- if (ChooseFn) lapply else sfLapply result <- loop(MyList, function(x) { ## ... }) Should work as long as `sfLapply` has same function signature as lapply. HTH, -steve -- Steve Lian

Re: [R] glmnet inclusion / exclusion of categorical variables

2013-08-09 Thread Steve Lianoglou
for that. Quick googling over CRAN suggests: grplasso: http://cran.r-project.org/web/packages/grplasso/index.html standGL: http://cran.r-project.org/web/packages/standGL/index.html gglasso: http://code.google.com/p/gglasso/ Unfortunately it doesn't look li

Re: [R] Why is mclappy slower than apply in this case?

2013-08-08 Thread Steve Lianoglou
.html -steve On Thu, Aug 8, 2013 at 9:52 AM, Bert Gunter wrote: > Tomas: > > Do some reading on parallelization. > > Parallelizing code requires the overhead of setting up, keeping track > of, synching the separate threads. Whether that overhead is worth the > cost depends on

Re: [R] Setting Derived Class Slots

2013-07-17 Thread Steve Creamer
Hi Simon.many thanks to you for your explanation. - I'll check out setReplaceMethod. Point taken on nomenclature too... -- View this message in context: http://r.789695.n4.nabble.com/Setting-Derived-Class-Slots-tp4671683p4671738.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Setting Derived Class Slots

2013-07-17 Thread Steve Creamer
Dohso simple when you know how! That worked straightaway! Thank you Martin! -- View this message in context: http://r.789695.n4.nabble.com/Setting-Derived-Class-Slots-tp4671683p4671737.html Sent from the R help mailing list archive at Nabble.com. ___

[R] Setting Derived Class Slots

2013-07-16 Thread Steve Creamer
14 10* but when the method returns and I type *aTest* I get An object of class "OP_Appt" Slot "Clinic_Name": [1] "Unknown" Slot "Event_Name": [1] "An Event" Slot "Capacity_Profile": [1] 0.2 0.2 0.2 0.2 0.2 0.0 0.0 *Slot "Del

Re: [R] Strange behaviour of R graphics copied to PowerPoint

2013-06-03 Thread Steve Simon, P.Mean Consulting
hen save it, you need to open the graphics window at the "right" size so that the saved BMP or PNG file does not need rescaling in Powerpoint. I hope this makes sense. Graphics are tricky in any package. Steve Simon, www.pmean.com -- View this message in context: http://r.789695.n4.

Re: [R] tree in tree package - Error: cannot allocate vector of size 2.0 Gb

2013-05-31 Thread Steve Lianoglou
oint it asked the OS for another 2gb more, and *bam* ... toasted. If you look at top (or htop) and monitor the R process as it's running, I reckon that's what you'll see, too. HTH, -stee -- Steve Lianoglou Computational Biologist Bioinformatics and Computational Biology Genentec

Re: [R] how to install R 3.0.1

2013-05-31 Thread Steve Friedman
Thanks for the clarification. On May 31, 2013 10:19 AM, "Prof Brian Ripley" wrote: > On 31/05/2013 14:44, Steve Friedman wrote: > >> You can't. You must copy them to the new installation directory. After >> that >> you can use the update package command t

Re: [R] how to install R 3.0.1

2013-05-31 Thread Steve Friedman
You can't. You must copy them to the new installation directory. After that you can use the update package command to check for and install the upgrades packages. On May 31, 2013 9:43 AM, "Upananda Pani" wrote: > Hi John, > > Thanks for your reply .How to Update all the packages ( Which i am alre

Re: [R] Boundaries of consecutive integers

2013-05-26 Thread Steve Taylor
How's this: big.gap = diff(test) > 1 cbind(test[c(TRUE, big.gap)], test[c(big.gap, TRUE)]) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Lizzy Wilbanks Sent: Tuesday, 14 May 2013 1:18p To: r-help@r-project.org Subject: [R] Bound

Re: [R] ecdf --- title suggestion and question

2013-05-08 Thread Steve Lianoglou
ULL gives me two quotation marks ("") . is it > possible to remove the title altogether? R> plot(ee, main="") R> plot(ee, main=NULL) -steve -- Steve Lianoglou Computational Biologist Department of Bioinformatics and Computational Biology Genentech ___

Re: [R] Reading CSV file

2013-04-19 Thread Steve Friedman
Make sure you have the correct path to the file. On Apr 19, 2013 10:53 AM, "Gafar Matanmi Oyeyemi" wrote: > I am trying to read a csv file using the code; > contol <- read.csv("RBS.csv") > This is the error message I got; > Error in file(file, "r") : unable to open connection > In addition: Warni

Re: [R] SVD on very large data matrix

2013-04-08 Thread Steve Lianoglou
: """The irlba package provides a fast way to compute partial singular value decompositions (SVD) of large matrices ..." HTH, -steve -- Steve Lianoglou Defender of The Thesis | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell Universi

Re: [R] read.delim

2013-04-02 Thread Steve Friedman
You have to tell R what the column delimiter is. See Read.table. On Apr 2, 2013 8:28 AM, "Shane Carey" wrote: > Hi, > > Im reading in a .txt file into R that consists of 5 columns, however, when > imported into R, it reads all the data into just one column. Is there a way > of telling R to creat

Re: [R] Elasticnet - Cross validation problem

2013-03-14 Thread Steve Lianoglou
situations where you have all 0 columns as a special case -- I guess you would reduce your feature matrix for that fold, run the goods, then drop the coefs back into the original "columns" they'd belong to as if you ran the training on the full feature matrix. Know what I me

Re: [R] loop in a data.table

2013-03-13 Thread Steve Lianoglou
7;s a bit closer to you real data and the stuff you want to do on it? Are all the columns of the same type? Are you just summing columns? If you post code into an email that reconstructions a small version of your data.table (maybe 5-10 columns and one or two groups) it'd be more clear fo

[R] survfit plot question

2013-03-04 Thread Steve Einbender
e in the Censored observation) Thanks for taking the time to review Steve [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] using a personal template for new R scripts

2013-02-28 Thread Steve Taylor
aims, inputs, outputs etc.) and section comment headings for the various components of what a script does (load packages, get data, process data, produce outputs). cheers, Steve __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l

  1   2   3   4   5   6   7   8   9   10   >