[R] Importing large data set from teradata

2010-04-08 Thread sumit gupta
Hi, I want to import data from teradata.Data set is very large in size , it has around 1 million rows and 40 columns. Could anyone tell me an efficient and fast way to import data sets with this size. Thanks. Sumit [[alternative HTML version deleted]]

[R] mixed effects ordinal logistic regression models

2010-04-08 Thread Demirtas, Hakan
Hi, How do I fit a mixed-effects regression model for ordinal data in R? More specifically, I have two crossed random effects and I would like to use proportional odds assumption with a complementary log-log link. Regards, Hakan Demirtas __

Re: [R] It This data viz possible in R?

2010-04-08 Thread baptiste auguie
An improved version below (now the connections are drawn in the correct order), library(grid) arcTextGrob - function(x=unit(0.5, npc), y=unit(0.5, npc), labels=library()$results[,1], links=sample(seq_along(labels), 20, rep=T),

Re: [R] Copulas

2010-04-08 Thread Jim Silverton
I want to fit a bivariate copula to bivariate data. Then I want to draw a straight line on the copula. Then I want to retrieve those origianl pairs (X.Y) which were above the line. Any ideas how to do this? Thanks, Jim [[alternative HTML version deleted]]

[R] Meaning of lag 0.2, 0.4,... ?

2010-04-08 Thread Bogaso
Please see that correlogram for a arbitrary time series : acf(zooreg(rnorm(39), start=as.yearmon(2008-01-01), frequency=12)) What is the meaning of lag 0.2, 0.4, in the plot? Those should not be integers? Or I am missing something? Thanks -- View this message in context:

Re: [R] Using read.table to read file created with read.table and qmethod = escape

2010-04-08 Thread Peter Ehlers
This worked for me in R 2.11.0 alpha: df - data.frame(a = a\b, v = 4, z = this is Z) write.csv(df, test.csv, row.names = FALSE, quote = FALSE) read.csv(test.csv, quote = ) -Peter Ehlers On 2010-04-07 19:09, Hadley Wickham wrote: df- data.frame(a = a\b) write.table(df, test.csv, sep = ,, row

Re: [R] Meaning of lag 0.2, 0.4,... ?

2010-04-08 Thread Steve Chen
Hi Bogaso, You could try this to get integer x-axis values: library(zoo) z = zooreg(rnorm(39), start=as.yearmon(2008-01-01), frequency=12) acf(ts(z,freq=1)) Steve Chen On 2010/4/8 下午 03:32, Bogaso wrote: Please see that correlogram for a arbitrary time series : acf(zooreg(rnorm(39),

Re: [R] Meaning of lag 0.2, 0.4,... ?

2010-04-08 Thread Prof Brian Ripley
On Wed, 7 Apr 2010, Bogaso wrote: Please see that correlogram for a arbitrary time series : library(zoo) ## you example does not work without it! acf(zooreg(rnorm(39), start=as.yearmon(2008-01-01), frequency=12)) What is the meaning of lag 0.2, 0.4, in the plot? Those should not

Re: [R] mixed effects ordinal logistic regression models

2010-04-08 Thread Dieter Menne
HAKAN DEMIRTAS wrote: How do I fit a mixed-effects regression model for ordinal data in R? More specifically, I have two crossed random effects and I would like to use proportional odds assumption with a complementary log-log link. Not out of the box, as far I know. Try

Re: [R] match function or ==

2010-04-08 Thread Matthew Dowle
Please install v1.3 from R-forge : install.packages(data.table,repos=http://R-Forge.R-project.org;) It will be ready for CRAN soon. Please follow up on datatable-h...@lists.r-forge.r-project.org Matthew bo bozha...@hotmail.com wrote in message news:1270689586866-1755876.p...@n4.nabble.com...

Re: [R] Code is too slow: mean-centering variables in a dataframebysubgroup

2010-04-08 Thread Matthew Dowle
Hi Dimitri, A start has been made at explaining .SD in FAQ 2.1. This was previously on a webpage, but its just been moved to a vignette : https://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/*checkout*/branch2/inst/doc/faq.pdf?rev=68root=datatable Please note: that vignette is part of a

Re: [R] It This data viz possible in R?

2010-04-08 Thread Jim Lemon
On 04/08/2010 12:44 AM, Gabor Grothendieck wrote: There is draw.arc in the plotrix package. Well, draw.arc is specified by center, radius and start/finish angles, so it would be a lot of calculation to get these from the two points that must be joined on the circumference. I would probably

[R] Question about simple.median.test

2010-04-08 Thread Uwe Dippel
I am studying Using R for Introductory Statistics and find it in general very useful. At present, I am stumbling over the function simple.median.test. x [1] 12.8 3.5 2.9 9.4 8.7 0.7 0.2 2.8 1.9 2.8 3.1 15.8 simple.median.test (x,median=5) [1] 0.3876953 simple.median.test

Re: [R] kriging problem - very urgent

2010-04-08 Thread Roger Bivand
Please consider using the R-sig-geo list for kriging questions. In fact, using str() would show that your z is badly impacted by your misuse of the c() function - this was almost certainly not what you wanted to do. Constructing your coordinates by using seq() is always a bad idea, as you need

Re: [R] Palette color order in bwplot (lattice violin plot) vs. boxplot

2010-04-08 Thread Luigi Ponti
On 08/04/2010 02:11, Felix Andrews wrote: On 8 April 2010 03:34, Luigi Ponti lpo...@inbox.com wrote: Thanks for the hint, Felix: the following code makes it but (don't know why) the median dots disappear. bwplot(count ~ spray, data = InsectSprays, groups = spray, panel =

[R] subsetting a matrix with specified no of columns

2010-04-08 Thread Lee William
Hello! All, I am working on 1x1000 matrix say 'mat' and i want to subset this matrix in a fashion that in new matrix i get columns 2,3,9,10,16,17,23,24...so on. That is pair of columns after every interval of 7. I tried following but i got an error which is obvious. dim(mat) [1] 1

[R] XML-2.8 not writing indented XML anymore

2010-04-08 Thread Steffen Neumann
Hi, just wanted to note this (mild) regression. I tried saveXML(traml) with different compression= and indent= settings, but the output remained in a single line for XML-2.8-1 Without writing to a file the string representation after saveXML() looks quite similar, with the exception of a \n

Re: [R] subsetting a matrix with specified no of columns

2010-04-08 Thread David Winsemius
On Apr 8, 2010, at 7:39 AM, Lee William wrote: Hello! All, I am working on 1x1000 matrix say 'mat' and i want to subset this matrix in a fashion that in new matrix i get columns 2,3,9,10,16,17,23,24...so on. That is pair of columns after every interval of 7. I tried following

Re: [R] help in attach function

2010-04-08 Thread Duncan Murdoch
On 07/04/2010 4:24 PM, Changbin Du wrote: Hi, r-community, This morning, I MET the following problem several times when I try to attach the data set. When I closed the current console and reopen the R console, the problem disappear. BUt with the time passed on, the problem occurs again. Can

Re: [R] square root of inverse

2010-04-08 Thread David Winsemius
On Apr 8, 2010, at 1:45 AM, arindam fadikar wrote: Dear users, How to get a symmetric square root of a positive definite matrix? I have tried using spectral decomposition, but some eigen values come out to be complex. Is there any function in R that can give the symmetric square root

Re: [R] recoding variables-recode not working

2010-04-08 Thread Vlatka Matkovic Puljic
Dear, my variable is numerical indicating how many times smb done test summary(Q12) Min. 1st Qu. MedianMean 3rd Qu.Max.NA's 0. 0. 0. 0.7989 1. 30. 66. I want to change this to categories-- 0=none testing; 1:30=done testing (NA excluded) John,

Re: [R] recoding variables-recode not working

2010-04-08 Thread David Winsemius
On Apr 8, 2010, at 8:13 AM, Vlatka Matkovic Puljic wrote: Dear, my variable is numerical indicating how many times smb done test summary(Q12) Min. 1st Qu. MedianMean 3rd Qu.Max.NA's 0. 0. 0. 0.7989 1. 30. 66. I want to change this to categories--

[R] Intra-Class correlation psych package missing data

2010-04-08 Thread RCulloch
Hello R users, and perhaps William Revelle in particular, I'm curious as to how ICC deals with missing data, so for example you are sampling individuals over set periods in time and one individual is missing or was not recaptured at that given time point - leading to NA in the dataset. My

Re: [R] recoding variables-recode not working

2010-04-08 Thread Vlatka Matkovic Puljic
Now I have :) Thanx a lot! 2010/4/8 David Winsemius dwinsem...@comcast.net On Apr 8, 2010, at 8:13 AM, Vlatka Matkovic Puljic wrote: Dear, my variable is numerical indicating how many times smb done test summary(Q12) Min. 1st Qu. MedianMean 3rd Qu.Max.NA's 0. 0.

Re: [R] Caret package and lasso

2010-04-08 Thread Alex Roy
Dear Max, Thanks for the reply. I will wait for your further comment on this. Regards Linda Garcia On Wed, Apr 7, 2010 at 8:03 PM, Max Kuhn mxk...@gmail.com wrote: Linda, Thanks for the example. I did this to make it more reproducible: set.seed(1)

Re: [R] Question about simple.median.test

2010-04-08 Thread Peter Ehlers
On 2010-04-08 4:52, Uwe Dippel wrote: I am studying Using R for Introductory Statistics and find it in general very useful. At present, I am stumbling over the function simple.median.test. x [1] 12.8 3.5 2.9 9.4 8.7 0.7 0.2 2.8 1.9 2.8 3.1 15.8 simple.median.test (x,median=5) [1] 0.3876953

[R] Interest in R Users Group in Dallas, TX?

2010-04-08 Thread Larry D'Agostino
I would like to know if there is anyone like me interested in an R User Group in Dallas, TX. David Smith at REvolutions was kind enough to help getting it started. My first thought would to have some informal meet ups at some local Dallas locations to discuss overall goals, ideas, wishes of the

Re: [R] Using read.table to read file created with read.table and qmethod = escape

2010-04-08 Thread Hadley Wickham
df - data.frame(a = a\b, v = 4, z = this is Z) write.csv(df, test.csv, row.names = FALSE, quote = FALSE) read.csv(test.csv, quote = ) Unfortunately my real example is more like: df - data.frame(a = a\b, v = 4, z = this is: A, B, C) so quote = F won't work. Can write.table and read.table

Re: [R] as.ffdf.data.frame now breaks if using pattern

2010-04-08 Thread Ramon Diaz-Uriarte
Ah, I see. Thanks. It works for me too. Best, R. 2010/4/7 Jens Oehlschlägel jens.oehlschlae...@truecluster.com: Ramon, for me this works setwd(d:/tmp) ffd - as.ffdf(d, col_args=list(pattern = paste(getwd(), /fftmp, sep = ))) filename(ffd) $x [1] d:/tmp/fftmp35c34861.ff $y [1]

Re: [R] Using read.table to read file created with read.table and qmethod = escape

2010-04-08 Thread jim holtman
You were using read.csv and not read.table. The following seems to work with using a separator that will probably not appear in the text: df - data.frame(a = a\b, v = 4, z = this is: A, B, C) write.table(df, test.csv, row.names = FALSE, quote = FALSE, sep='\x01') read.table(test.csv, quote =

Re: [R] Using read.table to read file created with read.table and qmethod = escape

2010-04-08 Thread David Winsemius
On Apr 8, 2010, at 9:07 AM, Hadley Wickham wrote: df - data.frame(a = a\b, v = 4, z = this is Z) write.csv(df, test.csv, row.names = FALSE, quote = FALSE) read.csv(test.csv, quote = ) Unfortunately my real example is more like: df - data.frame(a = a\b, v = 4, z = this is: A, B, C) so quote

Re: [R] Struggeling with svydesign()

2010-04-08 Thread ONKELINX, Thierry
Dear Thomas, Thank you for your informative answer. We used epi.stratasize() to estimate the required sample size per stratum. Notice in the example below that it can select a sample size smaller than 2 in the very small strata. Would you recommend to sample at least two items per stratum or

Re: [R] How to locate the difference from two data frames

2010-04-08 Thread Jun Shen
Dear David, Erik and Charles, Thank you for your input. Both mapply() and which() can do the job. Just one exception. If there is a missing value as NA in the data frame a and a data point (either numerical or character) in the corresponding position of b, then mapply() only returns NA for that

Re: [R] 3-D response surface using wireframe()

2010-04-08 Thread Waichler, Scott R
Regarding the screen argument in wireframe(), here is what I understand about how it works after much trial-and-error: After each rotation, new axes are in effect defined for the next rotation as at the start: x is to the right of the 2D view, y is towards the top, and z is positive out of

Re: [R] Using read.table to read file created with read.table and qmethod = escape

2010-04-08 Thread David Winsemius
On Apr 8, 2010, at 9:20 AM, jim holtman wrote: You were using read.csv and not read.table. The following seems to work with using a separator that will probably not appear in the text: Modified Jim's version: df - data.frame(a = a\b, v = 4, z = this is: A, B, C,

[R] Time Series question

2010-04-08 Thread Cho, Moon - BLS
Hello, I am wondering whether 'R' has a command to produce coefficient estimates for AR/MA model when variance-covariance matrix is given as an input. Thank you very much for your help, MoonJung * Moon Jung Cho Office of Survey Methods Research U.S. Bureau of Labor

[R] khat and included polygons

2010-04-08 Thread Sven Schmiedel
Dear list, I have a question regarding the included polygon in the khat function of the splancs library defining the area where points appear. I have not only one simple polygon included, my map includes several islands. I read my map which was a shape file by readShapeSpatial of the maptools

[R] Halting execution in Rcmdr

2010-04-08 Thread ManInMoon
Hi, Does anyone know how to halt Rcmdr? If I make an error and execution is taking a very long time. Is there a way to halt it WITHOUT killing Rcmdr or Rconsole? -- View this message in context: http://n4.nabble.com/Halting-execution-in-Rcmdr-tp1773753p1773753.html Sent from the R help

Re: [R] bootstrap confidence intervals, non iid

2010-04-08 Thread GlenB
It's possible I have failed to understand your situation (it's not clearly described). If your model captures the dependence structure (e.g. that induced by a common-but-unknown block effect), then in many cases it could be set up to work. If the dependence is of some form not captured in the

[R] Blotter: addTxn() method

2010-04-08 Thread kafkaz
I was testing some strategy and got very bizarre results (too good). I quickly found, that the problem is in addTxn() method and it is related to the commission parameter. In the description of the method, you can find that the fees will be subtracted. TxnFees: fees associated with the

Re: [R] Using read.table to read file created with read.table and qmethod = escape

2010-04-08 Thread Hadley Wickham
Can write.table and read.table really be so asymmetric? write() is a wrapper for cat() and read() is a wrapper for scan() so the question should really be can cat() and scan() be so asymmetric. Looking at their help pages, I would say that at least some degree of asymmetry is plausible.

Re: [R] Using read.table to read file created with read.table and qmethod = escape

2010-04-08 Thread Hadley Wickham
On Thu, Apr 8, 2010 at 8:20 AM, jim holtman jholt...@gmail.com wrote: You were using read.csv and not read.table.  The following seems to work with using a separator that will probably not appear in the text: df - data.frame(a = a\b, v = 4, z = this is: A, B, C) write.table(df, test.csv,

Re: [R] How to locate the difference from two data frames

2010-04-08 Thread David Winsemius
On Apr 8, 2010, at 9:47 AM, Jun Shen wrote: Dear David, Erik and Charles, Thank you for your input. Both mapply() and which() can do the job. Just one exception. If there is a missing value as NA in the data frame a and a data point (either numerical or character) in the corresponding

[R] use read.table for a partial reading

2010-04-08 Thread Covelli Paolo
Hi everyone, I've got a matrix data with 20 variables (V1, V2, V3, ...) and 215 rows (observations). I'm interested to read only the first and second variables using read.table function. How can I do? Thanks in advance. Paolo. __

[R] Odp: use read.table for a partial reading

2010-04-08 Thread Petr PIKAL
Hi what about some.data - read.table()[ ,1:2] Regards Petr r-help-boun...@r-project.org napsal dne 08.04.2010 16:05:39: Hi everyone, I've got a matrix data with 20 variables (V1, V2, V3, ...) and 215 rows (observations). I'm interested to read only the first and second variables

[R] Problem using elements in a vector

2010-04-08 Thread Redhwan
Hi So my particular problem is this: I have a row vector of length 5200 elements - specifically created by x-rbinom(5200,1,0.5) y-matrix(x,nrow=1,ncol=5200) y now, each element is either a 0 or a 1 - e.g. it could be (0,1,1,1,1,0,0,0,1,1,1) e.t.c. when the element is a 1, i need to multiply

[R] Question on using elements of a vector

2010-04-08 Thread redhwan zaman
Hi So my particular problem is this: I have a row vector of length 5200 elements - specifically created by x-rbinom(5200,1,0.5) y-matrix(x,nrow=1,ncol=5200) y now, each element is either a 0 or a 1 - e.g. it could be (0,1,1,1,1,0,0,0,1,1,1) e.t.c. when the element is a 1, i need to

[R] Accessing elements of plm outputs

2010-04-08 Thread ECAMF
Dear all, I've just migrated from STATA to R for runing panel regressions and I was very happy to discover the plm package. However, I have a problem when trying to access the Total Sum of Squares and Residual Sum of Squares on this output: summary(output) Oneway (individual) effect Within

Re: [R] Problem using elements in a vector

2010-04-08 Thread jim holtman
just convert your vector from 0,1 to .995,1.005 and use cumprod On Thu, Apr 8, 2010 at 10:22 AM, Redhwan redhwanza...@hotmail.com wrote: Hi So my particular problem is this: I have a row vector of length 5200 elements - specifically created by x-rbinom(5200,1,0.5)

Re: [R] Strange csv parsing problem

2010-04-08 Thread Peter Ehlers
Hadley, The cause of the count.fields result is the comma in 'nftc,%20' at about column 300 (for me). Since commas between quotes should normally not matter, this must be due to the comma appearing inside escaped quotes, i.e. we have: abc\def,ghi\jkl. Remove the comma and count.fields gives 11

[R] Exchanging zoo object dates

2010-04-08 Thread Research
Hi, I have two zoo objects (time series of same frequency) say A and B. I need to exchange A's dates for B's. Is there and easy way? I managed to do it by converting A to a vector and pasting it on a zoo vector (all ones) with B's dates but I wonder if there is an easier way by some zoo

[R] Odp: Question on using elements of a vector

2010-04-08 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 08.04.2010 16:23:53: Hi So my particular problem is this: I have a row vector of length 5200 elements - specifically created by x-rbinom(5200,1,0.5) y-matrix(x,nrow=1,ncol=5200) y now, each element is either a 0 or a 1 - e.g. it

[R] C-index and Cox model

2010-04-08 Thread Bessy
Dear all R users, I am building a Cox PH model on a small dataset. I am wondering how to measure the predictive power of my cox model? Normally the ROC curve or Gini value are used in logistic regression model. Is there any similar measurement suitable for Cox model? Also if I use C-index

Re: [R] RWeka - Error when attempting to summary() model

2010-04-08 Thread D. Dashcle
Whew, figured it out through trial and error. In case anyone else runs into this problem, the issue ended up being with the data in one of the columns. I knew I didn't have any actual missing values, but one of the columns is a text field which can have the literal value of NA. I guess R was

Re: [R] Exchanging zoo object dates

2010-04-08 Thread Gabor Grothendieck
Assuming they are of the same length try this: library(zoo) # test data A - zoo(1:3, Sys.Date() + 1:3) B - zoo(4:6, Sys.Date() + 14:16) time(A) - time(B) A 2010-04-22 2010-04-23 2010-04-24 1 2 3 Next time please provide test data with your post. On Thu, Apr 8,

Re: [R] Using read.table to read file created with read.table and qmethod = escape

2010-04-08 Thread David Winsemius
On Apr 8, 2010, at 10:01 AM, Hadley Wickham wrote: Can write.table and read.table really be so asymmetric? write() is a wrapper for cat() and read() is a wrapper for scan() so the question should really be can cat() and scan() be so asymmetric. Looking at their help pages, I would say

[R] xts off by one confusion or error

2010-04-08 Thread Tim Coote
Hullo I may have missed something blindingly obvious here. I'm using xts to handle some timeseries data. I've got daily measurements for 100 years. If I try to reduce the error rate by taking means of each month, I'm getting what at first sight appears to be conflicting information.

Re: [R] Strange csv parsing problem

2010-04-08 Thread Hadley Wickham
Remove the comma and count.fields gives 11 for all rows. From your other post(s) on escaped quotes, I assume that this won't solve your problem with the existing files. (: Right - but assuming I'm not crazy, that should cause an error in read.csv, right? It shouldn't just parse the file

[R] Reading dates in R using SQL and otherwise (and some interesting behavior by the data editor)

2010-04-08 Thread Paul Miller
Hello Everyone,   I am a newbie with about a month's worth of experience using R. I've just spent a little time learning how to work with date values. Mostly, this has involved converting text values into dates.   So far, I've managed to figure out how to do this in R proper using as.Date.

[R] Extracting specific rows from irregular zoo object and merging with a regular zoo object

2010-04-08 Thread Sergey Goriatchev
Hello, everyone I have the following problem: Say I have an irregular zoo timeseries like this: a - zoo(rep(1:9), as.Date(c(2009-03-20, 2009-03-27, 2009-04-24, 2009-04-25, 2009-04-30, 2009-05-15, 2009-05-22, 2009-05-29, 2009-06-26))) and I have regular zoo timeseries like this: b -

Re: [R] square root of inverse

2010-04-08 Thread arindam fadikar
On Thu, Apr 8, 2010 at 5:38 PM, David Winsemius dwinsem...@comcast.netwrote: On Apr 8, 2010, at 1:45 AM, arindam fadikar wrote: Dear users, How to get a symmetric square root of a positive definite matrix? I have tried using spectral decomposition, but some eigen values come out to be

[R] plm package twoways effect problem

2010-04-08 Thread seral
Hello everyone, I have a peoblem to create the twoways effect in the plm package. when i try to create the following dsn1-plm(lnQ~lnC+lnL+lnM+lnE+eco+RD,data=newdata,effect=twoways,model=within) i have this error: Error in rep.int(c(1, numeric(n)), n - 1L) : negative length vectors are not

Re: [R] Extracting specific rows from irregular zoo object and merging with a regular zoo object

2010-04-08 Thread Gabor Grothendieck
Omit rep. You just want a - zoo(1:9, ...). To get the last day of the month you don`t need b since as.Date.yearmon will give it with the argument frac = 1: aggregate(a, as.Date(as.yearmon(time(a)), frac = 1), tail, 1) 2009-03-31 2009-04-30 2009-05-31 2009-06-30 2 5 8

Re: [R] square root of inverse

2010-04-08 Thread baptiste auguie
try this, install.packages(expm, repos=http://R-Forge.R-project.org;) On 8 April 2010 17:28, arindam fadikar arindam.fadi...@gmail.com wrote: On Thu, Apr 8, 2010 at 5:38 PM, David Winsemius dwinsem...@comcast.netwrote: On Apr 8, 2010, at 1:45 AM, arindam fadikar wrote:  Dear users, How

Re: [R] Extracting specific rows from irregular zoo object and merging with a regular zoo object

2010-04-08 Thread Sergey Goriatchev
Thank you, Gabor! This is a very elegant solution. But instead of general last day of month in the index, how can I have last day of each month as they are presented in a, for example, not March 31, but March 27? Regards, Sergey On Thu, Apr 8, 2010 at 17:27, Gabor Grothendieck

Re: [R] square root of inverse

2010-04-08 Thread Charles C. Berry
On Thu, 8 Apr 2010, arindam fadikar wrote: On Thu, Apr 8, 2010 at 5:38 PM, David Winsemius dwinsem...@comcast.netwrote: On Apr 8, 2010, at 1:45 AM, arindam fadikar wrote: Dear users, How to get a symmetric square root of a positive definite matrix? I have tried using spectral

Re: [R] square root of inverse

2010-04-08 Thread David Winsemius
On Apr 8, 2010, at 11:28 AM, arindam fadikar wrote: On Thu, Apr 8, 2010 at 5:38 PM, David Winsemius dwinsem...@comcast.net wrote: On Apr 8, 2010, at 1:45 AM, arindam fadikar wrote: Dear users, How to get a symmetric square root of a positive definite matrix? I have tried using

Re: [R] Strange csv parsing problem

2010-04-08 Thread Peter Ehlers
On 2010-04-08 9:10, Hadley Wickham wrote: Remove the comma and count.fields gives 11 for all rows. From your other post(s) on escaped quotes, I assume that this won't solve your problem with the existing files. (: Right - but assuming I'm not crazy, that should cause an error in read.csv,

Re: [R] 3-D response surface using wireframe()

2010-04-08 Thread array chip
Scott, This is a good explanation and a good practice. Thank you, John --- On Thu, 4/8/10, Waichler, Scott R scott.waich...@pnl.gov wrote: From: Waichler, Scott R scott.waich...@pnl.gov Subject: Re: 3-D response surface using wireframe() To: arrayprof...@yahoo.com arrayprof...@yahoo.com

[R] general linear hypothesis testing for manova model

2010-04-08 Thread Philippe Hupé
Hello, I have a MANOVA model and I want to test the following hypothesis: LBM = 0 where B is the parameter estimates. Is there any function to do this in R? Cheers, Philippe -- Philippe Hupé Institut Curie, CNRS UMR 144, INSERM U900 26 rue d'Ulm 75005 Paris - France Email :

Re: [R] Extracting specific rows from irregular zoo object and merging with a regular zoo object

2010-04-08 Thread Gabor Grothendieck
On Thu, Apr 8, 2010 at 11:42 AM, Sergey Goriatchev serg...@gmail.com wrote: Thank you, Gabor! This is a very elegant solution. But instead of general last day of month in the index, how can I have last day of each month as they are presented in a, for example, not March 31, but March 27? Try

Re: [R] Problem using elements in a vector

2010-04-08 Thread Daniel Malter
This reads like homework. You should show some evidence where you are stuck or pick up an R book/manual/introduction after which you should be able to do this yourself quite easily. Daniel - cuncta stricte discussurus - -

Re: [R] Struggeling with svydesign()

2010-04-08 Thread Thomas Lumley
On Thu, 8 Apr 2010, ONKELINX, Thierry wrote: Dear Thomas, Thank you for your informative answer. We used epi.stratasize() to estimate the required sample size per stratum. Notice in the example below that it can select a sample size smaller than 2 in the very small strata. Would you recommend

Re: [R] Error in leaps.setup

2010-04-08 Thread Thomas Lumley
On Wed, 7 Apr 2010, thedoctor81877 wrote: Hullo, I am trying to use the leaps package, keep getting the following error: Error in leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = NCOL(x) + int, : y and x different lengths x might be a data frame rather than a matrix. In any case,

Re: [R] subsetting a matrix with specified no of columns

2010-04-08 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Lee William Sent: Thursday, April 08, 2010 4:40 AM To: r-help@r-project.org Subject: [R] subsetting a matrix with specified no of columns Hello! All, I am working on

Re: [R] help in attach function

2010-04-08 Thread Changbin Du
Thanks so much! Duncan, I appreciated! On Thu, Apr 8, 2010 at 5:03 AM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 07/04/2010 4:24 PM, Changbin Du wrote: Hi, r-community, This morning, I MET the following problem several times when I try to attach the data set. When I closed the

[R] reshape panel data

2010-04-08 Thread Richard Saba
I have a data set with observations on 549 cities spanning an 18 year period. However, some of cities did not report in one or more of the 18 years. I would like to implement the procedure suggested by Wooldridge section 17.1.3 in his Econometric analysis of cross section and panel data to

[R] texi2dvi runs but produces no output

2010-04-08 Thread David Hewitt
I am working on a Windows XP machine with R 2.10.1 and a recent installation of MiKTeX 2.8. I use LyX (www.lyx.org) to write documents and have it set up to run Sweave, Stangle, and make the PDF through R using a batch script and a MakeSweave.R file. This system worked just fine until I ran some

Re: [R] general linear hypothesis testing for manova model

2010-04-08 Thread John Fox
Dear Philippe, The linear.hypothesis() function in the car package should do what you want. I hope this helps, John John Fox Senator William McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada web:

[R] LondonR meeting 4th May

2010-04-08 Thread Sarah Lewis
Good afternoon everyone, I am pleased to confirm the details of the next LondonR meeting: Date:Wednesday 4th May Time:6pm - 9pm Venue: The Shooting Star 125- 129 Middlesex Street E1 7JF (Nearest Tubes- Liverpool Street, Moorgate or Bank) I will

[R] Problem with mtext

2010-04-08 Thread Sebastian Leuzinger
Dear list I am experiencing a very annoying problem with mtext, although I have been using this command for many years. The following code prints test twice in the outer margin, once at .7 where it should be, and once at the bottom somewhere. I also notice that the command takes longer

[R] I can´t run the example shown in the inline pa ckage

2010-04-08 Thread satu
I want to run some R script using the inline package (which allows to create and run inline C++ code in my humble understanding). So, after loading the required packages and copy and paste the example that runs C code (in the Reference Manual as a PDF), I have a compilation error. Any body has

Re: [R] reshape panel data

2010-04-08 Thread Gabor Grothendieck
See: http://n4.nabble.com/panel-data-td1749549.html On Thu, Apr 8, 2010 at 12:55 PM, Richard Saba saba...@auburn.edu wrote: I have a data set with observations on 549 cities spanning  an 18 year period. However, some of cities did not report in one or more of the 18 years. I would like to

[R] RandomForest how to identify two classes when only one is present

2010-04-08 Thread JMark
I'm trying to do: randomForest(f, data = moths.train) But I get this error: Error in randomForest.default(m, y, ...) : Need at least two classes to do classification. When I look at the data for this, I realize there are no positive cases of this item: [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Re: [R] How to locate the difference from two data frames

2010-04-08 Thread Jun Shen
David, Thanks for the suggestion. Now I have worked out a general solution. Assume a and b are two data frames with same dimensions 1. Call identical(a,b) to get an overall assessment. If you get a FALSE 2. Call which(mapply(identical,unlist(a),unlist(b))==FALSE), you will get a result like

Re: [R] I can´t run the example shown in the inline package

2010-04-08 Thread Douglas Bates
On Thu, Apr 8, 2010 at 11:32 AM, satu satu2...@live.com.ar wrote: I want to run some R script using the inline package (which allows to create and run inline C++ code in my humble understanding). So, after loading the required packages and copy and paste the example that runs C code (in the

[R] incomplete final line found by readTableHeader

2010-04-08 Thread Leonardo K. Shikida
Hi I am trying this x - read.table(/home/kenji/1245/GDS1_2grps_.cls, header = F, skip = 2) x - read.table(/home/kenji/1246/MYCset.cls, header = F, skip = 2) Warning message: In read.table(/home/kenji/1246/MYCset.cls, header = F, skip = 2) : incomplete final line found by readTableHeader on

Re: [R] incomplete final line found by readTableHeader

2010-04-08 Thread David Winsemius
On Apr 8, 2010, at 2:14 PM, Leonardo K. Shikida wrote: Hi I am trying this x - read.table(/home/kenji/1245/GDS1_2grps_.cls, header = F, skip = 2) x - read.table(/home/kenji/1246/MYCset.cls, header = F, skip = 2) Warning message: In read.table(/home/kenji/1246/MYCset.cls, header = F, skip

Re: [R] incomplete final line found by readTableHeader

2010-04-08 Thread Leonardo K. Shikida
sorry, it was read, indeed. TIA Leonardo K. Shikida Vetta Labs +55(31)2551-6936 ext 203 http://www.vettalabs.com On Thu, Apr 8, 2010 at 3:43 PM, David Winsemius dwinsem...@comcast.net wrote: On Apr 8, 2010, at 2:14 PM, Leonardo K. Shikida wrote: Hi I am trying this x -

[R] erasing an area of a graph

2010-04-08 Thread Terry Therneau
I have a case where the easiest way to draw a particular symbol would be to draw something a little bigger, and then use polygon(... , col=0) to erase the extra stuff. Just how to do this best when par('bg') = 'transparent' is, however, eluding me. I've looked through the archives and the book R

Re: [R] How to locate the difference from two data frames

2010-04-08 Thread David Winsemius
On Apr 8, 2010, at 1:34 PM, Jun Shen wrote: David, Thanks for the suggestion. Now I have worked out a general solution. Assume a and b are two data frames with same dimensions 1. Call identical(a,b) to get an overall assessment. If you get a FALSE 2. Call

Re: [R] 3-D response surface using wireframe()

2010-04-08 Thread array chip
David, That does the job! Thanks a lot. Now I am very very close to what I want. Still have a couple of small adjustments to make. 1. I use drape=TRUE to draw grid and color on the surface, is there a parameter to adjust the density of the grid? 2. Is there a way that I can add grid to the

Re: [R] plm package twoways effect problem

2010-04-08 Thread Achim Zeileis
On Thu, 8 Apr 2010, seral wrote: Hello everyone, I have a peoblem to create the twoways effect in the plm package. when i try to create the following dsn1-plm(lnQ~lnC+lnL+lnM+lnE+eco+RD,data=newdata,effect=twoways,model=within) i have this error: Error in rep.int(c(1, numeric(n)), n -

Re: [R] Accessing elements of plm outputs

2010-04-08 Thread Achim Zeileis
On Thu, 8 Apr 2010, ECAMF wrote: Dear all, I've just migrated from STATA to R for runing panel regressions and I was very happy to discover the plm package. However, I have a problem when trying to access the Total Sum of Squares and Residual Sum of Squares on this output: summary(output)

Re: [R] Reading dates in R using SQL and otherwise (and some interesting behavior by the data editor)

2010-04-08 Thread jim holtman
If you want to look at the dataframe, then consider using View. On Thu, Apr 8, 2010 at 11:14 AM, Paul Miller pjmiller...@yahoo.com wrote: Hello Everyone, I am a newbie with about a month's worth of experience using R. I've just spent a little time learning how to work with date values.

Re: [R] 3-D response surface using wireframe()

2010-04-08 Thread David Winsemius
On Apr 8, 2010, at 3:13 PM, array chip wrote: David, That does the job! Thanks a lot. Now I am very very close to what I want. Still have a couple of small adjustments to make. 1. I use drape=TRUE to draw grid and color on the surface, is there a parameter to adjust the density of the

[R] how to manipulate object in specific environment?

2010-04-08 Thread Tengfei Yin
Hi I want to simplify my problem into a prototype, how to write a function to get all the object in your current environment, e.g. .GlobalEnv, and print their mode? For example, if I have object a,b,c... in my environment, a=1;b='test';c=matrix(0,3,3). I want to write a function myfun(),

Re: [R] How to locate the difference from two data frames

2010-04-08 Thread Jun Shen
David, all.equal() only tells how many mismatches there are including missing values but it doesn't tell me the location of each mismatch. For example, if I have one NA mismatch and three numerical mismatches, all.equal(a,b) gives [1] Component 2: 'is.NA' value mismatch: 1 in current 0 in

Re: [R] estimating the starting value within a ODE using nls and lsoda

2010-04-08 Thread Thomas Petzoldt
Hi Dave, first of all, fitting starting values of a dynamic model the same way like its parameters is indeed the usual method. In that case parameters *and* some or all initial value(s) of the dynamic model are both in fact 'parameters' for the statistical model fitting problem. Fitting a

Re: [R] How to locate the difference from two data frames

2010-04-08 Thread David Winsemius
On Apr 8, 2010, at 4:03 PM, Jun Shen wrote: David, all.equal() only tells how many mismatches there are including missing values but it doesn't tell me the location of each mismatch. Yes, I noticed that after further testing. I agree Charles' solution is more informative and I wonder if

  1   2   >