Re: [R] code optimisation problem

2012-11-27 Thread cberry
Rui Barradas ruipbarra...@sapo.pt writes: Hello, Package 'compiler' is good at optimizing for loops. Try the following. Or vectorize the function system.time(f1(x,10)) user system elapsed 5.010.005.00 system.time(f1.c(x,10)) user system elapsed 1.920.00

Re: [R] Help: is there a R Package for L1-regression (not regression with L1-penalty)

2012-11-21 Thread cberry
Chee Chen chee.c...@yahoo.com writes: Dear All, Is there a R package for L1-regression (meaning, optimize the sum of absolute deviations, NOT TO BE UNDERSTOOD as regression with L1-penalty) ? Yes. Any information will be appreciated. See

Re: [R] Question on callNextMethod

2012-11-06 Thread cberry
/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] summation coding

2012-10-19 Thread cberry
djbanana karl79264...@gmail.com writes: Hi, I think I solved it myself by writing loops. What I meant is: are there in-built functions in R that calculate the following: a1(b2+...+b190) + a2(b1+b3+...+b190) + ... Following Rainer's setup: x - data.frame( a = sample( 1:10, 4 ), b =

Re: [R] uniq -c

2012-10-16 Thread cberry
Sam Steingold s...@gnu.org writes: I need an analogue of uniq -c for a data frame. The count.rows() function is the R analogue. See http://orgmode.org/worg/org-contrib/babel/examples/Rpackage.html#sec-6-1 No need to install the package - just copy and paste the function into an R session.

Re: [R] Test for Random Points on a Sphere

2012-10-06 Thread cberry
-sig-geo might get more helpful responses once you can focus the question a bit more. HTH, Chuck Many thanks Lorenzo -- Charles C. BerryDept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty

Re: [R] What makes R different from other programming languages?

2012-08-20 Thread cberry
-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Charles C. BerryDept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San

Re: [R] looking for accessibility help (blind student)

2012-08-08 Thread cberry
: 440.249.4289 [[alternative HTML version deleted]] -- Charles C. BerryDept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901

Re: [R] Poisson Ridge Regression

2012-07-07 Thread cberry
is rseek.org where 'poisson ridge regression' gives lots of hits. If you click on 'functions' there is a link to the 'glmnet' package, which is a solid engine for penalized poisson regression. HTH, Chuck -- Charles C. BerryDept of Family/Preventive Medicine cberry

Re: [R] trouble automating formula edits when log or * are present; update trouble

2012-05-29 Thread cberry
]][[2]][[3]] : subscript out of bounds pj -- Charles C. BerryDept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901

Re: [R] Generate Dendrogram

2012-04-30 Thread cberry
did not follow the example. You used the wrong object in the call to plot() and it dispatched to plot.hclust rather than plot.dendrogram. Try plot( dend1, ... ) HTH, Chuck Br, Luffy -- Charles C. BerryDept of Family/Preventive Medicine cberry at ucsd edu

Re: [R] how to cut files from any folder to another folder?

2012-04-22 Thread cberry
-folder-tp4577818p4577818.html Sent from the R help mailing list archive at Nabble.com. -- Charles C. BerryDept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093

Re: [R] working with environments to ensure code quality for long R scripts

2012-04-19 Thread cberry
Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Looking for the name of a certain kind of quantile plot

2012-04-04 Thread cberry
Dept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] sqrt(-x) vs. -x^0.5

2012-03-21 Thread cberry
( as.list( quote(-1-4) ), as.list ) and (thereby) explain why the result of -1-4 isn't 3. HTH, Chuck [rest deleted] -- Charles C. BerryDept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La

Re: [R] extracting the i-th row of a matrix in a list of lists

2012-03-09 Thread cberry
:2) ) HTH, Chuck or should I really stick with: lapply(lapply(x1, '[[', 3), function(x) x[2,]) ? Thank you very much, benilton -- Charles C. BerryDept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http

Re: [R] Why does the order of terms in a formula translate into different models/ model matrices?

2012-01-27 Thread cberry
at Nabble.com. -- Charles C. BerryDept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 __ R-help@r-project.org

Re: [R] Need help interpreting the logit regression function

2012-01-15 Thread cberry
wrong or interpreting it wrong. Can some one please point me in the right direction.. -- Charles C. BerryDept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093

Re: [R] Averaging within a range of values

2012-01-14 Thread cberry
from the R help mailing list archive at Nabble.com. -- Charles C. BerryDept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901

Re: [R] Putting an index explicitly into function code --- a curiosity.

2012-01-07 Thread cberry
[[2L]], where) } seems to handle this case without breaking example(bquote). HTH, Chuck Duncan Murdoch -- Charles C. BerryDept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry

Re: [R] qqnorm huge datasets

2011-12-22 Thread cberry
for points that do not overlap to be seen and small enough to slim down the number of plotted points. In the example above, 10233 vs 10. HTH, Chuck -- Charles C. BerryDept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http

Re: [R] qqnorm huge datasets

2011-12-22 Thread cberry
points. In the example above, 10233 vs 10. HTH, Chuck -- Charles C. Berry                            Dept of Family/Preventive Medicine cberry at ucsd edu                          UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901

Re: [R] column permutation of sparse matrix

2011-12-21 Thread cberry
of Family/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Multicollinearty in logistic regression models

2011-12-15 Thread cberry
-- Mohamed Lajnef,IE INSERM U955 eq 15# David Winsemius, MD West Hartford, CT -- Charles C. BerryDept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901

Re: [R] fundamental guide to use of numerical optimizers?

2011-12-15 Thread cberry
are just in the folklore. But if somebody has written them out, I would be glad to know. -- Charles C. BerryDept of Family/Preventive Medicine ccberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093

Re: [R] k-folds cross validation with conditional logistic

2011-12-13 Thread cberry
UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 __ 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

Re: [R] Maximization Problem

2011-10-25 Thread cberry
Dept of Family/Preventive Medicine cbe...@tajo.ucsd.eduUC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE