[R] Lattice levelplot- remove unused levels per panel

2013-01-20 Thread ronny
Hi, I am using levelplot, and would like remove from each panel (condition) its unused x levels. e.g. Remove from panel vs=1 the cyl level=8. data(mtcars) levelplot(mpg~factor(cyl)*factor(gear)|factor(vs)) Thanks for your help, Ronny -- View this message in context:

Re: [R] dummy encoding in metafor

2013-01-20 Thread Michael Dewey
At 17:14 19/01/2013, Alma Wilflinger wrote: Hi, I am quite new to R and in need of some advice. I am trying to conduct a meta regression over a some studies with about 7 mod variables which I have to dummy encode. Alma, although you can generate your own dummy variables by hand you do not

Re: [R] dummy encoding in metafor

2013-01-20 Thread Alma Wilflinger
Hi,  thank you very much for your kind answer. If you look a bit further down the manual page you will see ### using a model formula to specify the same model rma(yi, vi, mods=~factor(alloc)+year+ablat, data=dat, method=REML,  btt=c(2,3)) which is much easier. I have seen the possibility of

[R] standard errors of marginal effects in multinomial logit

2013-01-20 Thread Kremena Bachmann
Deat R users, I am looking for a way to get standard errors of marginal effects of multinomial logit model. So far I have estimated coeficients of multinomial logit and covariance matrix of coefficients. I also managed to obtain marginal effects. However, I can not find a way to find

Re: [R] Does psm::Surv handle interval2 data?

2013-01-20 Thread Frank Harrell
Chris, I've fixed Surv in rms. The fix will be in the next release. For now you can do source('http://biostat.mc.vanderbilt.edu/tmp/Surv.s') after issuing require(rms). Frank Frank Harrell wrote Chris, Thanks for sending the specifics. It appears that I've let Surv in rms fall behind

Re: [R] Lattice levelplot- remove unused levels per panel

2013-01-20 Thread ilai
On Sun, Jan 20, 2013 at 1:59 AM, ronny ronny.recht...@evogene.com wrote: Hi, I am using levelplot, and would like remove from each panel (condition) its unused x levels. Uneven scales on categorical axes lead to distortion and a miss representation (as in your example - the area for levels

Re: [R] select rows with identical columns from a data frame

2013-01-20 Thread Sam Steingold
* Bert Gunter thagre.ore...@trar.pbz [2013-01-19 22:26:46 -0800]: But David W. and Bill Dunlap gave you solutions that also work and are much faster, no?! Yes, indeed, and I am now using David's solution as it is fast (enough), simple and concise. Thanks a lot to David, Bill, Rui, and arun

Re: [R] select rows with identical columns from a data frame

2013-01-20 Thread David Winsemius
On Jan 20, 2013, at 8:26 AM, Sam Steingold wrote: * Bert Gunter thagre.ore...@trar.pbz [2013-01-19 22:26:46 -0800]: But David W. and Bill Dunlap gave you solutions that also work and are much faster, no?! Yes, indeed, and I am now using David's solution as it is fast (enough), simple and

Re: [R] select rows with identical columns from a data frame

2013-01-20 Thread David Winsemius
On Jan 20, 2013, at 9:27 AM, David Winsemius wrote: On Jan 20, 2013, at 8:26 AM, Sam Steingold wrote: * Bert Gunter thagre.ore...@trar.pbz [2013-01-19 22:26:46 -0800]: But David W. and Bill Dunlap gave you solutions that also work and are much faster, no?! Yes, indeed, and I am now

Re: [R] applying a formula from text

2013-01-20 Thread arun
Dear Ilya, Please check these links. http://stackoverflow.com/questions/4556524/whats-the-way-to-learn-r http://www.r-bloggers.com/learn-to-use-r-for-free-with-coursera/ http://stackoverflow.com/questions/192369/books-for-learning-the-r-language You may also benefit from  An introduction to

Re: [R] how to use ...

2013-01-20 Thread Steve Taylor
From: Duncan Murdoch Maybe we just need a manual on how to use the existing help system. But I suspect people who won't read the existing manuals won't read that one, either. Duncan, I assume you're being facetious. Every R user soon learns to use help() and help.search() or their

Re: [R] how to use ...

2013-01-20 Thread Duncan Murdoch
On 13-01-20 2:28 PM, Steve Taylor wrote: From: Duncan Murdoch Maybe we just need a manual on how to use the existing help system. But I suspect people who won't read the existing manuals won't read that one, either. Duncan, I assume you're being facetious. Every R user soon learns to use

Re: [R] how to use ...

2013-01-20 Thread Steve Taylor
On 13-01-20 2:28 PM, Steve Taylor wrote: From: Duncan Murdoch Maybe we just need a manual on how to use the existing help system. But I suspect people who won't read the existing manuals won't read that one, either. Duncan, I assume you're being facetious. Every R user soon learns

Re: [R] sem package, suppress warnings

2013-01-20 Thread Steve Taylor
Have you tried suppressWarnings(sem(mod, S = as.matrix(dataset), N = 1000, maxiter = 1, warn = FALSE)) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Dustin Fife Sent: Saturday, 19 January 2013 5:32a To: r-help

Re: [R] sem package, suppress warnings

2013-01-20 Thread John Fox
Dear Dustin and Steve, For some reason, I didn't see Dustin's original message. As documented in ?sem, the warn argument to sem() covers only warnings directly produced by the optimizer, warn: if TRUE, warnings produced by the optimization function will be printed. This should generally

[R] How to check if R.app is running?

2013-01-20 Thread Nick Matzke
Hi, here's an obscure question someone can hopefully help with. I have some R code that uses stuff from parallel (now a part of the R core in 2.15 I believe), especially clusterApply. However, this seems to cause problems in R.app, and I've seen advice to not use these multicore functions,

[R] user units in plotrix

2013-01-20 Thread Murat Tasan
hi all - i'm having some difficulty figuring out how to convert between user units (which i can't find a definition for in the plotrix package) and either (a) device units (e.g. inches with PDFs) or (b) user coordinates along any particular axis. as an example, suppose i set up a PDF device with

Re: [R] How to check if R.app is running?

2013-01-20 Thread Duncan Murdoch
On 13-01-20 4:51 PM, Nick Matzke wrote: Hi, here's an obscure question someone can hopefully help with. I have some R code that uses stuff from parallel (now a part of the R core in 2.15 I believe), especially clusterApply. However, this seems to cause problems in R.app, and I've seen advice to

Re: [R] how to use ...

2013-01-20 Thread Duncan Murdoch
On 13-01-20 2:56 PM, Steve Taylor wrote: On 13-01-20 2:28 PM, Steve Taylor wrote: From: Duncan Murdoch Maybe we just need a manual on how to use the existing help system. But I suspect people who won't read the existing manuals won't read that one, either. Duncan, I assume you're being

Re: [R] sem package, suppress warnings

2013-01-20 Thread Dustin Fife
Perfect! That did it, and I learned a new function :) On Sun, Jan 20, 2013 at 2:49 PM, John Fox j...@mcmaster.ca wrote: Dear Dustin and Steve, For some reason, I didn't see Dustin's original message. As documented in ?sem, the warn argument to sem() covers only warnings directly produced

[R] multinom and stargazer

2013-01-20 Thread jjgrover
I am trying to create a LaTex table based on a multinom (nnet) object using the stargazer command. I have created a small data frame to demonstration the problem: data - data.frame(age=1:21, hight=20:40, ed=c(1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3)) data$ed - as.factor(data$ed) I then make a

Re: [R] how to use ...

2013-01-20 Thread John Sorkin
Why are the help pages not right? The ... construct is a fundamental part of the language syntax. Information about this fundamental construct should be easily available! John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division

Re: [R] how to use ...

2013-01-20 Thread Duncan Murdoch
On 13-01-20 5:54 PM, John Sorkin wrote: Why are the help pages not right? The ... construct is a fundamental part of the language syntax. Information about this fundamental construct should be easily available! Yes, I agree it should be easily available. Why does that mean it has to be on

[R] strucchange breakpoints r-squared

2013-01-20 Thread Geoffrey Smith
Can anyone please tell me how to get the r-squared output from a piecewise (segmented) regression using the strucchange package? Here is the R code I have tried thus far. library(lmtest) library(strucchange) data - ts(c(rnorm(30), runif(30)), frequency = 12, start = c(2005, 01)) bpts -

Re: [R] how to use ...

2013-01-20 Thread Ista Zahn
On Sun, Jan 20, 2013 at 5:54 PM, John Sorkin jsor...@grecc.umaryland.edu wrote: Why are the help pages not right? The ... construct is a fundamental part of the language syntax. Information about this fundamental construct should be easily available! This strikes me as a bit harsh. The

Re: [R] how to use ...

2013-01-20 Thread David Winsemius
On Jan 20, 2013, at 11:46 AM, Duncan Murdoch wrote: On 13-01-20 2:28 PM, Steve Taylor wrote: From: Duncan Murdoch Maybe we just need a manual on how to use the existing help system. But I suspect people who won't read the existing manuals won't read that one, either. Duncan, I assume

Re: [R] strucchange breakpoints r-squared

2013-01-20 Thread Bert Gunter
You can't. You shouldn't. Segmented regression with unknown breakpoints in nonlinear regression, and R-squared doesn't make sense for nonlinear regression. See: https://stat.ethz.ch/pipermail/r-help/2002-July/023461.html -- Bert On Sun, Jan 20, 2013 at 3:05 PM, Geoffrey Smith g...@asu.edu

Re: [R] how to use ...

2013-01-20 Thread Duncan Murdoch
On 13-01-20 6:23 PM, David Winsemius wrote: On Jan 20, 2013, at 11:46 AM, Duncan Murdoch wrote: On 13-01-20 2:28 PM, Steve Taylor wrote: From: Duncan Murdoch Maybe we just need a manual on how to use the existing help system. But I suspect people who won't read the existing manuals won't

Re: [R] user units in plotrix

2013-01-20 Thread Jim Lemon
On 01/21/2013 08:59 AM, Murat Tasan wrote: hi all - i'm having some difficulty figuring out how to convert between user units (which i can't find a definition for in the plotrix package) and either (a) device units (e.g. inches with PDFs) or (b) user coordinates along any particular axis. as an

Re: [R] How to check if R.app is running?

2013-01-20 Thread Nick Matzke
Probably good enough, thanks! Nick On 1/20/13 2:03 PM, Duncan Murdoch wrote: On 13-01-20 4:51 PM, Nick Matzke wrote: Hi, here's an obscure question someone can hopefully help with. I have some R code that uses stuff from parallel (now a part of the R core in 2.15 I believe), especially

Re: [R] Lattice levelplot- remove unused levels per panel

2013-01-20 Thread Richard M. Heiberger
require(lattice) require(latticeExtra) data(mtcars) mt2 - mtcars mt2$vs - factor(mtcars$vs) mt2$cyl - factor(mtcars$cyl) mt2$gear - factor(mtcars$gear) lp2 - levelplot(mpg ~ cyl*gear | vs, data=mt2, strip=strip.custom(strip.names=c(TRUE,TRUE)),

Re: [R] how to use ...

2013-01-20 Thread David Winsemius
On Jan 20, 2013, at 3:52 PM, Duncan Murdoch wrote: On 13-01-20 6:23 PM, David Winsemius wrote: On Jan 20, 2013, at 11:46 AM, Duncan Murdoch wrote: On 13-01-20 2:28 PM, Steve Taylor wrote: From: Duncan Murdoch Maybe we just need a manual on how to use the existing help system. But I

Re: [R] strucchange breakpoints r-squared

2013-01-20 Thread David Winsemius
On Jan 20, 2013, at 3:05 PM, Geoffrey Smith wrote: Can anyone please tell me how to get the r-squared output from a piecewise (segmented) regression using the strucchange package? Here is the R code I have tried thus far. library(lmtest) library(strucchange) data - ts(c(rnorm(30),

[R] compare and count data

2013-01-20 Thread Roslina Zakaria
Dear r-users,   I have these data below:   I would like to compare each column with a certain value and count how many in each column less than that specified value.    odd column (1,3,5) will compare with 1.61 and even column (2,4,6) will compare with 75 and I would like to count how many for

Re: [R] read tab delimited file from a certain line

2013-01-20 Thread Christof Kluß
Hi Henrik, that's perfect, thanks! Greetings Christof Am 18-01-2013 19:26, schrieb Henrik Bengtsson: Christof, I've added support for this to the R.filesets package. In your case, then all you need to do is: library(R.filesets) dlf - readDataFrame(filename, skip=^year) No need to specify

Re: [R] compare and count data

2013-01-20 Thread Jim Lemon
On 01/21/2013 04:39 PM, Roslina Zakaria wrote: Dear r-users, I have these data below: I would like to compare each column with a certain value and count how many in each column less than that specified value. odd column (1,3,5) will compare with 1.61 and even column (2,4,6) will compare

[R] How to read a file with two data sets in text format

2013-01-20 Thread Jd Devkota
Hello All, I have a data file in a text format and there are two data sets. The data set are continuous. For each data set there is a header which has the number of data rows and the name of data series. For example first data set has 6240 Terry Cove-Model. Then the data for that series follows

Re: [R] compare and count data

2013-01-20 Thread arun
HI, Your example data had only 4 columns mydata-read.table(text=   3.014505 62.96425 3.014505 138.0673   2.817503 56.03400 2.817503 133.3411   2.976227 47.12192 2.976227 139.2438   2.825495 75.05284 2.825495 129.2959   2.793500 52.75190 2.793500 130.9874   3.006333 54.56210 3.006333 136.2982  

Re: [R] strucchange breakpoints r-squared

2013-01-20 Thread Achim Zeileis
On Sun, 20 Jan 2013, Geoffrey Smith wrote: Can anyone please tell me how to get the r-squared output from a piecewise (segmented) regression using the strucchange package? Here is the R code I have tried thus far. library(lmtest) library(strucchange) data - ts(c(rnorm(30), runif(30)),