Re: [R] Test of Parallel Regression Assumption in R

2013-03-11 Thread Rune Haubo
Dear Heather, You can make this test using the ordinal package. Here the function clm fits cumulative link models where the ordinal logistic regression model is a special case (using the logit link). Let me illustrate how to test the parallel regression assumption for a particular variable using

Re: [R] Optimization in R similar to MS Excel Solver

2013-03-11 Thread Berend Hasselman
On 11-03-2013, at 23:31, Pavel_K wrote: > Dear all, > I am trying to find the solution for the optimization problem focused on the > finding minimum cost. > I used the solution proposed by excel solver, but there is a restriction in > the number of variables. > > My data consists of 300 rows re

Re: [R] Specifying point symbol fill colour in lattice xyplot keys

2013-03-11 Thread Duncan Mackay
Hi Wayne Try this library(lattice) xyplot(1:10 ~ 1:10, par.settings = list(plot.symbol = list(col = "blue", fill = "red", cex = 1, pch = 21)), type

[R] Specifying point symbol fill colour in lattice xyplot keys

2013-03-11 Thread Wayne Rochester
Dear all, When defining explicit keys with xyplot, I have previously used the fill parameter to set the background colour of point symbols. That's no longer working for me, and I am wondering whether it's a bug or whether I've misinterpreted the documentation and have been relying on a feature

[R] some questions about ARIMA and FARIMA

2013-03-11 Thread cyl123
Hi, I have some quesions about about ARIMA and FARIMA: 1) Is there a funtion in a third party package to fit ARIMA model? 2)While using fracdiff function to fit FARIMA model, can I use AIC, BIC rule to select the best fit model. For example, to select the best model between nar=0 and nar=1

Re: [R] cumulative sum by group and under some criteria

2013-03-11 Thread arun
HI, maxN<-10 c11<-0.07 c12<-0.07 c1<-0.15 c2<-0.20 p0L<-0.05 p0H<-0.05 p1L<-0.25 p1H<-0.25 alpha<-0.6 beta<-0.6 bay<-function (c11,c12,c1,c2){ d<-do.call(rbind,lapply(2:(maxN-6),function(m1) do.call(rbind,lapply(2:(maxN-m1-4),function(n1) do.call(rbind,lapply(0:m1,function(x1) do.call(rbind,l

[R] Optimization in R similar to MS Excel Solver

2013-03-11 Thread Pavel_K
Dear all, I am trying to find the solution for the optimization problem focused on the finding minimum cost. I used the solution proposed by excel solver, but there is a restriction in the number of variables. My data consists of 300 rows represent cities and 6 columns represent the centres. It co

[R] Add a regular plot to the x,y grid on a wireframe plot

2013-03-11 Thread jbfarrell
Hello, I would like to add the points from a regular plot() to the x and y axis of a wireframe() plot, similar to the illustration below. Any ideas how to do this? Thank you, Jon F. -- View this message in context: ht

Re: [R] aggregate(), tapply(): Why is the order of the grouping variables not kept?

2013-03-11 Thread Peter Ehlers
On 2013-03-11 13:52, Marius Hofert wrote: Dear expeRts, The question is rather simple: Why does aggregate (or similarly tapply()) not keep the order of the grouping variable(s)? Here is an example: x <- data.frame(group = rep(LETTERS[1:2], each=10), year = rep(rep(2001:2005,

Re: [R] plot pch

2013-03-11 Thread Peter Ehlers
On 2013-03-11 14:59, eliza botto wrote: Thankyou very much rui.i was trying the following command but i was unsuccessful in implementing the secondary axis. library(lattice)> df <- data.frame(x = x, y = y, z= z)> > xyplot(x~y,data=df,groups=z,+par.settings=list(superpose.symbol=list(p

Re: [R] plot pch

2013-03-11 Thread eliza botto
Thankyou very much rui.i was trying the following command but i was unsuccessful in implementing the secondary axis. > library(lattice)> df <- data.frame(x = x, y = y, z= z)> > > xyplot(x~y,data=df,groups=z,+ > par.settings=list(superpose.symbol=list(pch=1:4,+

Re: [R] Test of Parallel Regression Assumption in R

2013-03-11 Thread Nicole Ford
here's some code as an example hope it helps! mod<-polr(vote~age+demsat+eusup+lrself+male+retnat+union+urban, data=dat) summary(mod) mod<-polr(vote~age+demsat+eusup+lrself+male+retnat+union+urban, data=dat) levs<-levels(dat$vote) tmpdat<-list() for(i in 1:(nlevels(dat$vote)-1)){ tmpdat[[i]

Re: [R] Test of Parallel Regression Assumption in R

2013-03-11 Thread Jeff Newmiller
Perhaps you should be asking whether such an algorithm exists, regardless of whether it is already implemented in R. However, this is the wrong place to ask such theory questions... your local statistics expert might know, or you could ask on a statistics theory forum such as stats.stackexchange

Re: [R] Test of Parallel Regression Assumption in R

2013-03-11 Thread Bert Gunter
Heather: You are at Vanderbilt, whose statistics department under Frank Harrell is a veritable bastion of R and statistical wisdom. I strongly recommend that you take a stroll over there in the lovely spring weather and seek their help. I can't imagine how you could do better than that! Cheers, B

Re: [R] how to convert a data.frame to tree structure object such as dendrogram

2013-03-11 Thread Not To Miss
Thanks. That's just an simple example - what if there are more columns and more rows? Is there any easy way to create nested list? Best, Zech On Mon, Mar 11, 2013 at 2:12 PM, MacQueen, Don wrote: > You will have to decide what R data structure is a "tree structure". But > maybe this will get y

Re: [R] RODBC Installation fails

2013-03-11 Thread Marc Schwartz
On Mar 11, 2013, at 1:12 PM, jefe goode wrote: > The RODBC installation failed, with the following message ( 2 missing c > header files ): > > checking for sqlext.h... no > configure: error: "ODBC headers sql.h and sqlext.h not found" > ERROR: configuration failed for package ‘RODBC’ > * remov

Re: [R] plot pch

2013-03-11 Thread Rui Barradas
Hello, Try the following. dat <- structure(list(x = c(52.5211966906669, 49.8818953734405, 45.176643179385, 52.2988909042952, 46.1007828702965, 53.4910266471472, 49.013651970548, 55.1218462810432, 56.922347550005, 50.7531277271902), y = c(23.953008533893, 45.1590889001506, 62.5358474328017, 39.

Re: [R] merge function while obviating duplicate columns XXXX

2013-03-11 Thread William Dunlap
You can use the set-oriented functions setdiff(), union(), and intersect(). E.g., setdiff(colnames(data2), colnames(data1)) gives the names of columns of data2 that are not names of columns of data1. The following might be what you want merge(data1, data2[, c("id", setdiff(colnames(data2),col

Re: [R] merge function while obviating duplicate columns XXXX

2013-03-11 Thread Jeff Newmiller
intersect(names(data1),names(data2)) --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO

[R] Test of Parallel Regression Assumption in R

2013-03-11 Thread Heather Kettrey
Hi, I am running an analysis with an ordinal outcome and I need to run a test of the parallel regression assumption to determine if ordinal logistic regression is appropriate. I cannot find a function to conduct such a test. >From searching various message boards I have seen a few useRs ask this s

Re: [R] Allocate virtual memory on hard drive

2013-03-11 Thread Carolina Bello
Hi you can use memory.limit(size = 10) to allocated aprox 100 gigas of your HDD as ram, it´s depends that you have that capacity available in your pc, as Prof Ripley said it makes your pc really slow. gc() is a garabge collector so it just delete what is hidden in memory look CB 2013/3/11

[R] RODBC Installation fails

2013-03-11 Thread jefe goode
The RODBC installation failed, with the following message ( 2 missing c header files ): checking for sqlext.h... no configure: error: "ODBC headers sql.h and sqlext.h not found" ERROR: configuration failed for package ‘RODBC’ * removing ‘/home/hadoop/R/i686-pc-linux-gnu-library/2.15/RODBCâ€

Re: [R] Re move row.names column in dataframe

2013-03-11 Thread jeharmse
> 1.If your data frame is numeric, change it to matrix. It isn't necessarily numeric. > 2.Or make your own function I think that's the solution, but the function has to handle both NA and non-numeric. equal.NA <- function(x,y) all(is.na(x)==is.na(y)) && all(is.na(x) | x=

Re: [R] vertical lines in R plot

2013-03-11 Thread Naser Jamil
Thank you guys. It was really worthy! On 11 March 2013 16:10, William Dunlap wrote: > Also, type="h", in plot(), points(), or lines() draws vertical line > segments between (x,y) > and (x,0). E.g., > points(x=c(5.0,5.5,6), y=c(0.12,0.60,0.20), type="h") > does the same as >segments(x0=

Re: [R] merge function while obviating duplicate columns XXXX

2013-03-11 Thread Dan Abner
Ok, let's say I only want the common columns from data1. Is there a succinct way of doing this for potentially hundreds of "in common" columns? On Mon, Mar 11, 2013 at 3:25 PM, Ista Zahn wrote: > On Mon, Mar 11, 2013 at 3:17 PM, Dan Abner wrote: >> Hi everyone, >> >> I have the following call

[R] aggregate(), tapply(): Why is the order of the grouping variables not kept?

2013-03-11 Thread Marius Hofert
Dear expeRts, The question is rather simple: Why does aggregate (or similarly tapply()) not keep the order of the grouping variable(s)? Here is an example: x <- data.frame(group = rep(LETTERS[1:2], each=10), year = rep(rep(2001:2005, each=2), 2), value = rep(1:1

Re: [R] how to convert a data.frame to tree structure object such as dendrogram

2013-03-11 Thread Bert Gunter
Of course, R's recursive lists **are** trees. (Some expert may rap my knuckles here, but ... close enough?) -- Bert On Mon, Mar 11, 2013 at 1:12 PM, MacQueen, Don wrote: > You will have to decide what R data structure is a "tree structure". But > maybe this will get you started: > >> foo <- dat

Re: [R] glm and lm can't find weights

2013-03-11 Thread Marc Schwartz
On Mar 11, 2013, at 1:46 PM, Dimitri Liakhovitski wrote: > Hello, and apologies for not providing an example. However, my question is > more general. > > I have a lengthy function. This function is using another internal function > that modifies the data frame I am reading in. This internal fu

Re: [R] how to convert a data.frame to tree structure object such as dendrogram

2013-03-11 Thread MacQueen, Don
You will have to decide what R data structure is a "tree structure". But maybe this will get you started: > foo <- data.frame(x=c('A','A','B','B'), y=c('Ab','Ac','Ba','Bd')) > split(foo$y, foo$x) $A [1] "Ab" "Ac" $B [1] "Ba" "Bd" I suppose it is at least a little bit tree-like. -- Don MacQuee

[R] Hands-on Webinar Series (no charge) The Evolution of Regression from Classical Linear Regression to Modern Ensembles

2013-03-11 Thread Lisa Solomon
Maybe you missed Part 1 of "The Evolution of Regression Modeling from Classical Linear Regression to Modern Ensembles " webinar series, but you can still join for Parts 2, 3, & 4 Register Now for Parts 2, 3, 4: https://www1.gotomeeting.com/register/500959705 Download (optional) a free evaluation

Re: [R] merge function while obviating duplicate columns XXXX

2013-03-11 Thread Ista Zahn
On Mon, Mar 11, 2013 at 3:17 PM, Dan Abner wrote: > Hi everyone, > > I have the following call to the merge() function. How does one > prevent duplicate columns in the resulting data frame that the 2 > parent data frames have in common but are not true key or "by" > variables? > > > data3<-merge(d

[R] merge function while obviating duplicate columns XXXX

2013-03-11 Thread Dan Abner
Hi everyone, I have the following call to the merge() function. How does one prevent duplicate columns in the resulting data frame that the 2 parent data frames have in common but are not true key or "by" variables? data3<-merge(data1,data2,by="id") data3 id total.x total.y balance 1 78 78 90

[R] glm and lm can't find weights

2013-03-11 Thread Dimitri Liakhovitski
Hello, and apologies for not providing an example. However, my question is more general. I have a lengthy function. This function is using another internal function that modifies the data frame I am reading in. This internal function is using the command model.frame (with data and weights inside)

[R] Instructor led Advanced R course in US

2013-03-11 Thread eugene dalt
Hey folks,   Where can I attend an instructor led advanced R course in US this spring?   Regards - Eugene   [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Allocate virtual memory on hard drive

2013-03-11 Thread Jie
Thank you for your advice. Yes, I was wrong about the size. It seems that gc() does not return the memory to the system, so my R process looks like taking more space than yours. R 3.0.0 solves the issue. Thanks. Best wishes, Jie On Mon, Mar 11, 2013 at 1:05 PM, Prof Brian Ripley wrote: > On 11/0

[R] Use pcls in "mgcv" package to achieve constrained cubic spline

2013-03-11 Thread Victor hyk
Hello everyone, Dr. wood told me that I can adapting his example to force cubic spline to pass through certain point. I still have no idea how to achieve this. Suppose we want to force the cubic spline to pass (1,1), how can I achieve this by adapting the following code? # Pen

[R] plot pch

2013-03-11 Thread eliza botto
Dear xpeRts, I would like to ask a question about plotting in R. I have four columns in which first column contains x-coordinate and second column contains y-coordinate of certain points, whereas the third column "z" contains classification number of those points from 1 to 4, it should be note

Re: [R] Allocate virtual memory on hard drive

2013-03-11 Thread Prof Brian Ripley
On 11/03/2013 16:45, Jie wrote: The vector contains 1.5*10^8 numeric elements. It takes about 3~4 GB in memory. And I would like to find percentiles: 0%, 0.5%, 1%, ... 100% I use 64 bit R and windows 7 with 24GB Ram. So: 1) Try R 3.0.0 alpha. Many operations on large vectors are more efficie

Re: [R] Re move row.names column in dataframe

2013-03-11 Thread Peter Ehlers
On 2013-03-11 06:07, Jorgen Harmse wrote: identical(df[1,],df[2,]) is FALSE because of the row names. all( == ) is just a work-around that I attempted. Jorgen. I would just wrap the elements in c(): identical( c(df[1,]), c(df[2,]) ) Peter Ehlers On Mar 11, 2013, at 02:53 , PIKAL Petr w

Re: [R] Allocate virtual memory on hard drive

2013-03-11 Thread Prof Brian Ripley
On 11/03/2013 16:40, jim holtman wrote: R runs with data in memory. What type of system are you running on (32 or A common misconception. R uses *virtual* memory for its data: the OS decides where to allocate that (RAM, disc, both). R has no 'memory limit': see ?'Memory-limits' (including

Re: [R] Allocate virtual memory on hard drive

2013-03-11 Thread Jie
The vector contains 1.5*10^8 numeric elements. It takes about 3~4 GB in memory. And I would like to find percentiles: 0%, 0.5%, 1%, ... 100% I use 64 bit R and windows 7 with 24GB Ram. Thank you. Best, On Mon, Mar 11, 2013 at 12:40 PM, jim holtman wrote: > R runs with data in memory. What type

Re: [R] Allocate virtual memory on hard drive

2013-03-11 Thread jim holtman
R runs with data in memory. What type of system are you running on (32 or 64 bit)? How big is your data; you did not provide much information about your problem. Depending on what you what to 'sort', there might be other ways of doing it. This gets back to my tag line: "Tell me what you want to

[R] Calculation with date

2013-03-11 Thread Dan Murphy
The lubridate and seq solutions work because they rely on your specification that the returned date be the first day of the desired subsequent months. Without that requirement they would not always work. For example, if you wanted to add Vec months to the last day of March rather than the first day

Re: [R] vertical lines in R plot

2013-03-11 Thread William Dunlap
Also, type="h", in plot(), points(), or lines() draws vertical line segments between (x,y) and (x,0). E.g., points(x=c(5.0,5.5,6), y=c(0.12,0.60,0.20), type="h") does the same as segments(x0=c(5.0,5.5,6), y0=c(0,0,0), x1=c(5.0,5.5,6), y1=c(0.12,0.60,0.20)) Bill Dunlap Spotfire, TIBCO Sof

Re: [R] Distribution plus background fitting

2013-03-11 Thread David Winsemius
On Mar 11, 2013, at 3:40 AM, Richard Longland wrote: > Hi All, > > I apologise if this question has been answered before, but my background is > a little different from most people using R, and the language we use seems > to be different! I am trying to analyse some nuclear physics data, which >

Re: [R] vertical lines in R plot

2013-03-11 Thread Sarah Goslee
Like this: segments(x0=c(5.0,5.5,6), y0=c(0,0,0), x1=c(5.0,5.5,6), y1=c(0.12,0.60,0.20)) If you wanted them to extend the entire height of the plot, abline(v=c(5.0,5.5,6)) is simpler. Thanks for the reproducible example, Sarah On Mon, Mar 11, 2013 at 10:10 AM, Naser Jamil wrote: > Dear All, >

Re: [R] vertical lines in R plot

2013-03-11 Thread PIKAL Petr
Hi ?segments segments(x0=c(5.0,5.5,6), y0=c(0,0,0), y1=c(0.12,0.60,0.20)) Regards Petr > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Naser Jamil > Sent: Monday, March 11, 2013 3:10 PM > To: R help > Subject: [R] vertical

Re: [R] Re move row.names column in dataframe

2013-03-11 Thread PIKAL Petr
Hi OK, I now got the point. You have several options 1.If your data frame is numeric, change it to matrix. m<-as.matrix(df) m x y [1,] 1 2 [2,] 1 2 [3,] NA 7 [4,] NA 7 identical(m[1,],m[2,]) [1] TRUE 2.Or make your own function nidentical<- function(x,y) { xn<-as.

Re: [R] New Stack

2013-03-11 Thread Jeff Newmiller
Don't. This is a classic mistake by newcomers to R that leads to abysmal performance. The best alternative is to compute one column at a time, so your data frame should be initialized with the inputs to your calculations, and you compute output columns as vector expressions of the inputs withou

Re: [R] Re move row.names column in dataframe

2013-03-11 Thread Jorgen Harmse
identical(df[1,],df[2,]) is FALSE because of the row names. all( == ) is just a work-around that I attempted. Jorgen. On Mar 11, 2013, at 02:53 , PIKAL Petr wrote: >> >>> df <- data.frame(x=c(1,1,NA,NA), y=c(2,2,7,7)) >>> identical(df[1,],df[2,]) >> [1] FALSE >>> all(df[1,]==df[2,]) >> [1] TRU

[R] vertical lines in R plot

2013-03-11 Thread Naser Jamil
Dear All, May I seek your suggestion on a simple issue. I want to draw vertical lines at some positions in the following R plot. To be more specific, I wish to draw vertical lines at d=c(5.0,5.5,6) and they should go till p=c(0.12,0.60,0.20) . I haven't found any way out, though made several atte

[R] Distribution plus background fitting

2013-03-11 Thread Richard Longland
Hi All, I apologise if this question has been answered before, but my background is a little different from most people using R, and the language we use seems to be different! I am trying to analyse some nuclear physics data, which consists of an ensemble of "energy" readings in a detector that, w

[R] problem with "gl1ce" function from "lasso2" package

2013-03-11 Thread Liviu Theodor Ene
Hello, I encounter a problem when using the "gl1ce" function from "lasso2" package. First, I tried something like: etastart <- log(mean(y)) fit.gl1ce.log <- gl1ce(y~., data = xy, family = gaussian(log)) and nearly all the coefficients in "fit.gl1ce.log" were zero (except the intercep

[R] Allocate virtual memory on hard drive

2013-03-11 Thread Jie
Dear All, I have a long sequence and want to find the quantile, or sort it first. It seems sort() or quantile() reaches the memory limit. Is there a way to allocate more memoy on SSD for R when startup, so that R can use both RAM and hard drive space? Thank you. Best wishes, Jie

Re: [R] New Stack

2013-03-11 Thread PIKAL Petr
Hi > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Anup khanal > Sent: Monday, March 11, 2013 2:13 PM > To: r-help@r-project.org > Subject: [R] New Stack > > > Hi Experts, I am newbie in R. Could you please share your idea t

Re: [R] New Stack

2013-03-11 Thread Anthony Damico
you can create an empty data frame with yourdata <- data.frame() and then add new records to it with another data table called `newdata` like this.. yourdata <- rbind( yourdata , newdata ) On Mon, Mar 11, 2013 at 9:13 AM, Anup khanal wrote: > > Hi Experts, I am newbie in R. Could you pleas

Re: [R] How to 'extend' a data.frame based on given variable combinations ?

2013-03-11 Thread arun
HI, Not sure whether it helps or not. You could use ?merge()  dat1<-as.data.frame(as.table(tapply(x$value, list(x$group, x$year), FUN=length)),stringsAsFactors=FALSE) dat2<-expand.grid(group=LETTERS[1:2],year=2001:2005) names(dat1)[1:2]<- names(dat2) res<-merge(dat1,dat2,by=c("group","year"),a

Re: [R] How to 'extend' a data.frame based on given variable combinations ?

2013-03-11 Thread Marius Hofert
... okay, I found a solution: set.seed(1) x <- data.frame(group = c(rep("A", 4), rep("B", 3)), year = c(2001, 2003, 2004, 2005, 2003, 2004, 2005), value = rexp(7)) tply <- as.data.frame(as.table(tapply(x$value, list(x$grou

[R] New Stack

2013-03-11 Thread Anup khanal
Hi Experts, I am newbie in R. Could you please share your idea to create a stack with no value or zero value? Nrow=1,Ncol=1, Ncell=1, I aim to work with looping, I want to make a first layer with zero values to add other layers further. Thanks. Best Regards, ..Anup KhanalNorwegi

[R] help.search not working - returns "readRDS(file) : unknown input format"

2013-03-11 Thread Gustaf Rydevik
Hi all, I'm using R 2.15.1 under RStudio on a WinXP computer. This morning as I started up RStudio, I noticed that there was something wrong with the help database. I entered and received the following: ??'xls' #Error in readRDS(file) : unknown input format writing help.search('xls') returned

[R] How to 'extend' a data.frame based on given variable combinations ?

2013-03-11 Thread Marius Hofert
Dear expeRts, I have a data.frame with certain covariate combinations ('group' and 'year') and corresponding values: set.seed(1) x <- data.frame(group = c(rep("A", 4), rep("B", 3)), year = c(2001, 2003, 2004, 2005, 2003, 2004, 2005),

Re: [R] take two columns from a set of lists

2013-03-11 Thread arun
You could also do: simplify2array(x.list)[2,] #[1] 0.1 3.0 A.K. - Original Message - From: Jorge I Velez To: ishi soichi Cc: r-help Sent: Monday, March 11, 2013 6:57 AM Subject: Re: [R] take two columns from a set of lists Is the following that you are looking for? unlist(lapply(x.l

Re: [R] read.table freezes the computer

2013-03-11 Thread S Ellison
> -Original Message- > I have a txt file to read into R. The size of it is about 500MB. > This txt file is produced by calling write.table(M, file = > "xxx.txt"), where M is a large matrix After running MM = > read.table("xxx.txt"), the R gui keeps a cpu core/thread > fully occupied

Re: [R] take two columns from a set of lists

2013-03-11 Thread ishi soichi
yes. thank you. ishida 2013/3/11 Jorge I Velez > Is the following that you are looking for? > > unlist(lapply(x.list, "[", 2)) > > HTH, > Jorge.- > > > On Mon, Mar 11, 2013 at 9:52 PM, ishi soichi <> wrote: > >> say I have a matrix and lists like >> >> x <- matrix(c(12.1, 3.44, 0.1, 3, 12, 33.

Re: [R] take two columns from a set of lists

2013-03-11 Thread Jorge I Velez
Is the following that you are looking for? unlist(lapply(x.list, "[", 2)) HTH, Jorge.- On Mon, Mar 11, 2013 at 9:52 PM, ishi soichi <> wrote: > say I have a matrix and lists like > > x <- matrix(c(12.1, 3.44, 0.1, 3, 12, 33.1, 1.1, 23), nrow=2) > > x.list <- lapply(seq_len(nrow(x)), function(i

[R] take two columns from a set of lists

2013-03-11 Thread ishi soichi
say I have a matrix and lists like x <- matrix(c(12.1, 3.44, 0.1, 3, 12, 33.1, 1.1, 23), nrow=2) x.list <- lapply(seq_len(nrow(x)), function(i) x[i,]) if I want a column of the matrix x, I write x[, 2] for example. But how can I do something similar for a set of lists, x.list, above? > x.lis

Re: [R] take two columns from a set of lists

2013-03-11 Thread ishi soichi
the title of this thread was wrong. it's misleading sorry. ishida 2013/3/11 ishi soichi > > say I have a matrix and lists like > > x <- matrix(c(12.1, 3.44, 0.1, 3, 12, 33.1, 1.1, 23), nrow=2) > > x.list <- lapply(seq_len(nrow(x)), function(i) x[i,]) > > if I want a column of the matrix x, I w

Re: [R] Editing figure without re-running the plotting code?

2013-03-11 Thread Sherri Heck
Thanks to all for your input and thorough explanations. I will follow up on your suggestions and see where that takes me. Regards, Sherri On Mon, Mar 11, 2013 at 2:02 AM, Bert Gunter wrote: > Jim: > > Whoaaa... this is only true for base graphics! > > For grid graphics -- on which both latti

[R] R: Count function calls

2013-03-11 Thread Millo Giovanni
Dear Simon, unfortunately I only have a few minutes for quick answers now, while your interesting email requires some experimenting on my part I cannot do now, although I will try to as soon as I have some spare time. The much simpler (although asymptotically equivalent) pmg estimator is more

Re: [R] Writing to Spreadsheet issues

2013-03-11 Thread Jim Holtman
the error message means (most likely) that srOne[row, "timestamp"] has NA as a value. Put options(error = recover) in your script so that you get control at the point of the error and can then use 'browser' (?browser) to examine the values. It is a problem with your data and probably the resu

Re: [R] Writing to Spreadsheet issues

2013-03-11 Thread Berend Hasselman
On 10-03-2013, at 22:32, Louis wrote: > I am having trouble with this code: > > trOne <- read.csv("*.csv", header=TRUE) > srOne <- read.csv("*/SRdivision1.csv", header=TRUE) > row = 1 > > for (g in 1:162) { > e = trOne[g, "END_TIME"] > s = trOne[g, "START_TIME"] > q = trOne[g, "OCC_TIME"] > r

[R] question on package plm

2013-03-11 Thread Millo Giovanni
Hello. Sorry, as already explained on this list this isn't a problem with the software but with the data. Negative variance estimates may happen, most likely when the model is misspecified: see Wooldridge, "Econometric analysis of cross-section and panel data", p. 261. Hence, there is no real

Re: [R] quesion about lm function

2013-03-11 Thread meng
Many thanks. I understand from your reply. Thanks. At 2013-03-11 15:45:14,"PIKAL Petr" wrote: >Hi > >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- >> project.org] On Behalf Of meng >> Sent: Sunday, March 10, 2013 5:33 AM >> To: Greg Snow >

[R] Writing to Spreadsheet issues

2013-03-11 Thread Louis
I am having trouble with this code: trOne <- read.csv("*.csv", header=TRUE) srOne <- read.csv("*/SRdivision1.csv", header=TRUE) row = 1 for (g in 1:162) { e = trOne[g, "END_TIME"] s = trOne[g, "START_TIME"] q = trOne[g, "OCC_TIME"] r = trOne[g, "R_TIME"] gazeSum = 0 n = 0 print(g) while (s <= e)

[R] Function ar() in package stats: AIC procedure and time series length

2013-03-11 Thread Andreas Klein
Dear R users, I took a closer look to the AIC-procedure for determining the order m of an VAR(m) process of the function ar() in package stats. >From the original code (source: >http://cran.r-project.org/src/base/R-2/R-2.15.3.tar.gz -> >R-2.15.3\src\library\stats\R\ar.R -> lines 95 to 98) [..

Re: [R] Re move row.names column in dataframe

2013-03-11 Thread PIKAL Petr
Hi > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of jeharmse > Sent: Friday, March 08, 2013 7:41 PM > To: r-help@r-project.org > Subject: Re: [R] Re move row.names column in dataframe > > > ... the row.names will not interfer

Re: [R] quesion about lm function

2013-03-11 Thread PIKAL Petr
Hi > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of meng > Sent: Sunday, March 10, 2013 5:33 AM > To: Greg Snow > Cc: R help > Subject: Re: [R] quesion about lm function > > Thanks for your reply. > But the mean y of sex(f) an

Re: [R] How to obtain the original indices of elements after sorting

2013-03-11 Thread PIKAL Petr
Hi > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Jie > Sent: Monday, March 11, 2013 2:24 AM > To: r-help > Subject: [R] How to obtain the original indices of elements after > sorting > > Dear All, > > Suppose I have a vect