Re: [R] Odp: Cbind query

2010-10-22 Thread karthicklakshman
Hello Petr Pikal, Thanks for the suggestion. I am sorry for not being very clear in my mail. from your example, Its clear to me now about how to turn factors to character values. I am working on large data sets, and the ultimate aim is to create interaction network, so the characters are very

Re: [R] Cbind query

2010-10-22 Thread karthicklakshman
Hello jholtman, Thanks very much for the suggestion. I tried using "as.is=TRUE" and it worked as the way I expected. Sorry for not being clear about the problem in my mail. The characters are very much needed, cos I am trying to create a signaling network using "Rgraphviz". Thanks again. Regar

[R] Feedback on you manual

2010-10-22 Thread 刘力平
Dear Sir/Madam: Great thanks for R project and you contribution. I am Liping Liu, a beginner of R. Recently, I use R much. I wish you could improve the manual by making it search engine friendly. The "Introduction to R" page is too long. I am often redirected to this page by goole, but I still c

Re: [R] contour on a simplex

2010-10-22 Thread Dennis Murphy
Hi: Check out this post on R-help from February, and look carefully at the solution of Walmes Zeviani - I believe it's close to what you're requesting: http://r.789695.n4.nabble.com/Triangular-filled-contour-plot-td1557386.html HTH, Dennis On Fri, Oct 22, 2010 at 6:15 PM, Yunting Sun wrote: >

[R] Regarding your distributed text mining with tm

2010-10-22 Thread Shivani Rao
Hello, I had been using R for text mining already. I wanted to use R for large scale text processing and for experiments with topic modeling. I started reading tutorials and working on some of those. I will now put down my understanding of each of the tools: 1) R text mining toolbox: Meant for loc

Re: [R] Error message in using nlm() and optim()

2010-10-22 Thread harishmani
Thanks Ravi for your reply. I have sorted out the problem. The error message was due to the wrong specification of the likelihood function. Thanks once again Harish -- View this message in context: http://r.789695.n4.nabble.com/Error-message-in-using-nlm-and

Re: [R] How long does skipping in read.table take

2010-10-22 Thread Gabor Grothendieck
On Fri, Oct 22, 2010 at 6:41 PM, Mike Marchywka wrote: >> From: ggrothendi...@gmail.com >> Date: Fri, 22 Oct 2010 18:28:14 -0400 >> To: dimitri.liakhovit...@gmail.com >> CC: r-help@r-project.org >> Subject: Re: [R] How long does skipping in read.table take >> >> On Fri, Oct 22, 2010 at 5:17 PM, Di

Re: [R] read.table input array

2010-10-22 Thread Balpo
David, I actually changed the column type from factor to character, and given the default as.is value, it now works smoothly. It is, nonetheless, still strange to my why it suddenly stopped working. Perhaps there was a version update or something similar. Thank you David, Jim and Jorge for yo

Re: [R] read.table input array

2010-10-22 Thread David Winsemius
On Oct 22, 2010, at 8:40 PM, Balpo wrote: Hello Jim How can I ensure this reading it from the file? The thing is, I cannot use the textConnection(), because the real file has millions of rows. The advice being offered is not that you use textConnection. That is just for illustration. You

Re: [R] wait for graph to finish plotting

2010-10-22 Thread David Winsemius
On Oct 22, 2010, at 12:50 PM, wrote: Tal Galili writes: I suspect that using "dev.copy2eps" Is not going to help you here. Please try again using: pdf(...) # Check: ?pdf for(i in something) { plot(things) } dev.off() But give pdf() the file path. Make sure you can make it work

Re: [R] lm looking for weights outside of the user-defined function

2010-10-22 Thread David Winsemius
On Oct 22, 2010, at 12:17 PM, William Dunlap wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of David Winsemius Sent: Friday, October 22, 2010 6:25 AM To: Dimitri Liakhovitski Cc: r-help Subject: Re: [R] lm looking for weights

Re: [R] Random Forest AUC

2010-10-22 Thread vioravis
Thanks Max and Andy. If the Random Forest is always giving an AUC of 1, isn't it over fitting??? If not, how do you differentiate this from over fitting??? I believe Random forests are claimed to never over fit (from the following link). http://www.stat.berkeley.edu/~breiman/RandomForests/cc_home

Re: [R] read.table input array

2010-10-22 Thread Balpo
Hello Jim How can I ensure this reading it from the file? The thing is, I cannot use the textConnection(), because the real file has millions of rows. Thank you, Balpo On 22/10/10 21:34, jim holtman wrote: You need to make sure that your data is read in a characters and not factors: x<- r

Re: [R] read.table input array

2010-10-22 Thread Balpo
Thanx Jorge, while doing it exactly as you say, it does work, but I need to read the information form a file. When I read it from the file it still shows 780. On 22/10/10 21:30, Jorge Ivan Velez wrote: Hi Balpo, Try this: # data x<- read.table(textConnection("ktot attractors pctstatesinat

Re: [R] read.table input array

2010-10-22 Thread jim holtman
You need to make sure that your data is read in a characters and not factors: > x <- read.table(textConnection("ktot attractors pctstatesinattractors t > lengths + 1.0 2.0 3.8146973E-4 17 c(2,2) + 1.0 1.0 5.722046E-4 28 c(2) + 1.0 2.0 9.536743E-4 18 c(2,2) + 1.0 1.0 0.0010490417 14 c(1)"), as.is

Re: [R] read.table input array

2010-10-22 Thread Jorge Ivan Velez
Hi Balpo, Try this: # data x <- read.table(textConnection("ktot attractors pctstatesinattractors t lengths 1.0 2.0 3.8146973E-4 17 c(2,2) 1.0 1.0 5.722046E-4 28 c(2) 1.0 2.0 9.536743E-4 18 c(2,2) 1.0 1.0 0.0010490417 14 c(1)"), header = TRUE) closeAllConnections() # function to do the pa

Re: [R] read.table input array

2010-10-22 Thread Balpo
Hello again Jim (and everyone) I am having a weird problem here with the same parsing thing. For example, for the first row I have the following 5 columns. 1.02.03.8146973E-417c(2,2) I need to convert that c(2,2) into a list and get its mean, in this particular case mean

Re: [R] Conversion of S+ libraries

2010-10-22 Thread Bill.Venables
Bill D. is quite right, I did have in mind conversion the other way round. I am happy to concede. The interesting thing for me is the (relatively) automatic conversion from .sgml to .Rd format. This is likely to speed things up considerably. Bill. -Original Message- From: William

Re: [R] Controlling number of numbers before R rewrites to "+e18" etc

2010-10-22 Thread jim holtman
Your best bet is to make sure that you read the IDs in as characters. If they are being read in as floating point numbers, then there is only 15 digits of accuracy, so if you have IDs 18-22 digits, you will be missing data. So if you are using read.table, then look at colClasses to see how to do t

Re: [R] How long does skipping in read.table take

2010-10-22 Thread Gabor Grothendieck
On Fri, Oct 22, 2010 at 9:45 PM, Dimitri Liakhovitski wrote: > Gabor, > thanks a lot - sqldf might be a solution. However, do you know if > sqldf can also read in .txt files (with different delimiters)? > The data I am dealing with is "|" - delimited. So, I was using > read.table(...,sep="|") > I

Re: [R] How long does skipping in read.table take

2010-10-22 Thread Dimitri Liakhovitski
Gabor, thanks a lot - sqldf might be a solution. However, do you know if sqldf can also read in .txt files (with different delimiters)? The data I am dealing with is "|" - delimited. So, I was using read.table(...,sep="|") I looked at sqldf description - but did not see examples with .txt. Thanks

Re: [R] xyplot inside a loop

2010-10-22 Thread Jorge Ivan Velez
Hi Hogbin, Thank you for the reproducible example! In order to get what you want, you need to print() your xyplot(): library(lattice) for(i in 1:10){ print(xyplot(rnorm(100) ~ rnorm(100))) # print() Sys.sleep(0.5) } HTH, Jorge On Fri, Oct 22, 2010 at 7:53 PM, Zhang, Hongbin [VA] <

Re: [R] bind matrices by row

2010-10-22 Thread Jorge Ivan Velez
Hi Lorenzo, You might try: do.call(cbind, lapply(paste('matrix', 1:5, sep = ''), get)) HTH, Jorge On Fri, Oct 22, 2010 at 9:18 PM, Lorenzo Cattarino <> wrote: > Hi R-users > > > > I have a series of matrices and I would like to bind them together by > column using a loop (i.e. not writing cbi

[R] bind matrices by row

2010-10-22 Thread Lorenzo Cattarino
Hi R-users I have a series of matrices and I would like to bind them together by column using a loop (i.e. not writing cbind(matrix1, matrix2,matrix3)). The reason is because in my real data set I have a very large number of matrices. Example: matrix1 <- matrix (1:12,4,3) matrix2 <

Re: [R] How long does skipping in read.table take

2010-10-22 Thread Mike Marchywka
> From: ggrothendi...@gmail.com > Date: Fri, 22 Oct 2010 18:28:14 -0400 > To: dimitri.liakhovit...@gmail.com > CC: r-help@r-project.org > Subject: Re: [R] How long does skipping in read.table take > > On Fri, Oct 22, 2010 at 5:17 PM, Dimitri Liakho

[R] xyplot inside a loop

2010-10-22 Thread Zhang, Hongbin [VA]
Hi, I am using lattice package and like to do this: library(lattice) for(i in 1:10){ xyplot(rnorm(100) ~ rnorm(100)) Sys.sleep(0.5) } But the display could not show on R device for some reasons. My real xyplot is more complicate, e.g., I like to simulate an animation with 4 panels. But the

Re: [R] Random Forest AUC

2010-10-22 Thread Liaw, Andy
Let me expand on what Max showed. For the most part, performance on training set is meaningless. (That's the case for most algorithms, but especially so for RF.) In the default (and recommended) setting, the trees are grown to the maximum size, which means that quite likely there's only one data

[R] contour on a simplex

2010-10-22 Thread Yunting Sun
Hello, anyone knows if there is a way in R to draw contour on a simplex based on a function f(x,y,z) with domain (x+y+z = 1)? Thank you! gigi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mail

Re: [R] Ordination plot option missing from PCA dialog

2010-10-22 Thread Bryan Hanson
Bill, this may be a long shot, but the error you report is extremely close to what you get on a Mac when trying to load rgl when X11 is missing. Bryan ** Bryan Hanson Professor of Chemistry & Biochemistry DePauw University 602 S. College Avenue Greencastle, IN 46135 PHONE 765-658-4

Re: [R] How long does skipping in read.table take

2010-10-22 Thread Gabor Grothendieck
On Fri, Oct 22, 2010 at 5:17 PM, Dimitri Liakhovitski wrote: > I know I could figure it out empirically - but maybe based on your > experience you can tell me if it's doable in a reasonable amount of > time: > I have a table (in .txt) with a 17,000,000 rows (and 30 columns). > I can't read it all

Re: [R] Combining the values of two variables into one

2010-10-22 Thread Marc Schwartz
On Oct 22, 2010, at 4:14 PM, Marc Schwartz wrote: > On Oct 22, 2010, at 4:00 PM, David Herzberg wrote: > >> I start with: >> >> v1<-c(1,3,5,7) >> v2<-c(2,4,6,8) >> >> And I want to end up with: >> >> v3<-c(12,34,56,78) >> >> How do I get there? >> >> Thanks, > > >> v1*10 + v2 > [1] 12 34 5

[R] cv.lm() broken; cross validation vs. predict(interval="prediction")

2010-10-22 Thread Daniel Weitzenfeld
<< repost because previous attempt was not plain text, sorry! >> Hi Folks, I have a pretty simple problem: after building a multivariate linear model, I need to report my 95% confidence interval for predictions based on future observations. I know that one option is to use predict(interval="predi

Re: [R] read.spss warning message (Unrecognized record type 7, subtype 18 encountered in system file)

2010-10-22 Thread JKPeck
Record 7 is an extension record for the SPSS sav file format. It is used for new features in order to preserve the ability of older versions of SPSS to read newer files. I don't recall what subtype 18 is, but in most cases, an unrecognized subtype does not affect the data. -- View this message

[R] Of possible interest for (Win|Open)BUGS users on Linux platforms

2010-10-22 Thread Emmanuel Charpentier
Dear list, It might be of interest to (Win|Open)BUGS users trying to use it from R on Linux platform, and to Linux R users trying to call (Win|Open)BUGS to note that two new packages have appeared on the OpenBUGS "User Conributed Code" (http://openbugs.info/w/UserContributedCode). R2OpenBUGS seem

Re: [R] How long does skipping in read.table take

2010-10-22 Thread Mike Marchywka
> Date: Fri, 22 Oct 2010 17:17:58 -0400 > From: dimitri.liakhovit...@gmail.com > To: r-help@r-project.org > Subject: [R] How long does skipping in read.table take > > I know I could figure it out empirically - but maybe based on your > experience you can tell me if it's doable in a reasonable

Re: [R] glm(quasipoisson) with non-integer response

2010-10-22 Thread aoxbrough
Hi, I realise this was a few years ago, but any chance you could pass on the help page that give references for this? I have the same issue with my own data at present (noninteger count data). Many thanks, Anne Oxbrough -- View this message in context: http://r.789695.n4.nabble.com/glm-quas

[R] How long does skipping in read.table take

2010-10-22 Thread Dimitri Liakhovitski
I know I could figure it out empirically - but maybe based on your experience you can tell me if it's doable in a reasonable amount of time: I have a table (in .txt) with a 17,000,000 rows (and 30 columns). I can't read it all in (there are many strings). So I thought I could read it in in parts (e

Re: [R] Combining the values of two variables into one

2010-10-22 Thread Marc Schwartz
On Oct 22, 2010, at 4:00 PM, David Herzberg wrote: > I start with: > > v1<-c(1,3,5,7) > v2<-c(2,4,6,8) > > And I want to end up with: > > v3<-c(12,34,56,78) > > How do I get there? > > Thanks, > v1*10 + v2 [1] 12 34 56 78 HTH, Marc Schwartz __

Re: [R] big data and lmer

2010-10-22 Thread Jay Emerson
Though bigmemory, ff, and other big data solutions (databases, etc...) can help easily manage massive data, their data objects are not natively compatible with all the advanced functionality of R. Exceptions include lm and glm (both ff and bigmemory support his via Lumley's biglm package), kmeans,

[R] Combining the values of two variables into one

2010-10-22 Thread David Herzberg
I start with: v1<-c(1,3,5,7) v2<-c(2,4,6,8) And I want to end up with: v3<-c(12,34,56,78) How do I get there? Thanks, David S. Herzberg, Ph.D. Vice President, Research and Development Western Psychological Services 12031 Wilshire Blvd. Los Angeles, CA 90025-1251 Phone: (310)478-2061 x144 FAX

[R] Cyclic loess

2010-10-22 Thread viritha
Hi, I am new to R statistics.I am doing microarray analysis. For which I have text file "__.txt[1]" which contains 47 columns and 43377 rows including the first row and first column with headers(names). I need to write a code to normalize using cyclic loess. I see this formula for it: normalize.lo

Re: [R] previous business day

2010-10-22 Thread Li, Jing Yi
Thanks for the info! -Original Message- From: David Scott [mailto:d.sc...@auckland.ac.nz] Sent: Friday, October 22, 2010 4:19 PM To: David Reiner Cc: Li, Jing Yi; r-help@r-project.org Subject: Re: [R] previous business day On 23/10/2010 4:59 a.m., David Reiner wrote: > Look at the docum

Re: [R] previous business day

2010-10-22 Thread David Scott
On 23/10/2010 4:59 a.m., David Reiner wrote: Look at the documentation for timeDate and try ?timeNdayOnOrBefore after loading the package. -- David If you are dealing with such problems I suggest you obtain "A Discussion of Time Series Objects for R in Finance" available from Rmetrics for

Re: [R] wait for graph to finish plotting

2010-10-22 Thread news
Tal Galili writes: > I suspect that using "dev.copy2eps" Is not going to help you here. > > Please try again using: > >  pdf(...)  # Check: ?pdf >  for(i in something) >  { >     plot(things) >  } >  dev.off() > > But give pdf() the file path. > Make sure you can make it work with simple plots.  

Re: [R] Help: Maximum likelihood estimation

2010-10-22 Thread dave fournier
Actually it is not that difficult to parameterize the covariance matrix so that the optimization is unconstrained. first parameterize the correlation matrix and the standard deviations separately. the std devs can be parameterized as sigma_i=exp(x_i) 1<=i<=n For the correlation matri

Re: [R] Ordination plot option missing from PCA dialog

2010-10-22 Thread William C. Nelson, PhD
My apologies for the too-brief description of my problem. Let me start again. As I said before, I have R-2.11.1 installed on SLES 10.1. I have installed on top of that Rcmdr v 1.6.0 and many associated packages (the default suggestions during Rcmdr installation). Upon starting Rcmd

Re: [R] wait for graph to finish plotting

2010-10-22 Thread Tal Galili
If you do it the way I just wrote, you will get 1 pdf file with many figures inside it. If you want several files, you can use something like: png(filename = "Rplot%03d.png") Instead of using "pdf" in my last example. Keep this outside the loop :) p.s: at this point you probably have numerous op

[R] Problem with Aggregate - Sum, limit on number of criteria

2010-10-22 Thread James Splinter
Hello, It appears there is a limit in the number of criteria that can be put into the Aggregate sum function. (It looks like it is 32). My code is; HSfirst=aggregate(count, list(P2010W,P2009S,P2009W,P2008S,P2008W,P2007S,P2007W,P2006S,P2006W,pcom,W2010W,W2009S,W2009W,W2008S,W2008W,W2007S,W2007W,W

Re: [R] lm looking for weights outside of the user-defined function

2010-10-22 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of David Winsemius > Sent: Friday, October 22, 2010 6:25 AM > To: Dimitri Liakhovitski > Cc: r-help > Subject: Re: [R] lm looking for weights outside of the > user-defined function

Re: [R] previous business day

2010-10-22 Thread Li, Jing Yi
Great. Thanks a lot! Please follow the attached hyperlink to an important disclosure: http://www.credit-suisse.com/legal/marketcommentary -Original Message- From: David Reiner [mailto:david.rei...@xrtrading.com] Sent: Friday, October 22, 2010 11:59 AM To: Li, Jing Yi Cc: r-help@r-proj

Re: [R] wait for graph to finish plotting

2010-10-22 Thread Tal Galili
I suspect that using "dev.copy2eps" Is not going to help you here. Please try again using: pdf(...) # Check: ?pdf for(i in something) { plot(things) } dev.off() But give pdf() the file path. Make sure you can make it work with simple plots. then check it on your situation, and let us

Re: [R] covariance matrix

2010-10-22 Thread Bert Gunter
Unintelligible -- to me anyway. You will have to explain what you mean more explicitly and with greater clarity -- at least for my feeble mind-- to get help. -- Bert Gunter On Fri, Oct 22, 2010 at 11:01 AM, Marcelo Lima wrote: > Dear all, > > I generated a covariance matrix and I would like to g

[R] covariance matrix

2010-10-22 Thread Marcelo Lima
Dear all, I generated a covariance matrix and I would like to generate a 1D plot of the data that auto-correlate. any suggestions? Thanks, Marcelo -- Marcelo Andrade de Lima UNIFESP - Universidade Federal de São Paulo Departamento de Bioquímica Disciplina de Biologia Molecular Rua Três de Maio

Re: [R] Conditional looping over a set of variables in R

2010-10-22 Thread David Herzberg
Bill, thanks so much for this. I'll get a chance to test it later today, and will post the outcome. David S. Herzberg, Ph.D. Vice President, Research and Development Western Psychological Services 12031 Wilshire Blvd. Los Angeles, CA 90025-1251 Phone: (310)478-2061 x144 FAX: (310)478-7838 email

[R] add diagonal line to covariance matrix

2010-10-22 Thread Marcelo Lima
Hi, Created a covariance matrix and i would like to add a diagonal line to the plot, any suggestions? Thanks -- Marcelo Andrade de Lima UNIFESP - Universidade Federal de São Paulo Departamento de Bioquímica Disciplina de Biologia Molecular Rua Três de Maio 100, 4 andar - Vila Clementino, 04044-

Re: [R] how do I make a correlation matrix positive definite?

2010-10-22 Thread Ravi Varadhan
I responded to another question that asked the exact same question. So, I will repeat my answer here: Nick Higham (2002) discusses algorithms for this. One of the algorithms discussed in the paper is implemented in the "Matrix" package as `nearPD' function. library(Matrix) ?nearPD Ravi.

Re: [R] Help: Maximum likelihood estimation

2010-10-22 Thread Ravi Varadhan
I am not surprised that you are running into difficulties with this model estimation, since you are treating a constrained optimization problem as unconstrained one. It is not so easy to set constraints on the covariance matrix (i.e. positive definiteness). The is the beauty of the EM algorithm i

Re: [R] Display list redraw incomplete when exporting plots

2010-10-22 Thread Greg Snow
Can you show us the code that generated the errors? Best if you can provide reproducible code (stuff that we can just cut and paste and it runs, not depending on data that we do not have, you can generate random data, use built in datasets, or use dput with your data). -- Gregory (Greg) L. Sno

Re: [R] Error message in using nlm() and optim()

2010-10-22 Thread Ravi Varadhan
You have not provided us sufficient information to help you. I would guess that the error message probably has something to do with the way your likelihood function is defined. Can you at least show us how the function is defined (just the argument list) and the optim call? Ravi. -Original

[R] Controlling number of numbers before R rewrites to "+e18" etc

2010-10-22 Thread ZeMajik
Hey, I'm using R as a pre-processor for a large dataset with IDs which are numeric (but has no numeric meaning so can be seen as factors). I do some data formating and then write it out to a csv file. However the problem is that the IDs are very long, 18-22 chars long more precisely. R is constan

[R] svyglm and R-squared (survey package)

2010-10-22 Thread Chirag Patel
Hello, This question is relevant for users of the survey package and the function 'svyglm'. I am fitting a model using a normal link (linear regression) and would like to compute the R-squared. How can I retrieve or compute this from the data structure returned from svyglm? Thank you, Chirag

Re: [R] scale,centre,and get more interactions

2010-10-22 Thread Ben Bolker
Baris Demiral googlemail.com> writes: > > Hi folks, > > I am new to lme in R, and I have a question regarding to the effect of scale > function on the lme. When I use the function to scale and centre the levels > of the fixed effects (e.g., X and Y; both have two levels) and write them to > new

Re: [R] about libsvm

2010-10-22 Thread Steve Lianoglou
Hi, On Fri, Oct 22, 2010 at 12:27 PM, Neeti wrote: > > thank you so much.. but i could not understand which parameter should i use? Sorry, I can't really help you unless you're a lot more specific about what you are having problems with. Look at the "Examples" section in the help for the svm fu

Re: [R] Odp: importing csv gets me all 16,000 columns with "NA"

2010-10-22 Thread mkinseth
Thank you. I will try this. -- View this message in context: http://r.789695.n4.nabble.com/importing-csv-gets-me-all-16-000-columns-with-NA-tp3006480p3007477.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

Re: [R] Conditional looping over a set of variables in R

2010-10-22 Thread William Dunlap
You were a bit vague about the format of your data. I'm assuming all columns were numeric and the entries are one of 0, 1, and NA (missing value). I made a little function to generate random data of that format for testing purposes: makeData <- function (nrow = 1500, ncol = 140, pMissing = 0.1)

Re: [R] about libsvm

2010-10-22 Thread Neeti
thank you so much.. but i could not understand which parameter should i use? -- View this message in context: http://r.789695.n4.nabble.com/about-libsvm-tp3007214p3007500.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-projec

Re: [R] Dragging an .RData file into R on win-7 doesn't work?

2010-10-22 Thread Andrew Redd
NppToR is not guaranteed to work when ran as Administrator. This is due to the different permissions that is running. NppToR without admin privileges should not be able to find the running R process, or should not be able to control it. Although If you run NppToR as Admin it should be able to c

Re: [R] Conditional looping over a set of variables in R

2010-10-22 Thread Adrienne Wootten
David, here I'm referring to your data as testmat, a matrix of 140 columns and 1500 rows, but the same or similar notation can be applied to data frames in R. If I understand correctly, you are looking for the first response (column) where you got a value of 1. I'm assuming also that since your m

Re: [R] how fit linear model with fixed slope?

2010-10-22 Thread Masca, Nicholas
Hi, It looks to me like you want to fit x as an offset (i.e. a variable with a fixed gradient of 1). If so, simply do: lm(y~1+offset(x)) #for a model with an intercept or lm(y~-1+offset(x)) #for a model with no intercept Cheers, Nick -Original Message- From: r-help-boun...@r-project.o

[R] using gedit

2010-10-22 Thread Eric Elguero
Dear all, I'm using R (2.10.1) under Ubuntu (9.10) and, as I don't like vi, I edit my functions with the command : edit(.,editor="gedit") which works fine, except when gedit happens to be already running. Then a new tab is created, and on exit all changes are lost, regardless if I close the tab or

[R] FitARp

2010-10-22 Thread Rosario Garcia Gil
Dear R users, I have a data set with time series as continuous (time(day of measurement) = 1,7,14,21...), for each time I have measured height in a total of 100 individuals. I would like to correlate height with chlorophyll content (single measurement per individual), and for that I would like

[R] Interpolate irregular time series

2010-10-22 Thread Salim Alexander (salimale)
Hi all, Issue: I have two datasets, one is a regular time series (rain gauge) with resolution of 10 minutes. The other one is an irregular time series (link). Now I want to analyze the correlation between these two datasets with linear regression. The regular time series is a data.frame and the

[R] scale,centre,and get more interactions

2010-10-22 Thread Baris Demiral
Hi folks, I am new to lme in R, and I have a question regarding to the effect of scale function on the lme. When I use the function to scale and centre the levels of the fixed effects (e.g., X and Y; both have two levels) and write them to new columns: ex: dat$cX<-scale(as.numeric(dat$X),center =

Re: [R] previous business day

2010-10-22 Thread David Reiner
Look at the documentation for timeDate and try ?timeNdayOnOrBefore after loading the package. -- David -Original Message- From: Li, Jing Yi [mailto:jingyi...@credit-suisse.com] Sent: Friday, October 22, 2010 9:38 AM To: David Reiner; David Winsemius Cc: r-help@r-project.org Subject: RE

Re: [R] printing a variable during a loop

2010-10-22 Thread Joshua Wiley
I'm glad this has helped both of you, but as a note, David deserves the credit here---I just put the code together and tested it on Windows. Josh On Fri, Oct 22, 2010 at 3:59 AM, wrote: > > Thank you for this! > > I had also wanted in the past to do this, and ended up writing dummy files > with

Re: [R] getting all contrasts from glm

2010-10-22 Thread Mark Difford
Jim, >> In the glm object I can find the contrasts of the main treats vs the >> first i.e. 2v1, 3v1 and >> 4v1 ... however I would like to get the complete set including 3v2, 4v2, >> and 4v3 ... along with >> the Std. Errors of all contrasts. Your best all round approach would be to use the m

[R] Conditional looping over a set of variables in R

2010-10-22 Thread David Herzberg
Here's the problem I'm trying to solve in R: I have a data frame that consists of about 1500 cases (rows) of data from kids who took a test of listening comprehension. The columns are their scores (1 = correct, 0 = incorrect, . = missing) on 140 test items. The items are numbered sequentially a

[R] online course: Graphics in R with Paul Murrell

2010-10-22 Thread Janet Dobbins
Paul Murrell will be teaching his online course"Graphics in R," on Nov. 5 - Dec. 3 at statistics.com. “Graphics in R,” teaches you how to produce publication-quality statistical plots of data using R. It will cover plots such as scatterplots, bar plots, histograms, boxplots and Trellis plots. It

Re: [R] printing a variable during a loop

2010-10-22 Thread William Dunlap
If you are using the Windows GUI you can turn 'output buffering' on and off by either typing Ctrl-W or by using the Misc>Output Buffering menu item. When output buffering is off you may not need to add flush.console() to your code. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -

Re: [R] Conversion of S+ libraries

2010-10-22 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of > bill.venab...@csiro.au > Sent: Thursday, October 21, 2010 5:33 PM > To: glenn.tre...@ilim.com; r-help@r-project.org > Subject: Re: [R] Conversion of S+ libraries > > It would

Re: [R] about libsvm

2010-10-22 Thread Steve Lianoglou
Hi, On Fri, Oct 22, 2010 at 9:30 AM, Neeti wrote: > > hii all!!! > > could anyone tell me how to use libsvm in R.. i am not able to find good way > to use it Use the `svm` function from the e1071 package: R> install.packages('e1071') R> library(e1071) R> ?svm -steve -- Steve Lianoglou Gr

Re: [R] Random Forest AUC

2010-10-22 Thread Max Kuhn
Ravishankar, > I used Random Forest with a couple of data sets I had to predict for binary > response. In all the cases, the AUC of the training set is coming to be 1. > Is this always the case with random forests? Can someone please clarify > this? This is pretty typical for this model. > I hav

Re: [R] previous business day

2010-10-22 Thread Li, Jing Yi
yes. do you know the name of related functions in the timeDate package? Thanks! -Original Message- From: David Reiner [mailto:david.rei...@xrtrading.com] Sent: Friday, October 22, 2010 10:10 AM To: Li, Jing Yi; David Winsemius Cc: r-help@r-project.org Subject: RE: [R] previous business d

Re: [R] how fit linear model with fixed slope?

2010-10-22 Thread Douglas Bates
On Fri, Oct 22, 2010 at 9:13 AM, Czerminski, Ryszard wrote: > I want to fit a linear model with fixed slope e.g. y = x + b > (instead of general: y = a*x + b) > Is it possible to do with lm()? Yes. The simplest way is to fit lm(y - a*x ~ 1) which will give you the estimate of b, its standard

Re: [R] how fit linear model with fixed slope?

2010-10-22 Thread Dimitris Rizopoulos
yes, you can use an offset, e.g., x <- runif(100, -3, 3) y <- 2 + x + rnorm(100) lm(y ~ x) lm(y ~ offset(x)) I hope it helps. Best, Dimitris On 10/22/2010 4:13 PM, Czerminski, Ryszard wrote: I want to fit a linear model with fixed slope e.g. y = x + b (instead of general: y = a*x + b) Is

[R] how fit linear model with fixed slope?

2010-10-22 Thread Czerminski, Ryszard
I want to fit a linear model with fixed slope e.g. y = x + b (instead of general: y = a*x + b) Is it possible to do with lm()? Regards, Ryszard -- Confidentiality Notice: This message is private and may ...{{dropped:11}} _

Re: [R] R 2.12.0 does not open in Tinn-R 2.3.5.2

2010-10-22 Thread ellen pape
Found the problem. Have to change the path in Tinn-R On 22 October 2010 13:53, ellen pape wrote: > Dear R users, > > I tried opening the R console in Tinn-R, but this is not possible. I get > the following message: > > > C:\Program Files\R\R 2.12.0\bin\R-gui.exe > > The file above is not exe

Re: [R] previous business day

2010-10-22 Thread David Reiner
you may be thinking of the timeDate package, which has some holiday calendars. HTH, David L. Reiner, PhD Head Quant XR Trading LLC -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Li, Jing Yi Sent: Thursday, October 21, 2010 3:51 PM

Re: [R] maxitems in cluster validity

2010-10-22 Thread Christian Hennig
You'd need to show us the code you attempted to use in order to make it possible to help you. A good idea may also be to contact the package maintainer directly. Best regards, Christian On Fri, 22 Oct 2010, Penny Adversario wrote: I did cluster validity using internal and stability measures

Re: [R] how do I make a correlation matrix positive definite?

2010-10-22 Thread Ravi Varadhan
Nick Higham (2002) discusses algorithms for this. One of the algorithms discussed in the paper is implemented in the "Matrix" package as `nearPD' function. library(Matrix) ?nearPD Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf

Re: [R] superscript characters in title with '+'

2010-10-22 Thread DrCJones
"Er, I don't see any italics in the output or implied by the expression. " Freudian slip... ...font superscripting is what I meant All is perfectly clear now. Thanks again! -- View this message in context: http://r.789695.n4.nabble.com/superscript-characters-in-title-with-tp300

Re: [R] (no subject)

2010-10-22 Thread Tal Galili
Hi Penny, Could you provide the code you are using? (also, using a subject to the e-mail, would have been nice :) ) Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) |

Re: [R] Confusing error statement

2010-10-22 Thread David Winsemius
On Oct 22, 2010, at 9:22 AM, kurt_h...@nps.gov wrote: Greetings Using the following command I've been trying to subset a dataframe of counts of an organism to compute the sizes of groups for use as a predictor: Hs.patches <- as.data.frame(with(Hs.long, table(Cave,Year,Month,Region,

Re: [R] superscript characters in title with '+'

2010-10-22 Thread Claudia Beleites
On 10/22/2010 03:15 PM, DrCJones wrote: Hi, Thanks for all of your replies! David, a slightly modified version of what you gave did the trick: hist(X,main = expression("["*Ca**""^paste(2,"+")*"]i"~'onsets')) here you put the 2+ into the superscript of a superscript. compare these four: hist(

Re: [R] Interpolate irregular time series

2010-10-22 Thread Gabor Grothendieck
On Fri, Oct 22, 2010 at 9:20 AM, Alexander Salim wrote: > Hi all, > > > > Issue: > > I have two datasets, one is a regular time series (rain gauge) with > resolution of 10 minutes. The other one is an irregular time series (link). > Now I want to analyze the correlation between these two datasets

Re: [R] superscript characters in title with '+'

2010-10-22 Thread David Winsemius
On Oct 22, 2010, at 9:15 AM, DrCJones wrote: Hi, Thanks for all of your replies! David, a slightly modified version of what you gave did the trick: hist(X,main = expression("["*Ca**""^paste(2,"+")*"]i"~'onsets')) But I prefer the way '2+' is italicized in the solution Dennis gave: I agree

Re: [R] Confusing error statement

2010-10-22 Thread Ben Bolker
nps.gov> writes: > > Greetings > Using the following command I've been trying to subset a dataframe of > counts of an organism to compute the sizes of groups for use as a > predictor: > > Hs.patches <- as.data.frame(with(Hs.long, > table(Cave,Year,Month,Region,Plot,))) > > I am get

[R] about libsvm

2010-10-22 Thread Neeti
hii all!!! could anyone tell me how to use libsvm in R.. i am not able to find good way to use it -- View this message in context: http://r.789695.n4.nabble.com/about-libsvm-tp3007214p3007214.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] importing csv gets me all 16,000 columns with "NA"

2010-10-22 Thread Gabor Grothendieck
On Thu, Oct 21, 2010 at 7:23 PM, mkinseth wrote: > > I'm new to R. I have a mac (OS10.6). I have converted an Excel file to a csv > to import into R. I have used many methods to import the file, most do not > work, the best so far is: > > filename <- read.csv(/Users/Desktop/csvfile.csv", header=T,

Re: [R] lm looking for weights outside of the user-defined function

2010-10-22 Thread Dimitri Liakhovitski
As you suggested, David, the code below works. Now I it can find the weights - because they are in the data frame x. But how can I be sure now that it actually grabs the data from the data frame "variables" and not the data frame x? x<-data.frame(y=rnorm(100,0,1),a=rnorm(100,1,1),b=rnorm(100,2,1),

  1   2   >