[R] question

2012-07-21 Thread Mehrab Nodehi
hello can you explain to me about package shapes in R software? especially about order procGPA? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting gui

[R] question about heatmap.2, controlling the visual heights of two dendrograms

2012-07-21 Thread Lan Sky
Hi, I have a question for gplots function heatmap.2. In this function, is there any way to control/know the heights of two dendrograms, such as how many pixels or how many percentage of the whole image the dendrogram have? I need to know the coordinates of northwest corner of real heatmap in the

Re: [R] Control y axis

2012-07-21 Thread arun
Hi, The bracket after lty=1 should be replaced with comma (,).  x<-1:15  y<--8:6  plot(x, y, type ="o", xlab="Panelist", ylab="T value",lwd=1.5,lty=1,xlim=range(1:14),ylim=range(-8:8),las=1) A.K. - Original Message - From: stefaniewind To: r-help@r-project.org Cc: Sent: Friday, July

Re: [R] library XML in R version 2.15.1

2012-07-21 Thread arun
HI, I have XML library installed in R2.15 and is working fine.  I used it only a few times, it was working.  I am using Ubuntu 12.04. A.K. - Original Message - From: Santosh To: r-help Cc: Sent: Friday, July 20, 2012 11:03 PM Subject: [R] library XML in R version 2.15.1 Hello Rxpe

Re: [R] GOstats: get genes for corresponding enriched GO term

2012-07-21 Thread arun
Hello, I guess this should be posted in the bioconductor mailing list to get better response.  I never used Gostats before, but I think BINGO and DAVID are very good in giving these information. I would choose BINGO plugin in cytoscape installed.  But, you may have specific reasons to use Gosta

Re: [R] Control y axis

2012-07-21 Thread arun
Hi, You can try this:  x<-1:15  y<--8:6   plot(x, y, type ="o", xlab="Panelist", ylab="T value",lwd=1.5,axes=FALSE) axis(1,at=c(0,2,4,6,8,10,12,14,16)) axis(2,at=c(-8,-6,-4,-2,0,2,4,6,8)) A.K. From: Stefanie Wind To: arun Sent: Friday, July 20, 2012 11:42 PM

Re: [R] fitting Ornstein-Uhlenbeck process by MAXIMUM LIKELYHOOD

2012-07-21 Thread Rui Barradas
Hello, When computing Sxx, Syy and you are mistaking the square of the sum for the sum of squares. The same goes for the crossed term Sxy, it's the sum of the products, not the product of the sums Sx and Sy. Hope this helps, Rui Barradas Em 20-07-2012 23:04, cesare orsini escreveu: Dear fr

Re: [R] qplot/ggplot

2012-07-21 Thread arun
Hello, You can try either one of these methods:: #Simple line plot dat1<-read.table(text=" Gene1 10 14 12 23 11 11 33 1 Gene2 4 2 1 1 3 4 1 2 Gene3 2 5 7 5 6 89 7 3 Gene4 1 9 8 3 90 8 8 5 ",sep="",header=FALSE,stringsAsFactors=FALSE) dat2<-as.data.frame(t(dat1[,-1]))  colnames(dat2)<-paste("Gene",

Re: [R] library XML in R version 2.15.1

2012-07-21 Thread arun
Hi, So, you got the same error message for R 2.14.1 and R 2.15? Or is it only for R 2.15? It is always good to install the current version.  Try this: install.packages("XML",dependencies=TRUE) #Warning message suggests dependencies. A.K. - Original Message - From: Santosh To: R he

Re: [R] question

2012-07-21 Thread Sarah Goslee
On Saturday, July 21, 2012, Mehrab Nodehi wrote: > hello > can you explain to me about package shapes in R software? > especially about order procGPA? Not unless you read the posting guide and formulate a more specific question. Sarah -- Sarah Goslee http://www.stringpage.com http://www.sar

Re: [R] information

2012-07-21 Thread Jim Lemon
On 07/18/2012 09:11 PM, Karan Anand wrote: hi, i am new to using R, so if u can help me in merging my csv file having different sheets .if u can help me with the commands for it. Hi karan, I didn't see an answer for your question. If you are reading in several CSV files with the same num

[R] alternative to rbind for data.table

2012-07-21 Thread Christof Kluß
Hi I want to add a row to a "data.table" in each round of a for loop. "rbind" seems to be a inefficient way to implement this. How would you do this? The "slow" solution: library(data.table) Rprof("test.out") dt <- data.table() for (i in (1:1)) { # algorithm that generates a list with dif

Re: [R] 'symbols' not plotting correct circle radii

2012-07-21 Thread Jim Lemon
On 07/20/2012 12:33 AM, Stuart Leask wrote: You're right - easily tested by just re-sizing the graphics box - sort of counter-intuitive until I remember the clue is in the name - this generates a CIRCLE, come what may... Stuart From: Sarah Goslee [mailto:sarah.gos...@gmail.com] Sent: 19 July

Re: [R] Speeding up a loop

2012-07-21 Thread wwreith
next for loop question. I need a loop that removes a row from a matrix if it is worse in positions 1,2,3,4 than another row in the matrix. right now my matrix is 503028x26. Rule to define worse position1 is smaller, position2 is smaller, position3 is higher, and position4 is smaller Example: r

[R] EM for missing data

2012-07-21 Thread ya
Hi list, I am wondering if there is a way to use EM algorithm to handle missing data and get a completed data set in R? I usually do it in SPSS because EM in SPSS kind of "fill in" the estimated value for the missing data, and then the completed dataset can be saved and used for further analy

[R] combined EM dataset for missing data?

2012-07-21 Thread ya
Hi list, I am wondering if there is a way to use EM algorithm to handle missing data and get a completed data set in R? I usually do it in SPSS because EM in SPSS kind of "fill in" the estimated value for the missing data, and then the completed dataset can be saved and used for further ana

Re: [R] changing cex pointwise in lattice

2012-07-21 Thread Peter Ehlers
I'm sorry I misunderstood your original request. You're right, use subscripts for panel-specific argument values. Peter Ehlers On 2012-07-20 19:35, "José M. Blanco Moreno" wrote: Sorry about that, when I asked before I meant that I had tried your proposed syntax. That has a problem, and it is t

Re: [R] combined EM dataset for missing data?

2012-07-21 Thread Bert Gunter
Search yourself! 1. Google on "Impute missing data in R" 2. See the ?RSiteSearch function 3. Go to Rseek.org and enter in keywords. 4. Download and install the sos package and use its search functionality. R has multiple packages and functions with multiple approaches to missing data imputation.

[R] deactivate my account from your members

2012-07-21 Thread mehdi azizi
please don't send email to this email address: mehdi.p...@gmail.com lots of thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://w

Re: [R] Speeding up a loop

2012-07-21 Thread Rui Barradas
Hello, Maybe it would have been better to start a new thread, if the question is different. To show that it's a continuation, the subject line could be extended with "part 2" or something like that. This solution runs in 3.6 hours. to.keep <- function(x){ keep <- function(i, env){

Re: [R] overlay contourplot with labels over spplot with color regions?

2012-07-21 Thread Roger Bivand
Martin Ivanov abv.bg> writes: > > Dear R users, > > I have the following problem. I plot a SpatialPixelsDataFrame object with spplot and I need to add a contourplot > of another spatial variable. ... You may find that posting to R-sig-geo will help. It would also help to include a self-cont

Re: [R] alternative to rbind for data.table

2012-07-21 Thread R. Michael Weylandt
You need to preallocate. [See the R Inferno] n <- 1 dt <- as.data.table(matrix(0, nrow = n, ncol = 5)) for(i in seq_len(n)){ dt[i, ] <- ### Whatever } Note that this *might* be somewhat trickier with data.tables and their fancy indexing. It might be easier to simply assign into the matrix

Re: [R] EM for missing data

2012-07-21 Thread Tal Galili
Hello Ya. I am no expert, so I am eager to read suggestions from other people in the mailing list. But just a few pointers I am (somewhat) sure of - You can try using this package: http://cran.r-project.org/web/packages/imputation/imputation.pdf And use something like kNNImpute. KNN solving is

Re: [R] FIML using lavaan returns zeroes for coefficients

2012-07-21 Thread yrosseel
On 07/20/2012 10:35 PM, Andrew Miles wrote: Hello! I am trying to reproduce (for a publication) analyses that I ran several months ago using lavaan, I'm not sure which version, probably 0.4-12. A sample model is given below: pathmod='mh30days.log.w2 ~ mh30days.log + joingroup + leavegroup + alw

Re: [R] Speeding up a loop

2012-07-21 Thread wwreith
Any chance I could ask for an idiots guide for function to.keep(x). I understand how to use it but not what some of the lines are doing. Comments would be extremely helpful. -- View this message in context: http://r.789695.n4.nabble.com/Speeding-up-a-loop-tp4637201p4637316.html Sent from the R

Re: [R] Speeding up a loop

2012-07-21 Thread Rui Barradas
Ok, sorry, I should have included some comments. The function is divided in three parts, 1. intro, 2. decision, 3. keep rows. Part 3 is the function keep(), internal to to.keep(). Let's start with 1. 1. Setup some variables first. 1.a) The variables 'a'. If the input object 'x' is a matrix this

Re: [R] combined EM dataset for missing data?

2012-07-21 Thread David L Carlson
It is not clear what you actually want. Do you want to save imputed data sets for further analysis? That is pretty simple. What do you mean by combining the data sets? Are you confusing single imputation with multiple imputation? In addition to the packages you mentioned, there are many others. See

[R] contour line labels in trellis contourplot

2012-07-21 Thread Martin Ivanov
Hello, In the classical function "contour" labels are drawn so that each contour line is broken at the place of the label, so that the label does not overlap the line. In the trellis contoourplot the labels are placed beside or over the line, controlled by the label.style parameter, but I could

Re: [R] EM for missing data

2012-07-21 Thread Greg Snow
The EM algorithm does not impute missing data, rather it estimates parameters when you have missing data (those parameters can then be used to impute the missing values, but that is separate from the EM algorithm). If you create a dataset that has missing values imputed (a single time) and then an

[R] two questions re: the use of lattice

2012-07-21 Thread Ranjan Maitra
Dear friends, I have two questions regarding the use of lattice. First some code: ## begin code z <- cbind(rep(c("BIC", "ICL", "s_v", "Q_v", "sig-q", "s_lsk", "s_lML", "s_mlsk", "s_mlML", "s_la8", "s_haar"), each = 250), rep(c(5, 10, 20, 30, 50), each = 50)) z <- rbind(cbi

Re: [R] combined EM dataset for missing data?

2012-07-21 Thread ya
Thanks Bert. So far I have not found any way that output a single data set which combines all the imputed data sets (say, 50 imputed data sets). Probably I missed something, but could you share some information about it, maybe a link? Thank you very much for helping. ya From: Bert Gunter D

[R] car::Anova - Can it be used for ANCOVA with repeated-measures factors.

2012-07-21 Thread Henrik Singmann
Dear list, I would like to run an ANCOVA using car::Anova with repeated measures factors, but I can't figure out how to do it. My (between-subjects) covariate always interacts with my within-subject factors. As far as I understand ANCOVA, covariates usually do not interact with the effects of

Re: [R] Control y axis

2012-07-21 Thread arun
Hi, No problem. I was gettting -8 and 6 for the code I sent to you.  I am using R 2.15.  This code gets -8 and 8 for the y axis:  x<-1:17 > y<- -8:8 >   plot(x, y, type ="o", xlab="Panelist", ylab="T value",lwd=1.5,axes=FALSE) > axis(1,at=c(0,2,4,6,8,10,12,14,16,18)) > axis(2,at=c(-8,-6,-4,-2,0

Re: [R] deactivate my account from your members

2012-07-21 Thread arun
Hello, Probably, you didn't know about this option.  You could deactivate your membership from Rhelp by clicking on the link below i.e (https://stat.ethz.ch/mailman/listinfo/r-help). A.K. - Original Message - From: mehdi azizi To: R-help@r-project.org Cc: Sent: Saturday, July 21, 2

[R] Library control

2012-07-21 Thread darnold
All, 1. Is there a command that tells you what libraries are loaded? 2. How do you remove a library that has been loaded? 3. If you have loaded a library that masks previously loaded objects, how can you tell which object is being run? In Matlab, I would run "which f" to determine the location o

Re: [R] Library control

2012-07-21 Thread R. Michael Weylandt
They are called packages, not libraries. On Jul 21, 2012, at 5:19 PM, darnold wrote: > All, > > 1. Is there a command that tells you what libraries are loaded? Loaded is a fluid idea** in a namespace world, but search() will let you know what's on the search path (accessible to you) > > 2

Re: [R] two questions re: the use of lattice

2012-07-21 Thread jim holtman
Answer to you first question, try this at the start of bwplot to specify ordering: bwplot(Error~factor(Method, levels = unique(Method)) On Sat, Jul 21, 2012 at 2:42 PM, Ranjan Maitra wrote: > Dear friends, > > I have two questions regarding the use of lattice. First some code: > > > ## begin cod

Re: [R] Control y axis

2012-07-21 Thread David L Carlson
Using x/yaxp also works: plot(x, y, type ="o", xlab="Panelist", ylab="T value", lwd=1.5, xaxp=c(0, 18, 9), yaxp=c(-8, 8, 8), las=1) -- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4352 > -

[R] rhsape2 bug?

2012-07-21 Thread darnold
All, I believe I am running the latest version of rshape2 (1.2.1). But this code: library(reshape2) tmp <- melt(smiths, id.vars=1:2, measure.vars=c("age","weight","height"), variable.name="myvars", value.name="myvals" ) names(tmp) Produces this output: > names(tmp) [1] "su

[R] memory size

2012-07-21 Thread Gary Dong
Dear R community, I'm running "a mlogit" function with a very large data set. Since the data size is so large, I got the Error: Error: cannot allocate vector of size 5.4 Mb In addition: Warning messages: 1: In mapply("*", X, P, SIMPLIFY = FALSE) : Reached total allocation of 16340Mb: see help(m

Re: [R] rhsape2 bug?

2012-07-21 Thread Ista Zahn
Hi David, Your example works as expected for me (see sessionInfo below). What version of R are you using? What other packages are loaded? R version 2.15.1 (2012-06-22) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8

Re: [R] two questions re: the use of lattice

2012-07-21 Thread David L Carlson
Run this before the bwplot() command: z$Method <- factor(z$Method, levels = c("BIC", "ICL", "s_v", "Q_v", "sig-q", "s_lsk", "s_lML", "s_mlsk", "s_mlML", "s_la8", "s_haar")) I don't have an answer for the 2nd question. Seems like it must be possible. ---

Re: [R] rhsape2 bug?

2012-07-21 Thread darnold
Ista, You are correct. > search() [1] ".GlobalEnv""package:reshape" "package:plyr" [4] "package:reshape2" "tools:rstudio" "package:stats" [7] "package:graphics" "package:grDevices" "package:utils" [10] "package:datasets" "package:methods" "Autoloads" [13

Re: [R] two questions re: the use of lattice

2012-07-21 Thread David L Carlson
Take a look at useOuterStrips() in package latticeExtra. --- David > -Original Message- > From: David L Carlson [mailto:dcarl...@tamu.edu] > Sent: Saturday, July 21, 2012 6:51 PM > To: 'jim holtman'; 'Ranjan Maitra' > Cc: 'r-help@r-project.org' > Subject: RE: [R] two questions re: the

[R] Excel file Import - to Matrix format

2012-07-21 Thread biostat1
Hi, New to R. Need a bit of help. Thanks I am trying to import data from Excel file. The package I am trying to use requires data in Matrix format. Excel -> R Matrix with the constraint that the very first column in Excel file should became the names for rows of the matrix. Example. Data has 10

Re: [R] memory size

2012-07-21 Thread Jeff Newmiller
There are many possibilities, but they all begin with reading the posting guide and following the recommendations therein so we don't have to guess what your actual configuration is. However, since your first task is to read, you might consider reading the FAQs on memory use and Windows specifi

[R] Frame Column to List (conversion)

2012-07-21 Thread biostat1
Hi, Input Format: excel file (XLS) Column 1: Gene ID (alphanumeric) Column 2 - 10 : (numeric data). inData = read.xls ( ) geneLabel = inData [ , 1] - column 1 stored in geneLabel tempData = inData [ , 2: 10] expValues = data.matrix (tempData) - convert frame into Matrix format exp

Re: [R] rhsape2 bug?

2012-07-21 Thread arun
Hi, It works for me too.  When I had reshape and reshape2 both loaded, I had the same problem.   library(reshape2)  tmp <- melt(smiths, id.vars=1:2, measure.vars=c("age","weight","height"), variable.name="myvars", value.name="myvals"  )    names(tmp) [1] "subject" "time"   

Re: [R] Excel file Import - to Matrix format

2012-07-21 Thread arun
Hello, Try this: You can use the read.table with sep="," if it is comma separated to read the file. test1<-read.table(text=" 0.141  0.242  0.342 0.224  0.342  0.334 0.652  0.682  0.182 ",sep="",header=FALSE)  #Read data test1  #   V1    V2    V3 #1 0.141 0.242 0.342 #2 0.224 0.342 0.334 #3 0.65