[R] Reproducing a 3d yield curve plot from New York Times

2015-06-04 Thread matt
quot;darkblue"), border=NA,theta=45,ltheta=0,shade=0.15,smoother=1,phi=15,scale=FALSE,expand=0.75) Can anyone suggest a different package to work with to get closer to the above-mentioned output? I'm interested in figuring

[R] Help with continuous color plot

2014-09-24 Thread matt
e to an example that accomplishes my task, or give me some ideas as to how to code this? Below is a reproducible dataset and the code I ran that generated the above error. And apologies in advance if I have overlooked some obvious source - I'm not exactly sure what keywords to search

Re: [R] Help with continuous color plot

2014-09-24 Thread matt
22-i],border="NA") } #plot a line for the average case lines(vals[,11],col="black") If anyone can suggest a more efficient/effective/better/etc/etc way of doing this, I'd be grateful. In a nutshell, I am trying to find a visually clean way of showing the output of a Mo

[R] Random forests prediction

2012-05-11 Thread matt
Hi all, I have a strange problem when applying RF in R. I have a set of variables with which I obtain an AUC of 0.67. I do have a second set of variables that have an AUC of 0.57. When I merge the first and second set of variables, the AUC becomes 0.64. I would expect the prediction to becom

Re: [R] Random forests prediction

2012-05-14 Thread matt
But shouldn't it be resolved when I set mtry to the maximum number of variables? Then the model explores all the variables for the next step, so it will still be able to find the better ones? And then in the later steps it could use the (less important) variables. Matthijs -- View this message i

[R] rgl.snapshot on linux produces colored lines only

2008-07-14 Thread Matt
I'm having a problem with rgl.snapshot. If I run the following code *once* and *once only*, all is well. data(trees) attach(trees) plot3d(Height, Girth, Volume, type='s') rgl.snapshot("/home/user/pic.png", fmt="png", top=TRUE ) And the pic.png looks right. But if I try to rerun rgl.snapshot a

[R] Transform values from one column into column names of new dataframe

2008-05-02 Thread Matt
the "STEP" column and using those as the column names and merging together the items. I appreciate your help, -Matt __ 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] arules: rules are built on item ordering in the dataframe, rather than

2009-03-01 Thread Matt
NA, NA, "d", "d")) my.trans2 <- as(my.df2[,2:5], "transactions") rules2 <- apriori(my.trans2, parameter=list(support=.01, confidence=0.6)) inspect(rules2) ## End code I can't figure out how to coerce my data frame into this format (or if this is the best wa

[R] hurdle control and optim

2015-08-17 Thread Matt Dicken
method L-BFGS-B uses 'factr' (and 'pgtol') instead of 'reltol' and 'abstol' How do I write the script for Hurdle control to solve these issues? Any help would be really appreciated All the best Matt Dr. Matt Dicken Senior Scientist Telephone: 0315660400

Re: [R] hurdle control and optim

2015-08-17 Thread Matt Dicken
Dear Achim, Apologies for the cross posting and confusion. I really appreciate the help All the best Matt -Original Message- From: Achim Zeileis [mailto:achim.zeil...@r-project.org] Sent: 17 August, 2015 10:06 PM To: Matt Dicken Cc: r-help@r-project.org Subject: Re: [R] hurdle

Re: [R] global environment

2015-01-12 Thread Matt Warpinski
Rewrite it with spaces between your assigns and numbers. This line is unclear to me: if(rst[i]<-3 & rst[i]>=-3) Is it supposed to be rst[i] <- 3, or rst[i] < -3? R might be misinterpreting what you're trying to get it to do. On Mon, Jan 12, 2015 at 1:18 AM, Methekar, Pushpa (GE Transportation, N

[R] Processing key_column, begin_date, end_date in R

2015-02-25 Thread Matt Gross
ds overlap with begin_date and end_date pairs for the same key_column. In situations where overlap exists I want to have one record for the key_column with the min(begin_date) and the max(end_date). Can anyone help me build the commands to process this data in R? Thanks, Matt -- Matt

Re: [R] plotly

2014-07-22 Thread Matt Sundquist
Hey Shane, Sorry you're having trouble. The quick start is here and walks through installation: https://plot.ly/r/. A note. If you're on Windows, you'll need Rtools to install devtools: http://cran.rstudio.com/bin/windows/Rtools/. As Sarah noted, Plotly isn't on CRAN. If you're having trouble,

[R] Problem Invoking System Commands from R

2014-10-10 Thread Matt Borkowski
d to a new computer since I last successfully ran this script...I'm wondering if this might be a permissions issue or other security setting preventing me from invoking system commands. Any ideas? -Matt [[alternative HTML version deleted]] _

Re: [R] Problem Invoking System Commands from R

2014-10-11 Thread Matt Borkowski
o the script. One further point, I booted up my old machine last night and reinstalled R and wget...and was successfully able to run the script. Old machine is Windows XP versus Windows 8.1 on my new machine. Perhaps this confirms it is a Windows permission issue and not an R problem? -Mat

[R] Parsing Google Finance page data?

2014-11-20 Thread Matt Considine
27;m interested in and hopefully someone has already done this. (For what it is worth, the only info I am looking for are the ticker, exchange, currency and "Mkt Cap" datapoint) Thanks in advance for any help - scraping is not my strong suit. Matt --- This email is free from vi

Re: [R] Parsing Google Finance page data?

2014-11-20 Thread Matt Considine
s of companies matching a name, that would be helpful. (Though that question should probably go to the finance list). In any case, thanks in advance for any thoughts put towards this. Matt library(RCurl) library(xts) library(XML) #want to return results of this # http://www.google.com/financ

[R] reshape: melt and cast

2015-08-31 Thread Matt Pickard
Hi, I have data that looks like this: *> head(ratings) QCode PID RaterName SI1 SI2 SI3 SI4 SI5 SI6 SI7 SI8 SI9 SI10 SI111 GUILT 1123 cwormhoudt 2 2 3 1 1 1 3 3 3 212 LOVE 1123 cwormhoudt 1 2 3 2 1 1 1 1 11 33 GUILT 1136 cwormhoudt 1 2

Re: [R] reshape: melt and cast

2015-09-01 Thread Matt Pickard
", "1554", "1555", "1556", "1558", "1559"), class = "factor"), RaterName = structure(c(2L, 2L, 2L, 2L, 2L, 2L), .Label = c("cwormhoudt", "zspeidel"), class = "factor"), SI1 = c(1L, 1L, 1L, 1L

[R] class-specific Gini metrics for Random Forest?

2015-10-13 Thread Matt Fagan
library(randomForest) data(iris) fit <- randomForest(Species ~ ., data=iris, importance=TRUE); fit.imp<-importance(fit) fit.imp columns 1-3 of fit.imp show the class-specific variable importance for the Mean Decrease Acuracy measure (MDA). Is there a way to calculate class-specific Gini metrics ra

[R] Validating Minitab's "Expanded Gage R&R Study" using R and lme4

2017-02-15 Thread Matt Jacob
erence attributable to the warnings produced by lmer() about the model failing to converge and being nearly unidentifiable? What could Minitab be doing differently when the measurement data contains only two distinct values? Matt This question is cross-posted to http://stats.st

Re: [R] fread transforms numbers

2017-03-22 Thread Matt Dowle
ttps://github.com/Rdatatable/data.table/wiki/Support. r-help is not supposed to be used for package support. The main thing though is thanks for helping me find this bug. Thanks, Matt On Wed, Mar 22, 2017 at 10:22 AM, William Dunlap wrote: > Here is a way to reproduce the problem: >

Re: [R] Labelling curves on graphs

2008-07-16 Thread Austin, Matt
Dr. Harrell's Hmisc package has labcurve. --Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ted Harding Sent: Wednesday, July 16, 2008 1:17 PM To: [EMAIL PROTECTED] Subject: [R] Labelling curves on graphs Hi Folks, I'd be gratefu

Re: [R] Using PrettyR to produce LaTeX output

2008-07-23 Thread Austin, Matt
you can see how to create custom summaries. --Matt Matt Austin Global Statistical Leader, denosumab PMO Director, Biostatistics Amgen, Inc -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jcarmichael Sent: Wednesday, July 23, 2008 12:46 PM To: r-hel

Re: [R] How to preserve the numeric format and digits ?

2008-07-24 Thread Austin, Matt
paste("A", format(m, scientific=FALSE, trim=TRUE), "B", sep="") -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daren Tan Sent: Thursday, July 24, 2008 5:47 PM To: [EMAIL PROTECTED] Subject: [R] How to preserve the numeric format and digits ? Instead of

Re: [R] [R-sig-Geo] LIDAR Problem in R (THANKS for HELP)

2008-08-05 Thread Matt Oliver
you can try memory.limit(size=4000) only if you have 4GB of memory on the system This is not guaranteed to solve your problem though With big datasets like lidar, you are much better off getting access to a 64bit system with a ton of RAM (>64GB). Cheers Matt On Tue, Aug 5, 2008 at 1:47

Re: [R] Using anova(f1, f2) to compare lmer models yields seemingly erroneous Chisq = 0, p = 1

2009-09-04 Thread Matt Killingsworth
ng the two multilevel model > fits, the Chisq comes back as 0, with p = 1. I am pretty sure that fit #1 > (f1) is a much better predictor of the outcome than f2, which is reflected > in the AIC, BIC , and logLik values. Why might anova be giving me this > curious output? How can I fix

[R] Problem accessing sub-methods of functions stored in a vector

2010-02-26 Thread Matt Asher
Hi folks, I am having trouble accessing sub-functions when the main function is stored in an array. For example, the following test code works fine: fcns = c(abs, sqrt) fcns[[1]](-2) fcns[[2]](2) However, when I try to access sub-functions declared within list() in a function, this only work

Re: [R] Problem accessing sub-methods of functions stored in a vector

2010-02-26 Thread Matt Asher
anguages). I am basically treating my agent function like a class that can have instances and class vars, without having to use R's backwards (IMO) way of doing OOP. Cheers. On 26.02.2010 16:33, Matt Asher wrote: Hi folks, I am having trouble accessing sub-functions when the main fun

[R] Running script with double-click

2010-03-04 Thread Matt Asher
Hi, I need to be able to run an R script by double-clicking the file name in Windows. I've tried associating the .r extension with the different R .exe's in /bin but none seems to work. Some open R then close right away, and Rgui.exe gives the message ARGUMENT "/my/file.r" __ignored__ before

Re: [R] Running script with double-click

2010-03-05 Thread Matt Asher
Thanks Steve. This is working except for plots not showing up. I'll see if I can fix that. Do you know how to target the output to an R Console that will stay open (Rgui would be best)? Cheers, Matt Steve Taylor wrote: You can create a right-mouse menu command to run an R progr

Re: [R] How should i change the SAS Codes into R Codes?

2009-07-27 Thread Matt Aldridge
.csv") Hope this helps Matt mangosolutions - R and S consultants Tel +44 (0)1249 767700 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of zhijie zhang Sent: 27 July 2009 16:04 To: r-h...@stat.math.ethz.ch Subject: [R] How

[R] Avoiding singular fits in rlm

2009-12-02 Thread Matt Crawford
I keep coming back to this problem of singular fits in rlm (MASS library), but cannot figure out a good solution. I am fitting a linear model with a factor variable, like lm( Y ~ factorVar) and this works fine. lm knows to construct the contrast matrix the way I would expect, which puts the first

Re: [R] Avoiding singular fits in rlm

2009-12-03 Thread Matt Crawford
Thanks, that was right (factor levels with no data). I forgot or didn't know that when data gets changed, the factor levels don't get changed as well. I'm sorry about missing parts of the Posting Guide. Matt Crawford On Wed, Dec 2, 2009 at 10:45 PM, Prof Brian Ripley wr

Re: [R] Using loops to run functions over a list of variables

2009-05-12 Thread Matt Killingsworth
Jun, sapply() does the trick! Thank you Jun! I really appreciate your help. -Matt On Tue, May 12, 2009 at 1:20 PM, Jun Shen wrote: > Forgot one thing, make sure your data is a list or data frame. > > > On Tue, May 12, 2009 at 12:19 PM, Jun Shen wrote: > >> I don't

[R] Plot data from table with column and row names

2009-05-20 Thread Matt Bishop
for this type of data. Help would be appreciated - I'm sure I'm missing something... Matt -- View this message in context: http://www.nabble.com/Plot-data-from-table-with-column-and-row-names-tp23632750p23632750.html Sent from the R help mailing lis

[R] ggplot2 and Date class

2009-06-01 Thread Matt Frost
"as_df" My ggplot2 package is up to date. Am I missing something else, maybe in my default aesthetics? Thanks, Matt Frost __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://

[R] How to assign names to global data frames created in a function

2013-09-03 Thread Matt Strauser
produces these data frames: frame1cond1cond2 frame1cond3cond4 frame1cond5cond6 processdf(frame2, "frame2") # produces these data frames: frame2cond1cond2 frame2cond3cond4 frame2cond5cond6 Thank you for your thoughts, Matt [[alternative HTML version deleted]] ___

Re: [R] Amelia algorithm

2013-01-12 Thread Matt Blackwell
at our webpage: http://gking.harvard.edu/amelia Hope that helps! Cheers, matt. ~~~ Matthew Blackwell Assistant Professor of Political Science University of Rochester url: http://www.mattblackwell.org On Mon, Jan 7, 2013 at 6:27 PM, zGreenfelder wrote: > On Mon, Jan 7, 2013 at 4

[R] Help searching a matrix for only certain records

2013-03-03 Thread Matt Borkowski
and slowing with every row...I figure there must be a more efficient way of pulling out only the records I need...especially when I need to repeat this for another 8 datasets. Can anyone point me in the right direction? Thanks! Matt __ R-help@r-proj

Re: [R] Help searching a matrix for only certain records

2013-03-03 Thread Matt Borkowski
the following solution which works for matching a single condition, but I couldn't quite figure out how to  modify it it to search for both my acceptable conditions... > testdata <- testdata[testdata$REC.TYPE == "SAO",,drop=FALSE] -Matt --- On Sun, 3/3/13, jim holtm

Re: [R] Help searching a matrix for only certain records

2013-03-03 Thread Matt Borkowski
work equally as well. I was a bit confused by the relative complexity of the data frames solution, as it seems like more steps than necessary. Thanks again for the input! -Matt Again, thanks for the feedback! --- On Sun, 3/3/13, arun wrote: > From: arun > Subject: Re: [R] Help searchin

[R] Computing Median for Subset of Data

2013-06-02 Thread Matt Stati
puted for? I've tried many possibilities but for some reason can't figure it out.  Thanks,  Matt.  [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

Re: [R] Any good R server-with connection examples

2012-10-23 Thread Matt Shotwell
may be the easiest way, using R, to take user input from the web browser. The site has some decent documentation and links to examples. --Matt __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the postin

Re: [R] Opening SAS file using read.sas7bdat() function in sas7bdat library.

2012-10-30 Thread Matt Shotwell
res may be laid out differently by different compilers (i.e., on different platforms), this may have led to the difficulty apparent here. Regards, Matt __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read t

[R] Plotly and rOpenSci: R and ggplot2 interactive, online, & collaborative plotting

2014-05-12 Thread Matt Sundquist
Hello R help, My name is Matt, and I'm a co-founder at Plotly <http://plot.ly>, an online graphing and analytics project. We're building an R library <http://plot.ly/r> as part of the rOpenSci<http://ropensci.org>project. You can use it to make interactive, web-ba

[R] Performing gage R&R study in R w/more than 2 factors

2012-11-19 Thread Matt Jacob
#x27;t match what I'm seeing in Minitab. Since all my factors are random, the formula I'm using looks like this: vals ~ 1 + (1|f1) + (1|f2) + (1|f3) + (1|f1:f2) + (1|f1:f3) + (1|f2:f3) What am I doing wrong, and how can I fix it? Thanks, Matt __

Re: [R] Performing gage R&R study in R w/more than 2 factors

2012-11-20 Thread Matt Jacob
some tools that are dependent on R. I've basically been trying to match up the output of R with the output of Minitab to check my work. Matt __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the postin

Re: [R] Performing gage R&R study in R w/more than 2 factors

2012-11-20 Thread Matt Jacob
m there, I can calculate the percent tolerance and other interesting statistics. It doesn't look like lm gives me that information, though. FWIW, your formula is the same as what I'm feeding into aov, and the ANOVA table output *does* match up with what Minitab is producing. Matt _

[R] Oracle Approximating Shrinkage in R?

2012-12-08 Thread Matt Considine
Hi, Can anyone point me to an implementation in R of the oracle approximating shrinkage technique for covariance matrices? Rseek, Google, etc. aren't turning anything up for me. Thanks in advance, Matt Considine __ R-help@r-project.org ma

[R] Plotly Beta: Online Plotting with R

2014-01-24 Thread Matt Sundquist
Hi R Users, My name is Matt, and I'm a part of Plotly <http://plot.ly>. We recently released an R plotting library <http://plot.ly/api/r> for making publication-quality graphs online. We wanted to let the folks on this list know. A basic summary: - Make publication-quality, on

Re: [R] Question

2010-06-16 Thread Matt Shotwell
hist(texp) summary(texp) Matt Shotwell Graduate Student Div. Biostatistics and Epidemiology Medical University of South Carolina On Wed, 2010-06-16 at 11:11 -0400, Joris Meys wrote: > Two possibilities : rescale your random vector, or resample to get > numbers within the range. But neither of

Re: [R] C interface

2010-06-18 Thread Matt Shotwell
;) > > testpp <- cfunction(signature(s="character"), code, + convention=".Call", language="C++") > > test(1) The value is 1.00[1] 1 > testpp(1) The value is 1.00[1] 1 Take a look at the code in the 'code' slot

Re: [R] Problem with writing a CSV file in UTF-8 formate

2010-06-22 Thread Matt Shotwell
coded file. Maybe notepad can't tell it's unicode, and uses ANSI (codepage?) to represent its best guess. Does your table contain non-ASCII characters? -Matt On Tue, 2010-06-22 at 10:42 -0400, Duncan Murdoch wrote: > On 22/06/2010 10:39 AM, venkata kirankumar wrote: > > Hi Murdoch,

Re: [R] Handouts / Reports or just simply printing text to PDF?

2010-06-25 Thread Matt Shotwell
Check out the brew package, by Jeff Horner. Ralf B wrote: > I assume R won't easily generate nice reports (unless one starts using > Sweave and LaTeX) but perhaps somebody here knows a package that can > create report like output for special cases? How can I simply plot > output into PDF? > Perha

Re: [R] integration of two normal density

2010-06-26 Thread Matt Shotwell
side, Bayesian statistical methods have to deal with this all the time, and we have some good methods to compute numerical integrals. Check out Monte Carlo integration, and Markov chain Monte Carlo methods. -Matt > > > Also, is there any R function or package could do mult

Re: [R] integration of two normal density

2010-06-28 Thread Matt Shotwell
Isn't it equally trivial to demonstrate that the product of two pdfs _may_ be a normalized pdf? For example, the uniform (0,1) pdf: f(x) = 1 for x in (0, 1), and 0 otherwise Hence, g(x) = f(x)*f(x) = 1 for x in (0, 1), and 0 otherwise _is_ a normalized pdf. But this is a little silly. Rather th

Re: [R] advice on package devel with external libs

2010-06-28 Thread Matt Shotwell
few other libraries. However, this puts the burden on you to maintain code written by others. There are several JSON parsers with very liberal licenses (www.json.org), and some are tiny. -Matt On Mon, 2010-06-28 at 16:10 -0400, Murat Tasan wrote: > hi all - i'm working on an R package

Re: [R] left end or right end

2010-07-01 Thread Matt Shotwell
== start2, or end1 == end2, or both? I can think of a bootstrap test for hypotheses like this, and this is relatively easy in R. -Matt On Thu, 2010-07-01 at 07:53 -0400, ravikumar sukumar wrote: > Dear all, > I am a biologist. I have two sets of distance P(start1, end1) and Q(start2, > en

Re: [R] left end or right end

2010-07-01 Thread Matt Shotwell
your biological inferences. ...And I'm still interested to hear what those are. :-) Of course, these are just my ideas, you really ought to visit a biostatistician for professional advice. -Matt On Thu, 2010-07-01 at 10:24 -0400, ravikumar sukumar wrote: > There are three possibil

Re: [R] how to display the clock time in the loop

2010-07-01 Thread Matt Shotwell
Try to flush output after printing: cat(paste(Sys.time()),"\n"); flush(stdout()) On Thu, 2010-07-01 at 16:17 -0400, Jack Luo wrote: > Hi, > > I am doing some computation which is pretty time consuming, I want R to > display CPU time after each iteration using the command Sys.time(). However, > I

Re: [R] is there a way to do dense rank in R

2010-07-01 Thread Matt Shotwell
> x <- c(5,7,7,9) > rank(unique(x))[match(x, unique(x))] [1] 1 2 2 3 On Thu, 2010-07-01 at 21:30 -0400, Suresh Singh wrote: > I have not been able to find a way to do dense rank in R > > Here is an example of what I need > > rank() gives the following > > 5 rank 1 > 7 rank 2 > 7 rank 2 > 9 *ran

Re: [R] Plot with whispers

2010-07-05 Thread Matt Shotwell
It looks like read.table is reading the first line as a data value, which is the default for read.table. Try using read.table with the argument header=TRUE. Also, consider using a box and whiskers plot for these data (?boxplot, ?lattice::bwplot). -Matt On Mon, 2010-07-05 at 12:08 -0400, Ian

Re: [R] Function to compute the multinomial beta function?

2010-07-05 Thread Matt Shotwell
How about this? mbeta <- function(...) { exp(sum(lgamma(c(...)))-lgamma(sum(c(... } > gamma(5)*gamma(6)*gamma(7)/gamma(18) [1] 5.829838e-09 > mbeta(5,6,7) [1] 5.829838e-09 On Mon, 2010-07-05 at 17:10 -0400, Gregory Gentlemen wrote: > Dear R-users, > > Is there an R function to compu

Re: [R] LondonR July Meeting

2010-07-08 Thread Matt Aldridge
Hi Raghu, I'm not sure which link isn't working but I can confirm we have registered you for the event. Anyone else wishing to register can email lond...@mango-solutions.com See you next Tuesday Thanks Matt -Original Message- From: r-help-boun...@r-project.org [mailto:r

Re: [R] Calling Gnuplot from R

2010-07-08 Thread Matt Shotwell
e complete ASCII graphics in R. Maybe there are other good reasons also? I believe octave makes good use of Gnuplot... -Matt On Thu, 2010-07-08 at 11:28 -0400, Erik Iverson wrote: > If you use Emacs, you can use org-mode with org-babel to facilitate > this... I'll refrain from asking w

Re: [R] Compress string memCompress/Decompress

2010-07-09 Thread Matt Shotwell
b, decompress, and convert back to a string > result <- dbGetQuery(con, "SELECT data FROM Compress;") > string.gz <- result[[1]][[1]] > string <- memDecompress(string.gz, type="gzip") > rawToChar(string) [1] "gzip this string, store as blob in SQLite datab

Re: [R] Compress string memCompress/Decompress

2010-07-11 Thread Matt Shotwell
On Fri, 2010-07-09 at 20:02 -0400, Erik Wright wrote: > Hi Matt, > > This works great, thanks! > > At first I got an error message saying BLOB is not implemented in RSQLite. > When I updated to the latest version it worked. SQLite began to support BLOBs from version 3.0.

Re: [R] Fast string comparison

2010-07-13 Thread Matt Shotwell
p <- cfunction(sig, code) > system.time(strings[-1] == strings[-1e5]) user system elapsed 0.036 0.000 0.035 > system.time(strcmp(strings[-1], strings[-1e5])) user system elapsed 0.032 0.000 0.034 That's pretty fast, though I seem to be working with a slower s

Re: [R] Fast string comparison

2010-07-13 Thread Matt Shotwell
010-07-13 at 09:48 -0400, Romain Francois wrote: > Hi Matt, > > I think there are some confusing factors in your results. > > > system.time(strcmp(strings[-1], strings[-1e5])) > > would also include the time required to perform both subscripting > (strings[-1] and st

Re: [R] calling a c function from R

2010-07-14 Thread Matt Shotwell
Fahim, Please see the Writing R Extensions manual http://cran.r-project.org/doc/manuals/R-exts.pdf There are simple instructions in this document under the heading "System and foreign language interfaces." -Matt On Wed, 2010-07-14 at 01:21 -0400, Fahim Md wrote: > Hi, > I am

[R] Longitudinal negative binomial regression - robust sandwich estimator standard errors

2010-07-14 Thread Matt Cooper
evel of the factor, not what I'm after or what I expected from it. Any thoughts or direction on this appreciated. Matt [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Help with Sink Function

2010-07-16 Thread Matt Shotwell
Your code between calls to sink() does not generate any output. Hence, nothing will be diverted to the file. To illustrate this point, consider for(i in 1:10) i This produces no output. However, for(i in 1:10) print(i) produces output as expected. -Matt On Fri, 2010-07-16 at 13:34 -0400

Re: [R] sink function

2010-07-23 Thread Matt Shotwell
I had addressed a problem similar to this only a few days ago. Please see the following URL: http://tolstoy.newcastle.edu.au/R/e11/help/10/07/1677.html On Fri, 2010-07-23 at 08:45 -0400, nuncio m wrote: > I have the following code to write the output from auto.arima function. The > issue is not

[R] Book on R's Programming Language

2010-07-24 Thread Matt Stati
iated . . . Matt. [[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-project.org/posting-guide.html and provide comm

Re: [R] what is a vignette?

2010-07-26 Thread Matt Shotwell
/manuals.html -Matt On Mon, 2010-07-26 at 07:55 -0400, Alaios wrote: > I am trying to find a simple R guide that explain what a vignette is but so > far > I didnt make any progress. I tried to search inside R's built in help.start() > but it only returns results how to see vignettes.

Re: [R] Which language is faster for numerical computation?

2010-09-09 Thread Matt Shotwell
++ are consistently rated highly (often in the top 3) in popularity and use. Fortran is not. This would make a difference if you want to collaborate or ask for help. -Matt On Thu, 2010-09-09 at 06:26 -0400, Christofer Bogaso wrote: > Dear all, R offers integration mechanism with different programm

Re: [R] Reproducible research

2010-09-09 Thread Matt Shotwell
nted quite differently. It depends on the evaluate package, available in the CRAN. The tentatively titled 'markup' package is attached. After it's installed, see ?markup and the few examples in the inst/ directory, or just example(markup). -Matt On Thu, 2010-09-09 at 01:47 -0400,

Re: [R] Reproducible research

2010-09-09 Thread Matt Shotwell
Well, the attachment was a dud. Try this: http://biostatmatt.com/R/markup_0.0.tar.gz -Matt On Thu, 2010-09-09 at 10:54 -0400, Matt Shotwell wrote: > I have a little package I've been using to write template blog posts (in > HTML) with embedded R code. It's quite small but v

Re: [R] R Founding

2010-09-16 Thread Matt Shotwell
money should be used. > > Your massage has inspired me to write a post on the topic, titles: Was this --^ a Freudian slip? In any case, it seems consistent with your notion of compensation for open-source developers. :) Interesting post Tal. -Matt > "Open source and money –

Re: [R] Is there a bisection method in R?

2010-09-20 Thread Matt Shotwell
0.5671433 > bR [1] 0.5671433 Of course, Ravi's version is better for production (and most likely faster, though not significantly so in this example) because recursion is more expensive than looping. -Matt On Fri, 2010-09-17 at 17:44 -0400, Ravi Varadhan wrote: > Here is something

Re: [R] puzzle with integrate over infinite range

2010-09-21 Thread Matt Shotwell
You could try pnorm also: shiftedGaussR <- function(x0 = 500) { sd <- 100/sqrt(2) int <- pnorm(0, x0, sd, lower.tail=FALSE, log.p=TRUE) exp(int + log(sd) + 0.5 * log(2*pi)) } > shiftedGaussR(500) [1] 177.2454 > shiftedGauss(500) [1] 177.2454 -Matt On Tue, 2010

[R] read.xls??

2010-10-09 Thread Matt Curcio
Greeting all, I am having a little trouble finding the 'right' package that will read in .xls Excel spreadsheets. My Ubuntu base does not seem to have the ability to read them. Any suggestions? Cheers, M __ R-help@r-project.org mailing list https://stat

Re: [R] Regular expression to find value between brackets

2010-10-13 Thread Matt Shotwell
Here's a shorter (but more cryptic) one: > gsub("^([^\\(]+)(\\((.+)\\))?", "\\2", tests) [1] """(%)" "(%)" "(mg/ml)" > gsub("^([^\\(]+)(\\((.+)\\))?", "\\3", tests) [1] ""

[R] Data.frame Vs Matrix Vs Array: Definitions Please

2010-10-26 Thread Matt Curcio
o use 'data.frames', 'matrix', and 'arrays'. It discusses ways in which to simplify your work. Here are a few possibilities for simplifying: • Don’t use a list when an atomic vector will do. • Don’t use a data frame when a matrix will do. • Don’t try to use an atom

Re: [R] ForestPlot or similar

2010-10-30 Thread Matt Shotwell
Here is a small function for forest plots in R, with an example: http://biostatmatt.com/wiki/r-credplot -Matt On Sat, 2010-10-30 at 11:40 -0400, Mestat wrote: > Here is one example: > I have three vectors (mean,lower interval, upper interval) > mean<-c(2,4,6,8) > l<-c(1,2,3,4

Re: [R] Lattice plots for images

2010-11-03 Thread Matt Shotwell
Have you tried using the 'mai' argument to par()? Something like: par(mfrow=c(3,3), mai=c(0,0,0,0)) I've used this in conjunction with image() to plot raster data in a tight grid. <http://biostatmatt.com/archives/727> -Matt On Wed, 2010-11-03 at 11:13 -0400, Neba Funwi

Re: [R] data acquisition with R?

2010-11-05 Thread Matt Shotwell
d is a 'tty' connection, a more low level connection to the POSIX termios interface <http://biostatmatt.com/archives/564>. Both of these solutions require that you apply the patch and recompile R. I can help with this, if you like. AFAIK, these are the only attempts at interfacing R

Re: [R] log-transformed linear regression

2010-11-11 Thread Matt Shotwell
You could even construct a bootstrap confidence interval for the approximate slope. -Matt On Wed, 2010-11-10 at 19:27 -0500, servet cizmeli wrote: > Dear List, > > I would like to take another chance and see if there if someone has > anything to say to my last post... > > bump >

Re: [R] Fatal Error R

2010-11-17 Thread Matt Shotwell
Please see below. On Wed, 2010-11-17 at 04:41 -0500, Ted Harding wrote: > On 17-Nov-10 00:02:39, José Fernando Zea Castro wrote: > > Hello. > > First, I'm thankful about your wonderful project. > > > > However, I have serious worries about the reliability of R. > > I found the next bug which I co

Re: [R] statistical test for comparison of two classifications (nominal)

2010-11-17 Thread Matt Shotwell
part is drawing statistical inference about these indices. It's difficult to formulate a null hypothesis, and even more difficult to determine a null distribution for a partition comparison index. A bootstrap test might work, but you will probably have to implement this yourself. -Matt On Wed, 2010-

Re: [R] statistical test for comparison of two classifications (nominal)

2010-11-22 Thread Matt Shotwell
meaningful null hypothesis about the collection of classifications, and imposing the null hypothesis in a bootstrap sampling scheme. -Matt On Wed, 2010-11-17 at 10:01 -0500, Martin Tomko wrote: > Thanks Mat, > I have in the meantime identified the Rand index, but not the others. I >

[R] ggplot - line_range help, second tier axis label

2010-12-08 Thread Matt Cooper
t;,"1B","2A","2B")) ggplot(figure4, aes(var1var2, cen, ymin = min, ymax=max, linetype=var1)) + scale_linetype_manual(values = c(1,3)) + geom_pointrange() + geom_errorbar(width=0.2) + opts(title="Title goes here") + labs(x="Var2", y="Y units"

[R] convert non-ultrametric phylo to dendrogram

2010-12-08 Thread Matt Bakker
for my purposes (to use it to order the layout of a heatmap). I get an error using as.hclust.phylo because the tree is not ultrametric. Is there no way to convert a non-ultrametric tree of class "phylo" into a "dendrogram"? With thanks for any help that you may be able t

Re: [R] Encoding problem - I fails to read Hebrew text from online

2010-12-09 Thread Matt Shotwell
t using the web service... We may need to write an HTMLDecode function if there isn't one already. By the way, what's the Hebrew text in English? Best, Matt On Thu, 2010-12-09 at 12:21 -0500, Tal Galili wrote: > I am bumping this question in the hopes that someone might be able to &

Re: [R] Encoding problem - I fails to read Hebrew text from online

2010-12-09 Thread Matt Shotwell
is no existing solution, I think it might be worthwhile to look at how PHP and Python do it (and maybe borrow some code :) ). -Matt On Thu, 2010-12-09 at 14:27 -0500, Tal Galili wrote: > Hi Matt, > Thanks for having a look at this. > I just spent some time looking around and couldn't fi

[R] Pure curiosity

2010-12-12 Thread Matt Cooper
Pure curiosity but does anyone know why '<-' and '=' generate different columning headers? > test <- data.frame(V1=c(1,2,3), V2=c(4,5,6)) > test V1 V2 1 1 4 2 2 5 3 3 6 > test <- data.frame(V1<-c(1,2,3), V2<-c(4,5,6)) > test V1c.1..2..3. V2c.4..5..6. 11

Re: [R] User input in R program

2011-01-21 Thread Matt Shotwell
Martyn Plummer's 'coda' package has some nice interactive menus. The package appears to be written entirely in R. You could start with the codamenu() function in the package source: http://cran.r-project.org/web/packages/coda/index.html -Matt On Fri, 2011-01-21 at 14:26 +0200,

[R] Movie Question

2011-01-22 Thread Matt Curcio
that this would be a great little project. Cheers, M Matt Curcio E: matt.curcio...@gmail.com __ 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

[R] Prediction Intervals vs. Confidence Bands

2010-07-27 Thread Matt Stati
When I ask R to compute: predict(data, int = "c"), following a linear regression, what is it computing exactly? How are these lower and upper "prediction" limits different than what I would get for confidence limits? Thanks, Matt. [[alternative

  1   2   3   >