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

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

Re: [R] Perceptual Mapping

2014-04-24 Thread Noah Silverman
look like mds. It appears to be (closely 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

[R] Perceptual Mapping

2014-04-24 Thread Noah Silverman
it is something 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 [

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

Re: [R] Thoughts for faster indexing

2013-11-26 Thread Noah Silverman
ce. So any speedup to this routine will save me a ton of time. 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: > > y

[R] Thoughts for faster indexing

2013-11-20 Thread Noah Silverman
indexed 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

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

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 wrote: > > print(1:100)

[R] Console Output Formatting

2013-09-04 Thread Noah Silverman
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

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,

[R] Trouble with Slidify and Latex

2013-09-01 Thread Noah Silverman
wed by a "parenthesis" 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] Trouble with Slidify and Latex

2013-08-31 Thread Noah Silverman
anding 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&#

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 wrote: > Hi, > Try: >

[R] How to extract last value in each group

2013-08-14 Thread Noah Silverman
x27;t 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

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 wrote: > see the hatvalues function in the car package. also, I highly recommend john's > CAR

[R] Identify Leverage Points

2013-07-19 Thread Noah Silverman
Is there a computational way 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 _

Re: [R] Subset and order

2013-07-05 Thread Noah Silverman
3) > > > 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. &g

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

[R] Math problem with xts objects

2013-05-13 Thread Noah Silverman
.numeric(d$close[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]] _

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

2013-04-16 Thread Noah Silverman
This "rate" (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 9009

[R] Strange error with log-normal models

2013-04-16 Thread Noah Silverman
ink="log")) Error in eval(expr, envir, 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] Not enough predicted values from pscl package?

2013-04-09 Thread Noah Silverman
ount) 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

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

[R] Clever way to match two lists

2013-03-21 Thread Noah Silverman
, "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.o

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] RGL 3D plots are flat. Please Help

2013-03-18 Thread Noah Silverman
[25,]0 38 77 115 154 192 230 269 307 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 __

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 wrote: > Hi, > > On Thu, Mar 14, 2013 at 2:36 PM, Noah Silverman > wrote: >> Hello, >> >> I a

[R] Elasticnet - Cross validation problem

2013-03-14 Thread Noah Silverman
Any 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-projec

Re: [R] Fast Normalize by Group

2012-11-29 Thread Noah Silverman
ta$vec,data$fac, FUN=sum) > > Best, > Mikołaj Hnatiuk > > 2012/11/29 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

[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){ x[group==

[R] rjags and parallel chains

2012-11-25 Thread Noah Silverman
st where I 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 PLEA

Re: [R] Date Math

2012-10-14 Thread Noah Silverman
index(observations[iter[) # 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 wrote:

Re: [R] Date Math

2012-10-14 Thread Noah Silverman
index(observations[iter[) # 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 wrote:

[R] Date Math

2012-10-14 Thread Noah Silverman
wever 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

[R] Convert COLON separated format

2012-10-08 Thread Noah Silverman
e a simple way to do 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

[R] Simple tree

2012-07-18 Thread Noah Silverman
thing could be done 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

[R] Cost Effectiveness Example

2012-07-16 Thread Noah Silverman
, we don't have 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 Depa

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

2012-06-11 Thread Noah Silverman
hat often don't offer 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 1

[R] Decision Trees or Markov Models for Cost Effectiveness

2012-06-11 Thread Noah Silverman
escription, 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 Silv

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 > wrote: >> Hello, >> >> I noticed so

[R] Converting to XTS loses data.frame structure

2012-05-29 Thread Noah Silverman
15 12:44 2 10/12/09 PL15 12:44 head(myXTS) Date Obsever Val.1 Time 2009-10-12 12:44:00 "10/12/09" "PL""15" "12:44" 2009-10-12 12:44:00 "10/12/09" "PL"&q

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, N

[R] Menus - best practices?

2012-05-18 Thread Noah Silverman
u can recommend? 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

[R] Failure building any package

2012-05-17 Thread Noah Silverman
s 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://stat.ethz.c

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 M

[R] Subset and order at the same time?

2012-05-12 Thread Noah Silverman
time. This *does not work* but should 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 Buildi

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

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

2012-04-06 Thread Noah Silverman
e(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 S

[R] plot only non-zero values

2012-03-16 Thread Noah Silverman
5 0 3 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

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 th

[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! -- N

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] Warnings from script - where?

2012-02-12 Thread Noah Silverman
bably something I'm using 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 M

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 >

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

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

[R] Difficult subset challenge

2011-12-10 Thread Noah Silverman
rom the which command 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 rea

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) [[alte

[R] Plot unusual subset of data

2011-10-24 Thread Noah Silverman
6 1.4768 0.0 …. === 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[Seg>0], col=2) But this fails. Any suggestions? -- Noah Silverman UCLA Department of Statistics 8117 M

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

2011-10-17 Thread Noah Silverman
rrect? 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

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

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,

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

[R] Open file for reading and writing with APPEND

2011-09-14 Thread Noah Silverman
outfile <- file("logfile.csv", open="w") while(1){ # do a bunch of stuff cat(a, b, c, sep=",", "\n", file=outfile, append=TRUE) } = -- Noah Silverman UCLA Department of Statistics 8117 Math Science

Re: [R] Open a file to APPEND

2011-09-11 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, > >

[R] Open a file to APPEND

2011-09-11 Thread Noah Silverman
the log file each time. 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

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 Depar

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

[R] Avoiding for Loop for moving average

2011-09-02 Thread Noah Silverman
(1-alpha) * 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 Sci

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] Optim function with multivariate inputs

2011-08-25 Thread Noah Silverman
in R isn't very clear 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-p

[R] Ideas for tricky subset of XTS object

2011-08-23 Thread Noah Silverman
--- The above works but: 1) It is slow and awkward 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

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

[R] dummy variables from factors

2011-08-23 Thread Noah Silverman
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 Scienc

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

Re: [R] Raw epoch time from XTS

2011-08-21 Thread Noah Silverman
x27;t work 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 followin

[R] Raw epoch time from XTS

2011-08-20 Thread Noah Silverman
xcoredata() 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 kn

[R] Limit when reading in file?

2011-08-16 Thread Noah Silverman
ng 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

[R] Variable scope in functions - best practices

2011-07-24 Thread Noah Silverman
o, I could have 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 Sil

[R] Variable scope in functions - best practices

2011-07-24 Thread Noah Silverman
o, I could have 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 Sil

[R] Font problem

2011-07-14 Thread Noah Silverman
all 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] access objects by name

2011-06-20 Thread Noah Silverman
ot;, "foo3") for (thisOne in structs){ print(thisOne$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 _

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 > wrote: > Hi, > > I want to create variable names from within

[R] Create Variable names dynamically

2011-03-31 Thread Noah Silverman
mal in animals){ paste("mean", animal "_") <- 123 } Any ideas??? Thanks -- Noah Silverman __ 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 commented, minimal, self-contained, reproducible code.

[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

Re: [R] Variable names AS variable names?

2011-02-25 Thread Noah Silverman
o reference 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 e

[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(rnor

[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
ould also try: debug(step). Then run step on your model so you can see > what the function does before it exits. > > Cheers, > > Josh > > On Jan 9, 2011, at 23:57, Noah Silverman wrote: > >> Hi, >> >> I have a fairly simple linear regression using the lm

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

[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

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 Silverman 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 classifier {0

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

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

Re: [R] Can't invert matrix

2010-11-20 Thread Noah Silverman
.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,

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

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

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

2010-11-11 Thread Noah Silverman
David, Great solution. While a bit longer to enter, it lets me explicitly define a type for each column. Thanks!!! -N On 11/11/10 4:02 PM, David Winsemius wrote: > > On Nov 11, 2010, at 6:38 PM, Noah Silverman wrote: > >> That makes perfect sense. All of my numbers are bei

  1   2   3   >