[R] Color points in princomp() plot

2014-04-28 Thread Noah Silverman
kind of clustering by group in the biplot. However, I can't figure out how to indicate individual point color in a biplot. The only setting I found was to indicate a single color for *all* the points. Any ideas? -- *Noah Silverman, PhD* | UCLA Department of Statistics 8117 Math Sciences

[R] Color points in princomp() plot

2014-04-28 Thread Noah Silverman
kind of clustering by group in the biplot. However, I can't figure out how to indicate individual point color in a biplot. The only setting I found was to indicate a single color for *all* the points. Any ideas? -- *Noah Silverman, PhD* | UCLA Department of Statistics 8117 Math Sciences

[R] Perceptual Mapping

2014-04-24 Thread Noah Silverman
different. Is anybody here familiar with perceptual mapping with multidimensional data? If so, can you point to me to any examples using R? Thanks, -- *Noah Silverman, PhD* | UCLA Department of Statistics 8117 Math Sciences Building, Los Angeles, CA 90095 [[alternative HTML version deleted

Re: [R] Perceptual Mapping

2014-04-24 Thread Noah Silverman
related to?) PCA. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. H. Gilbert Welch On Thu, Apr 24, 2014 at 10:20 AM, Noah Silverman noahsilver...@ucla.edu wrote

[R] Options in Blotter

2014-04-10 Thread Noah Silverman
that blotter can correctly value the portfolio and track the trades. Thanks, -- *Noah Silverman, PhD* | UCLA Department of Statistics 8117 Math Sciences Building, Los Angeles, CA 90095 [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] Thoughts for faster indexing

2013-11-26 Thread Noah Silverman
. Ideas? Noah Silverman, M.S., C.Phil UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On 11/21/13, 5:51 AM, Rainer M Krug wrote: On 11/21/13, 12:34 , Jim Holtman wrote: you need to show the statement in context with the rest of the script. you need

[R] Thoughts for faster indexing

2013-11-20 Thread Noah Silverman
by j, which seems fast enough.) where d is my data.frame or data.table I thought that using the data.table indexing would speed things up, but not in this case. Any ideas on how to speed this up? Thanks! -- Noah Silverman, M.S., C.Phil UCLA Department of Statistics 8117 Math Sciences Building

[R] Strange results from dbeta function

2013-10-26 Thread Noah Silverman
Hello, I’m seeing some strange behavior from the dbeta() function in R. For example: dbeta(0.0001, .4, .6 ) [1] 76.04555 How is it possible to get a PDF that is greater than 1?? Am I doing something wrong here, or is this a quirk of R. Thanks, -- Noah Silverman, M.S., C.Phil UCLA

Re: [R] Console Output Formatting

2013-09-16 Thread Noah Silverman
Neal, I like this answer. Simple and clean. Don't know why I didn't think of that before. Thanks! -- Noah Silverman, M.S., C.Phil UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Sep 4, 2013, at 3:12 PM, Neal Fultz nfu...@gmail.com wrote: print(1:100

[R] Console Output Formatting

2013-09-04 Thread Noah Silverman
the index numbers. Is there a simple way to just back the values, or even a comma separated list of the values? Thanks! -- Noah Silverman, M.S., C.Phil UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 __ R-help@r

[R] Trouble with Slidify and Latex

2013-09-01 Thread Noah Silverman
in the final HTML slide. Any ideas on what's wrong here? Thanks. -- Noah Silverman, C.Phil UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Trouble with Slidify and Latex

2013-09-01 Thread Noah Silverman
It's not in CRAN, but I still hope that someone on this list has some experience and can suggest some ideas. I will, of course, contact the author in github as well. -- Noah Silverman, C.Phil UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Sep 1, 2013, at 1

[R] Trouble with Slidify and Latex

2013-08-31 Thread Noah Silverman
the markdown syntax? I have, on a single slide: Test $A = 1+2$ and some text after What I see in the Presentation: Test \(A = 1+2\) and some text after Note: This is literally a slash followed by a parenthesis in the final HTML slide. Any ideas on what's wrong here? Thanks. -- Noah

[R] How to extract last value in each group

2013-08-14 Thread Noah Silverman
actually care what time it was, as long as it was the last one. Sure, writing a big nasty loop would work, but I was hoping that someone would be able to suggest a faster way. Small snippet of data below my sig. Thanks! -- Noah Silverman, M.S., C.Phil UCLA Department of Statistics 8117 Math

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

2013-08-14 Thread Noah Silverman
That works beautifully. Never used the unlist or with commands before. More to learn there. Thanks! -- Noah Silverman, M.S., C.Phil UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Aug 14, 2013, at 1:08 PM, arun smartpink...@yahoo.com wrote: Hi, Try

Re: [R] Identify Leverage Points

2013-07-20 Thread Noah Silverman
I'll look at that today. Thank You, -- Noah Silverman, C.Phil UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Jul 19, 2013, at 4:13 PM, Mark Leeds marklee...@gmail.com wrote: see the hatvalues function in the car package. also, I highly recommend john's

[R] Identify Leverage Points

2013-07-19 Thread Noah Silverman
to get the leverage for each data point? That way I can subset the data skipping N% of the highest leverage ones. Thanks! -- Noah Silverman, M.S., C.Phil UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 __ R-help@r

[R] Subset and order

2013-07-05 Thread Noah Silverman
by a. To subset is easy: x[x$b==3,] To order is easy: x[order(x$a),] Is there a way to do both in a single efficient statement? Thanks, -- Noah Silverman, M.S., C.Phil UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 [[alternative HTML version deleted

Re: [R] Subset and order

2013-07-05 Thread Noah Silverman
) Hope this helps, Rui Barradas Em 05-07-2013 20:33, Noah Silverman escreveu: Hello, I have a data frame with several columns. I'd like to select some subset *and* order by another field at the same time. Example: ab c 12 3 33 4 24 5

[R] Math problem with xts objects

2013-05-13 Thread Noah Silverman
[10]) - as.numeric( d$open[9] ) But, that is horrendously slow. Suggestions? -- Noah Silverman, C.Phil UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 [[alternative HTML version deleted]] __ R-help@r

[R] Strange error with log-normal models

2013-04-16 Thread Noah Silverman
, enclos) : cannot find valid starting values: please specify some Can anyone offer some suggestions? Thanks! -- Noah Silverman, M.S. UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 __ R-help@r-project.org mailing list

Re: [R] Strange error with log-normal models

2013-04-16 Thread Noah Silverman
(students/population) is no longer Poisson, but is certainly not normal either. So, I'm a bit lost as to the appropriate distribution to represent it. Any thoughts? -- Noah Silverman, M.S. UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Apr 16, 2013, at 12:44 PM

[R] Not enough predicted values from pscl package?

2013-04-09 Thread Noah Silverman
) The resulting vector only contains 25,213 values. So, somehow, the predict function skipped predictions for several of my data points. The problem is I don't know why and I don't know which values were skipped. Any suggestions? -- Noah Silverman, M.S. UCLA Department of Statistics 8117 Math Sciences

[R] Clever way to match two lists

2013-03-21 Thread Noah Silverman
is, For each row in the update list, lookup the corresponding ID in the master data frame and update the value. Ideas? -- Noah Silverman, M.S. UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 __ R-help@r-project.org mailing

Re: [R] Clever way to match two lists

2013-03-21 Thread Noah Silverman
Jim, That's perfect. Thanks. Also tried Neal's method, but it wound up be MUCH slower to build the index. Thanks, -- Noah Silverman, M.S. UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Mar 21, 2013, at 6:07 PM, Jim Holtman jholt...@gmail.com wrote

[R] RGL 3D plots are flat. Please Help

2013-03-18 Thread Noah Silverman
346 384 422 461 499 [26,]0 40 80 120 160 200 240 280 320 360 400 440 480 520 -- Noah Silverman, M.S. UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 __ R-help@r-project.org mailing list

Re: [R] RGL 3D plots are flat. Please Help

2013-03-18 Thread Noah Silverman
Oops, that was a type. d is just y. If you want to reproduce, I put the entire matrix, as a csv here: http://pastebin.com/gniyD4Rc Thanks, -- Noah Silverman, M.S. UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Mar 18, 2013, at 6:58 PM, Pascal Oettli

[R] Elasticnet - Cross validation problem

2013-03-14 Thread Noah Silverman
suggestions on how to mitigate this issue? Given that I want a 5-fold cross validation to determine optimal tuning? Thanks! -- Noah Silverman, M.S. UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 __ R-help@r-project.org

Re: [R] Elasticnet - Cross validation problem

2013-03-14 Thread Noah Silverman
Thanks Steve! -- Noah Silverman, M.S. UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Mar 14, 2013, at 12:54 PM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: Hi, On Thu, Mar 14, 2013 at 2:36 PM, Noah Silverman noahsilver...@ucla.edu wrote

[R] Fast Normalize by Group

2012-11-29 Thread Noah Silverman
Hi, I have a very large data set (aprox. 100,000 rows.) The data comes from around 10,000 groups with about 10 entered per group. The values are in one column, the group ID is an integer in the second column. I want to normalize the values by group: for(g in unique(groups){

Re: [R] Fast Normalize by Group

2012-11-29 Thread Noah Silverman
Noah Silverman noahsilver...@ucla.edu Hi, I have a very large data set (aprox. 100,000 rows.) The data comes from around 10,000 groups with about 10 entered per group. The values are in one column, the group ID is an integer in the second column. I want to normalize the values by group

[R] rjags and parallel chains

2012-11-25 Thread Noah Silverman
might look to get this running in parallel? Thanks -- Noah Silverman, M.S. UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] Date Math

2012-10-14 Thread Noah Silverman
that obviously fails. Ideas? -- Noah Silverman, M.S. UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Date Math

2012-10-14 Thread Noah Silverman
[) # just returns the iter back index(observations[iter]) - 5 # returns 2011-05-17 23:59:57 PDT, so it subtracted 3 seconds. really, I want to find: iter- 5 days. -- Noah Silverman Smart Media Corp. On Oct 14, 2012, at 10:29 AM, Jeff Newmiller jdnew...@dcn.davis.ca.us wrote

Re: [R] Date Math

2012-10-14 Thread Noah Silverman
[) # just returns the iter back index(observations[iter]) - 5 # returns 2011-05-17 23:59:57 PDT, so it subtracted 3 seconds. really, I want to find: iter- 5 days. -- Noah Silverman Smart Media Corp. On Oct 14, 2012, at 10:29 AM, Jeff Newmiller jdnew...@dcn.davis.ca.us wrote

[R] Convert COLON separated format

2012-10-08 Thread Noah Silverman
this? -- Noah Silverman, M.S. UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 __ 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] Simple tree

2012-07-18 Thread Noah Silverman
with a calculator and pencil, but it would be nice to have everything in R. I can't seem to find a package for this. Any suggestions? -- Noah Silverman, M.S. UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 [[alternative HTML version deleted

[R] Cost Effectiveness Example

2012-07-16 Thread Noah Silverman
it and it is expensive to buy. Questions for the group: 1) Are there any interesting R packages for decision trees? 2) Has anyone here done a cost effectiveness analysis using R that I can show to the group as an example? Thanks! -- Noah Silverman, M.S. UCLA Department of Statistics 8117 Math Sciences

[R] Decision Trees or Markov Models for Cost Effectiveness

2012-06-11 Thread Noah Silverman
, it appears to be a nice GUI to some very simple models that could be easily constructed in R. Are there any packages in R for this type of analysis? Additionally, does anyone have any suggestions in general regarding doing this type of analysis in R? Thank You, -- Noah Silverman UCLA Department

Re: [R] Decision Trees or Markov Models for Cost Effectiveness

2012-06-11 Thread Noah Silverman
much more than R does. Instead of having the department purchase an expensive software license, I'd rather do this in R. (You can do al most anything in R.) -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Jun 11, 2012, at 4:35 PM, Bert

[R] Converting to XTS loses data.frame structure

2012-05-29 Thread Noah Silverman
15 12:44 head(myXTS) Date Obsever Val.1 Time 2009-10-12 12:44:00 10/12/09 PL15 12:44 2009-10-12 12:44:00 10/12/09 PL15 12:44 = -- Noah Silverman UCLA Department of Statistics 8208

Re: [R] Converting to XTS loses data.frame structure

2012-05-29 Thread Noah Silverman
Thanks Joshua, Appreciate it! -- Noah Silverman UCLA Department of Statistics 8208 Math Sciences Building Los Angeles, CA 90095 On May 29, 2012, at 12:17 PM, Joshua Ulrich wrote: On Tue, May 29, 2012 at 2:11 PM, Noah Silverman noahsilver...@ucla.edu wrote: Hello, I noticed something odd

[R] Menus - best practices?

2012-05-18 Thread Noah Silverman
? Thanks! -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Menus - best practices?

2012-05-18 Thread Noah Silverman
Thanks Rich, I was looking for something I could run *inside* of R, as part of my R script. How are you using ncurses? -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On May 18, 2012, at 5:14 PM, Rich Shepard wrote: On Fri, 18 May 2012, Noah

[R] Failure building any package

2012-05-17 Thread Noah Silverman
? This is the most generic and empty package I can think of, so not sure why a build is failing. Thanks! -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 __ R-help@r-project.org mailing list https

[R] Subset and order at the same time?

2012-05-12 Thread Noah Silverman
illustrate what I'm trying to do temp[temp$group==A,] - temp[ temp$group==A order(temp[temp$group==A,3]) , ] Suggestions? -- Noah Silverman UCLA Department of Statistics 8208 Math Sciences Building Los Angeles, CA 90095 __ R-help@r-project.org mailing list

Re: [R] Subset and order at the same time?

2012-05-12 Thread Noah Silverman
Bernard, Thanks, but I can't take that shortcut. The data is an xts object, and I may not want to order every group. So, I need a way to just order one group at a time. Thoughts? -- Noah Silverman UCLA Department of Statistics 8208 Math Sciences Building Los Angeles, CA 90095 On May 12

[R] RCS (Restriced Cubic Splines)

2012-04-29 Thread Noah Silverman
In the book, Regression Modeling Strategies, Frank Harrell uses the function rcs() often. The current version or R and Hmisc library don't appear to have this function. What is an appropriate substitute? Thank You -- Noah Silverman UCLA Department of Statistics 8208 Math Sciences Building

[R] Converting data frame to its object results in matrix of strings

2012-04-06 Thread Noah Silverman
(a$Date), '%m/%d/%Y'))) My guess is that somewhere in the large data frame there are a few strings hiding that is causing the who thong to be converted to string. Is there some way to force the as.xts function to ignore the strings and keep everything numeric? Thanks! -- Noah Silverman UCLA

[R] plot only non-zero values

2012-03-16 Thread Noah Silverman
2 etc... Suggestions on an easy way to do this? Thanks! -- Noah Silverman UCLA Department of Statistics 8208 Math Sciences Building Los Angeles, CA 90095 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

[R] Cleaning up messy Excel data

2012-02-28 Thread Noah Silverman
. 118 5.7 2.0 3.7 Since this column in Excel has a 2.0 value, then R reads the column as a factor with levels. Ideally, I want to convert it a normal vector of scalars and code code the 2.0 as 0. Can anyone suggest an easy way to do this? Thanks! -- Noah Silverman UCLA Department

Re: [R] Cleaning up messy Excel data

2012-02-28 Thread Noah Silverman
That's exactly what I need. Thank You!! -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Feb 28, 2012, at 1:42 PM, jim holtman wrote: First of all when reading in the CSV file, use 'as.is = TRUE' to prevent the changing to factors. Now

[R] Reading in csv with footer

2012-02-12 Thread Noah Silverman
Hi, I have a CSV file that is formatted well, except that the last line is a summary not is CSV format. Toy example: label_1, label_2, label_3 1,2,3 3,2,4 2,3,4 Total Rows: 3 When I try to import this into R with: d - read.table(foo.csv, header=T, sep=,) It fails to import properly because

Re: [R] Reading in csv with footer

2012-02-12 Thread Noah Silverman
Thanks Steve, Your suggestion about nrows seems like the easiest. Thanks! -- Noah Silverman UCLA Department of Statistics 8208 Math Sciences Building Los Angeles, CA 90095 On Feb 12, 2012, at 4:23 PM, Steve Lianoglou wrote: Hi, On Sun, Feb 12, 2012 at 7:05 PM, Noah Silverman noahsilver

Re: [R] Reading in csv with footer

2012-02-12 Thread Noah Silverman
Nice one!!! Tanks. -- Noah Silverman UCLA Department of Statistics 8208 Math Sciences Building Los Angeles, CA 90095 On Feb 12, 2012, at 4:26 PM, Henrique Dallazuanna wrote: This works for me: Lines - label_1, label_2, label_3 1,2,3 3,2,4 2,3,4 Total Rows: 3 d - head(read.csv

[R] Warnings from script - where?

2012-02-12 Thread Noah Silverman
in a loop.) The difficult part is I have no idea *where* the warning is being generated. Is there a way to get R to either halt on warning, or give me more detail when listing warnings after execution? Thanks! -- Noah Silverman UCLA Department of Statistics 8208 Math Sciences Building Los

Re: [R] Warnings from script - where?

2012-02-12 Thread Noah Silverman
Solved my own question: options(warnings=2) will turn all warnings into errors. That should halt execution and allow me to examine what happened. -- Noah Silverman UCLA Department of Statistics 8208 Math Sciences Building Los Angeles, CA 90095 On Feb 12, 2012, at 4:38 PM, Noah Silverman

[R] Difficult subset challenge

2011-12-10 Thread Noah Silverman
is relative (1,2,3, etc.) Suggestions? -- Noah Silverman UCLA Department of Statistics 8208 Math Sciences Building Los Angeles, CA 90095 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

[R] Plot unusual subset of data

2011-10-24 Thread Noah Silverman
…. === So, in this example, I want: 1) linear plot of X:plot( X[1013:1046], type=l) 2) Lines from 1017,1.4645 to 1025,1.4744 etc.. I tried lines( X[Seg0], col=2) But this fails. Any suggestions? -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA

Re: [R] Plot unusual subset of data

2011-10-24 Thread Noah Silverman
Works beautifully. Thanks! -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Oct 24, 2011, at 1:32 PM, (Ted Harding) wrote: ix - which(Seg[1013:1046] 0) lines((1013:1046)[ix], Seg[1013:1046][ix], col=2) [[alternative HTML

[R] Independent component analysis with only one source of data

2011-10-17 Thread Noah Silverman
? If so, is there a work around that is commonly used? Thanks. -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

[R] Read wav file into R

2011-10-15 Thread Noah Silverman
Hi, I'm interested in doing some sound analysis with R. Does anyone have any experience/methods for reading in a wav file? -- Noah Silverman UCLA Department of Statistics 8208 Math Sciences Building Los Angeles, CA 90095 [[alternative HTML version deleted

Re: [R] Read wav file into R

2011-10-15 Thread Noah Silverman
Nice. Thank You! -- Noah Silverman UCLA Department of Statistics 8208 Math Sciences Building Los Angeles, CA 90095 On Oct 15, 2011, at 9:41 PM, Luke Miller wrote: Try the tuneR package. It will read in wav files and has other functions for manipulating sound data. On Oct 15, 2011 9:32 PM

[R] Use of ICA for sound

2011-10-15 Thread Noah Silverman
Hi, I'm looking at the cocktail party classic problem. I can see how to use ICA to separate the components. But, How do I then create new wav files of the separated sounds so that they can be played? Thanks -- Noah Silverman UCLA Department of Statistics 8208 Math Sciences Building Los

[R] Open file for reading and writing with APPEND

2011-09-14 Thread Noah Silverman
, sep=,, \n, file=outfile, append=TRUE) } = -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building #8208 Los Angeles, CA 90095 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

Re: [R] Open a file to APPEND

2011-09-12 Thread Noah Silverman
Ahhh, Makes sense. I was too busy scouring the help file command. Didn't think to look at cat(). Thanks! -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building #8208 Los Angeles, CA 90095 On Sep 11, 2011, at 11:10 PM, Steve Lianoglou wrote: Hi, On Mon, Sep 12, 2011

[R] Open a file to APPEND

2011-09-11 Thread Noah Silverman
. Is there a way to open a file and have R append to the end? Thanks! -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building #8208 Los Angeles, CA 90095 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

[R] Avoiding for Loop for moving average

2011-09-02 Thread Noah Silverman
) * data$value[i] } Since the moving average accumulates as we move through the data, I'm not sure on the best/fastest way to do this. Does anyone have any suggestions on how to avoid a loop doing this? -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building #8208 Los Angeles

Re: [R] Avoiding for Loop for moving average

2011-09-02 Thread Noah Silverman
Joshua, Thanks for the tip. I need to roll my own code on this. But perhaps I can borrow some code from the package you mentioned. Is the package just performing the loop, but in a faster language? -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building #8208 Los Angeles

Re: [R] Avoiding for Loop for moving average

2011-09-02 Thread Noah Silverman
Thanks Joshua, I really like the example given in the blog post that Abhijit pointed me to. Doing it in C++ using the Inline seems like an easy way to get a massive improvement in speed without the hassle of writing a package. I'm working on coding that now. -- Noah Silverman UCLA Department

[R] Optim function with multivariate inputs

2011-08-25 Thread Noah Silverman
on either of the above issues. Any suggestions? Thanks! -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building #8208 Los Angeles, CA 90095 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

Re: [R] How to find the accuracy of the predicted glm model with family = binomial (link = logit)

2011-08-25 Thread Noah Silverman
Andra, Two common methods are the AUC (area under the curve) and the Log Likelihood. The ROCR package has several nice functions for evaluating the accuracy of your model -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Aug 25, 2011, at 9

[R] Glmnet lambda value choice

2011-08-23 Thread Noah Silverman
own, but I want to understand how the authors are doing it) Any ideas? -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] dummy variables from factors

2011-08-23 Thread Noah Silverman
. There must be a better way. Is there an easy way to do this in R? (Note, I don't want to internally represent the levels in the data set, but physically have new columns for each level with a binary indicator.) Thanks! -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los

Re: [R] dummy variables from factors

2011-08-23 Thread Noah Silverman
@Josh Thanks! That's exactly what I need. @ Marc. I want to do this manually because I want to do many things with the data beyond R's built in functions. -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Aug 23, 2011, at 10:43 AM, Joshua

[R] Ideas for tricky subset of XTS object

2011-08-23 Thread Noah Silverman
2) I never wind up with a single clean dataset of just the days I want. Any ideas? Thanks! -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 __ R-help@r-project.org mailing list https

Re: [R] Raw epoch time from XTS

2011-08-21 Thread Noah Silverman
that way. The attr() function is probably the best solution. Thanks! -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Aug 20, 2011, at 1:03 AM, Joshua Wiley wrote: Hi Noah, This is one of those cases where following the posting guide

[R] Compile on Fedora

2011-08-21 Thread Noah Silverman
worked this out? Thanks! -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 __ 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] Raw epoch time from XTS

2011-08-20 Thread Noah Silverman
() Calling this in an entire column, the R way doesn't work. It will only return a single value. Calling it in a loop for each row works but is painfully slow. Since the epoch is stored internally, there must be some way to just grab it as a vector. Does anyone know how? Thanks! -- Noah

[R] Limit when reading in file?

2011-08-16 Thread Noah Silverman
it, and a few surrounding lines. Same error occurs with a different line number. Is there some hard limit as to how large a file I can import? If so, any suggested work around? Thanks! -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095

[R] Variable scope in functions - best practices

2011-07-24 Thread Noah Silverman
a function return a list, and then parse that list every time, but that seems like an excessive amount of overhead. (Especially as some functions may be called many many times.) How have some of you handled this? Is there a best practices way? Thanks! -- Noah Silverman UCLA Department

[R] Variable scope in functions - best practices

2011-07-24 Thread Noah Silverman
a function return a list, and then parse that list every time, but that seems like an excessive amount of overhead. (Especially as some functions may be called many many times.) How have some of you handled this? Is there a best practices way? Thanks! -- Noah Silverman UCLA Department

[R] Font problem

2011-07-14 Thread Noah Silverman
of the font packages recommended in the R documentation. Any steps I can take to diagnose the missing/problem fonts and/or how to correct this? Thanks! -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 __ R

[R] access objects by name

2011-06-20 Thread Noah Silverman
$colA) } The above fails. Clearly I'm missing a step translating the name to the object. Suggestions? Thanks -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 Cell: (323) 899-9595 __ R-help@r

[R] Create Variable names dynamically

2011-03-31 Thread Noah Silverman
of stuff mean_cat - abc var_cat - dfd mean_dog - 123 var_dog - 453 etc.. ## I thought of trying to use the paste() function to create the variable name, but that doesn't work: for( animal in animals){ paste(mean, animal _) - 123 } Any ideas??? Thanks -- Noah Silverman

Re: [R] Create Variable names dynamically

2011-03-31 Thread Noah Silverman
Perfect. Thank You On Mar 31, 2011, at 1:47 PM, Mark Leeds wrote: hi noah: assign(thing you paste, 123, envir=whatever) should work I think. On Thu, Mar 31, 2011 at 4:42 PM, Noah Silverman n...@smartmediacorp.com wrote: Hi, I want to create variable names from within my code

Re: [R] Variable names AS variable names?

2011-02-25 Thread Noah Silverman
the matrix named a1. On 2/25/11 12:23 AM, David Winsemius wrote: On Feb 25, 2011, at 1:55 AM, Noah Silverman wrote: How can I dynamically use a variable as the name for another variable? I realize this sounds cryptic, so an example is best: #Start with an array of codes codes - c(a1, b24, q99

[R] Missing R.h

2011-02-25 Thread Noah Silverman
Hi, I'm trying to install a module - gputools - and keep getting compile time errors about missing R.h Does anyone know where this file can be found? Thanks! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Variable names AS variable names?

2011-02-24 Thread Noah Silverman
How can I dynamically use a variable as the name for another variable? I realize this sounds cryptic, so an example is best: #Start with an array of codes codes - c(a1, b24, q99) #Each code has a corresponding matrix (could be vector) a1 - matrix(rnorm(100), nrow=10) b24 - matrix(rnorm(100),

[R] Problems installing gputools

2011-01-27 Thread Noah Silverman
Hi, I have some surprising trouble installing the gputools package. This is a linux box running Fedora with an Nvidia GeForce GTX 260 card and R 2.12.1 I had gputools running on it for the past several months. Wanting to update to the newest version, I simply executed install.packages(gputools)

Re: [R] Step command failing for lm function

2011-01-10 Thread Noah Silverman
Hi, Its a lot of data, but here are sum summary stats: l - lm(trainy ~ x) str(x) num [1:31205, 1:48] 0.0975 -0.1987 0.3254 -0.7912 0.0975 ... - attr(*, dimnames)=List of 2 ..$ : chr [1:31205] 5 6 7 8 ... ..$ : NULL - attr(*, names)= chr [1:1497840] a NA NA NA ... summary(x) V1

Re: [R] Step command failing for lm function

2011-01-10 Thread Noah Silverman
the function does before it exits. Cheers, Josh On Jan 9, 2011, at 23:57, Noah Silverman n...@smartmediacorp.com wrote: Hi, I have a fairly simple linear regression using the lm function. There are about 100 variables and 30,000 rows of data. It runs fine and produces a decent looking R2

[R] Step command failing for lm function

2011-01-09 Thread Noah Silverman
Hi, I have a fairly simple linear regression using the lm function. There are about 100 variables and 30,000 rows of data. It runs fine and produces a decent looking R2 value. I'm interested in performing a stepwise variable selection to see if things can be cleaned up a bit. Calling the step

[R] Stepwise SVM Variable selection

2011-01-06 Thread Noah Silverman
I have a data set with about 30,000 training cases and 103 variable. I've trained an SVM (using the e1071 package) for a binary classifier {0,1}. The accuracy isn't great. I used a grid search over the C and G parameters with an RBF kernel to find the best settings. I remember that for

Re: [R] Stepwise SVM Variable selection

2011-01-06 Thread Noah Silverman
I'll give it a try, Thanks! -N On 1/6/11 11:34 PM, Steve Lianoglou wrote: Hi, On Fri, Jan 7, 2011 at 2:10 AM, Noah Silvermann...@smartmediacorp.com wrote: I have a data set with about 30,000 training cases and 103 variable. I've trained an SVM (using the e1071 package) for a binary

[R] More detail in chart axis?

2010-11-23 Thread Noah Silverman
Hi, I have a series of data (about 80,000 pairs of x,y). Plotting it shows a great chart. However, R has randomly chosen about 6 labels for my x axis. Now, clearly I can't show them all, but would like some control over the granularity of what is displayed. I can't find anything in the

[R] Can't invert matrix

2010-11-20 Thread Noah Silverman
Hi, I'm trying to use the solve() function in R to invert a matrix. I get the following error, Lapack routine dgesv: system is exactly singular However, My matrix doesn't appear to be singular. [,1] [,2] [,3] [,4] [1,] 0.99252358 0.93715047 0.7540535 0.4579895

[R] Counting things in a time series.

2010-11-20 Thread Noah Silverman
Hi, I have a process (not in R) that records events with a time stamp. So, I have a huge series of maybe 100,000 time stamps. I'd like to break it up into hourly (Or daily) intervals and then count how many events occurred in each interval. That way I can graph it. Ideally, converting the

Re: [R] Can't invert matrix

2010-11-20 Thread Noah Silverman
] -2.132894e-08 2.128452e-08 When dealing with numerical matrices you have to be prepared for the unexpected. Bill Venables. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Noah Silverman Sent: Sunday, 21 November 2010 2

Re: [R] Populating then sorting a matrix and/or data.frame

2010-11-11 Thread Noah Silverman
That makes perfect sense. Since I need to build up the results table sequentially as I iterate through the data, how would you recommend it?? Thanks, -N On 11/11/10 12:03 AM, Michael Bedward wrote: All values in a matrix are the same type, so if you've set up a matrix with a character

  1   2   3   >