[R] Hgu133acdf Installation Problem

2010-05-25 Thread mahalakshmi sivamani
Hi, While trying to install hgu133acdf- windows package in R im getting the following error and unable to install the same. > source("http://bioconductor.org/biocLite.R";) > biocLite("hgu133acdf") Using R version 2.10.0, biocinstall version 2.5.10. Installing Bioconductor version 2.5 packages

Re: [R] Avoiding Loops When Iterating Over Statement That Updates Its Input

2010-05-25 Thread Alan Lue
Come to think of it, we can't save the output of each invocation and concatenate it later, since we need the output as input for the next iteration. Alan On Tue, May 25, 2010 at 11:43 PM, Alan Lue wrote: > Since `for' loops are slow in R, and since `apply' functions are > faster, I was wonderin

[R] Avoiding Loops When Iterating Over Statement That Updates Its Input

2010-05-25 Thread Alan Lue
Since `for' loops are slow in R, and since `apply' functions are faster, I was wondering whether there were a way to use an apply function—or to otherwise avoid using a loop—when iterating over a statement that updates its input. For example, here's some such code: r.seq <- 2 * (1 / d$Dt[1] - 1)

Re: [R] Getting sink to work with "message" on R 2.11.0 - what didI miss?

2010-05-25 Thread Tal Galili
Hello Greg, Thank you for the coding. A few questions and remarks: 1) I have a feature request that I believe Faiz is interested in: He would like to have the formatting of tables/data.frames in the output to be prettier then the one extracted from the console output. I wonder if that is (reason

[R] More efficient way to use ifelse()?

2010-05-25 Thread Ian Dworkin
# This is more about trying to find a more effecient way to code some simple vectorized computations using ifelse(). # Say you have some vector representing a factor with a number of levels (6 in this case), representing the location that samples were collected. Population <- gl( n=6, k=5,length=

Re: [R] General Question regarding Lists

2010-05-25 Thread Thomas Stewart
Hopefully I understand your goal. You have several datasets of the same dimension, and you want to calculate the pairwise correlations of each dataset's row mean. Depending on the dataset names, it may be easy to put all the data in a 1359 X 15 X 40 dimension array. Then, the following code woul

Re: [R] Counting indexes

2010-05-25 Thread Gabor Grothendieck
This assumes that for a particular id they all occur together in a run: > cbind(start = which(!duplicated(id)), end = which(!duplicated(id, fromLast = > TRUE))) start end [1,] 1 1 [2,] 2 3 [3,] 4 6 [4,] 7 7 [5,] 8 9 On Wed, May 26, 2010 at 12:14 AM, Robin Jeff

Re: [R] Counting indexes

2010-05-25 Thread Robin Jeffries
Awesome! Thanks:) On Tue, May 25, 2010 at 9:40 PM, Erik Iverson wrote: > Robin Jeffries wrote: > >> Hallo! >> >> I have a vector of ID's like so, >> id <- c(1,2,2,3,3,3,4,5,5) >> >> I would like to create a [start,stop] pair of vectors that index the first >> and last observation per ID. >> >>

Re: [R] Counting indexes

2010-05-25 Thread Erik Iverson
Robin Jeffries wrote: Hallo! I have a vector of ID's like so, id <- c(1,2,2,3,3,3,4,5,5) I would like to create a [start,stop] pair of vectors that index the first and last observation per ID. For the ID list above, it would look like 1 1 2 3 4 6 7 7 8 9 which(!duplicated(id)) [1] 1 2 4 7 8

Re: [R] Counting indexes

2010-05-25 Thread Peter Alspach
Tena koe Robin See rle - it doesn't do exactly what you want but by looking at the code (simply enter rle without brackets) you should be able to get there. HTH ... Peter Alspach > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf

Re: [R] list of complex objects?

2010-05-25 Thread Erik Iverson
Nick Matzke wrote: Hi all, If I would like to make a list of complex objects -- in my case, phylogenetic trees, but it could be e.g. statistical results from something like lm, or whatever -- how can I put them into a list? When I try the obvious methods, e.g. cat, append, list, etc., I seem

[R] Counting indexes

2010-05-25 Thread Robin Jeffries
Hallo! I have a vector of ID's like so, id <- c(1,2,2,3,3,3,4,5,5) I would like to create a [start,stop] pair of vectors that index the first and last observation per ID. For the ID list above, it would look like 1 1 2 3 4 6 7 7 8 9 I haven't worked with indexes/data manipulation much in R, so

[R] list of complex objects?

2010-05-25 Thread Nick Matzke
Hi all, If I would like to make a list of complex objects -- in my case, phylogenetic trees, but it could be e.g. statistical results from something like lm, or whatever -- how can I put them into a list? When I try the obvious methods, e.g. cat, append, list, etc., I seem to get weird beha

Re: [R] Calculation time of isoMDS and the optimal number of dimensions

2010-05-25 Thread Michael Denslow
Hi Joris, On Tue, May 25, 2010 at 1:00 PM, Joris Meys wrote: > Dear all, > > I'm running a set of nonparametric MDS analyses, using a wrapper for isoMDS, > on a 800x800 distance matrix. I noticed that setting the parameter k to > larger numbers seriously increases the calculation time. Actually,

Re: [R] Creating the Firefox Download Analytics Map in R

2010-05-25 Thread Jason Rupert
The below is starting to get close to the Firefox Download Analytics Map, but I've still got a bit to go. Any insights or feedback about ways to improve the code below to more closely resemble the Firefox Download plot are greatly appreciated. Specifically, I would like to improve the presenta

Re: [R] reading in table with different number of elements in each row

2010-05-25 Thread David Winsemius
On May 25, 2010, at 8:05 PM, Johan Jackson wrote: HI all, This is probably simple, but I haven't been able to locate the answer either in the Import Manual or from searching the listserve. I have tab-delimited data with different numbers of elements in each row. I want to read it into R,

Re: [R] help required to melt a data frame

2010-05-25 Thread Mohan L
On Tue, May 25, 2010 at 9:35 PM, Wu Gong wrote: > > Do you mean count frequency of One Bedroom? > > table(dummy[dummy$Bedroom==1,][,1:2]) > Dear learner, Thanks for you time. Yes, that is what I am trying to archive using melt and cost. any way it works for me . Thanks for your help. Thank

Re: [R] reading in table with different number of elements in each row

2010-05-25 Thread jim holtman
This is in the Detail of the help page: The number of data columns is determined by looking at the first five lines of input (or the whole file if it has less than five lines), or from the length of col.names if it is specified and is longer. This could conceivably be wrong if fill or blank.lines.

[R] reading in table with different number of elements in each row

2010-05-25 Thread Johan Jackson
HI all, This is probably simple, but I haven't been able to locate the answer either in the Import Manual or from searching the listserve. I have tab-delimited data with different numbers of elements in each row. I want to read it into R, such that R fills in "NA" in elements that have no data. H

Re: [R] website address for the pseuso-XLS files

2010-05-25 Thread John Kane
The Prostatic_Neoplasm-miRNAs.DiseaseTargets.xls file seems to be an HTML table and seems to open with no problem in OpenOffice.org Writer/Web. OOo 3.2.0 when opened from within OOOo. At a guess it is some collection of PubMed references. I don't know if that's any use but it's a nice table

Re: [R] help required to melt a data frame

2010-05-25 Thread Wu Gong
Hope it helps this time:) ### Package reshape, function melt and cast ### Read table dummy <- read.table(textConnection("State Months Bedroom 1xxxJan 1 2xxxJan 2 3xxxJan 1 4yyyJan 1 5yyyJan 2 6yyyJan 1 7zzz

[R] Peak Over Threshold values/ length of the events

2010-05-25 Thread Tonja Krueger
Dear List I hope you can help me: I’ve got a dataframe (df) within which I am looking for Peak Over Threshold values as well as the length of the events. An event starts when walevel equals 5.8 and it should end when walevel equals the lower threshold value (5.35). I tried “clu

Re: [R] Example function for bigglm (biglm) data input from file

2010-05-25 Thread stephenb
Richard, do you have an example for an ODBC connection? Thank you Stephen -- View this message in context: http://r.789695.n4.nabble.com/R-Example-function-for-bigglm-biglm-data-input-from-file-tp816496p2230710.html Sent from the R help mailing list archive at Nabble.com. _

[R] Hierarchical clustering using own distance matrices

2010-05-25 Thread new...@r
Hey Everyone! I wanted to carry out Hierarchical clustering using distance matrices i have calculated ( instead of euclidean distance etc.) I understand as.dist is the function for this, but the distances in the dendrogram i got by using the following script(1) were not the distances defined in

Re: [R] Pipe

2010-05-25 Thread jim holtman
readLines will read until it reached an end-of -file. try readLines(con, n=1) to read one line at a time an then process it. On Tue, May 25, 2010 at 2:07 PM, Joe Stuart wrote: > Hi, > I'm trying to use the pipe function to read data from another process > on my server. > > Here is the code I h

Re: [R] Predict VAR

2010-05-25 Thread David Winsemius
On May 25, 2010, at 4:49 PM, David Winsemius wrote: On May 25, 2010, at 4:14 PM, Luis Felipe Parra wrote: Hello, I am using the predict function for VAR in r obtaining the following object for the predictions with the following command Hard to tell what that means since you have not spec

Re: [R] error : subscript out of bounds

2010-05-25 Thread Jannis
just a guess as i do not have your data: with k=947 (last outer loop) m starts from 948 and runs backwards to 947. As your matrix probably only has 947 columns you get this error Ayesha Khan schrieb: Hi, I'm trying to calculate euclidean distance for my matrix rx1. Its a big matrix with

Re: [R] doubt about samr siggenes.table$genes.up

2010-05-25 Thread Shi, Tao
Leo, This question is more suited for the BioC help list. Please post your question over there. Also, offer more info about how you arrived this siggenes.table, what version of R and siggenes package you're using would be helpful. Please read the posting guide! ...Tao - Original Mess

Re: [R] Predict VAR

2010-05-25 Thread David Winsemius
On May 25, 2010, at 4:14 PM, Luis Felipe Parra wrote: Hello, I am using the predict function for VAR in r obtaining the following object for the predictions with the following command Hard to tell what that means since you have not specified what package was used or the class of the objec

Re: [R] doubt about samr siggenes.table$genes.up

2010-05-25 Thread Peter Ehlers
On 2010-05-25 10:54, Leonardo K wrote: Hi, here's my siggenes.table$genes.up snippet. Two class unpaired SAMR analysis. "Row" "Gene ID" "Gene Name" "Score(d)" "Numerator(r)" "Denominator(s+s0)" "Fold Change" "q-value(%)" "1" "25" "RPL15P22" "RPL15P22" "-1.44115338424578" "-18" "12.489995996796

Re: [R] Get output values in a table

2010-05-25 Thread Phil Spector
Iurie - The help file for both functions has a "Values" section that describes in detail exactly what the function returns. In both cases, you'll see there is a component named "statistic", which is what you want. - Phil Spector

[R] Get output values in a table

2010-05-25 Thread Iurie Malai
Hi, I use two similar scripts to put p-values of shapiro.test and, respectively, of wilcox.test in a table: a) d <- data.frame(dataset$GroupFactor, dataset[2:11]) # p-values for the shapiro test (by levels of GroupFactor) with(d, aggregate(d[,-1], list(d[,1]), FUN = function(x) shapiro.test(x)$p.

Re: [R] Cohen's Kappa for beginners

2010-05-25 Thread William Revelle
Jason, At 9:55 AM -0700 5/25/10, Jason Priem wrote: Thanks for you quick responses, all! Bill, it looks like that's just what I want, but I'm not sure where you're getting the cohen.kappa() function. The only function I could find by that name is in the concord library, and it gives me: x<-c

[R] Predict VAR

2010-05-25 Thread Luis Felipe Parra
Hello, I am using the predict function for VAR in r obtaining the following object for the predictions with the following command PronFac <- predict(VARFactores,n.ahead=1) > PronFactores$fcst $PC1 fcst lower upper CI PC1.fcst 2.284497 -0.8033048 5.3723 3.087802 $PC2

Re: [R] R eat my data

2010-05-25 Thread Changbin Du
> id_gname<-read.table("/home/cdu/operon/id_name_gh5.txt", sep="\t", quote="", skip=0, header=F, fill=T) > dim(id_gname) [1] 19323 Yes, it works after adding quote="" to the read table options. Thanks, Chris! On Tue, May 25, 2010 at 9:34 AM, Chris Stubben wrote: > > Gene names often hav

Re: [R] error : subscript out of bounds

2010-05-25 Thread jim holtman
Take a look at what happens when k=947 (last time through the loop). You are then indexing 'm in 948:947' so m==948 which is outside your matrix. On Tue, May 25, 2010 at 2:49 PM, Ayesha Khan wrote: > Hi, > > I'm trying to calculate euclidean distance for my matrix rx1.  Its a big > matrix with 94

[R] doubt about samr siggenes.table$genes.up

2010-05-25 Thread Leonardo K
Hi, here's my siggenes.table$genes.up snippet. Two class unpaired SAMR analysis. "Row" "Gene ID" "Gene Name" "Score(d)" "Numerator(r)" "Denominator(s+s0)" "Fold Change" "q-value(%)" "1" "25" "RPL15P22" "RPL15P22" "-1.44115338424578" "-18" "12.4899959967968" "1.27368448239355" "0" "2" "47" "CHAF1

Re: [R] R eat my data

2010-05-25 Thread Chris Stubben
Gene names often have single quotes like 5'-methylthioadenosine phosphorylase ATP synthase B' chain ppGpp 3'-pyrophosphohydrolase so maybe try adding quote="" to the read table options. Chris Stubben -- View this message in context: http://r.789695.n4.nabble.com/R-eat-my-data-tp2230217p223

Re: [R] help required to melt a data frame

2010-05-25 Thread Wu Gong
Do you mean count frequency of One Bedroom? table(dummy[dummy$Bedroom==1,][,1:2]) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/help-required-to-melt-a-data-frame-tp2229633p2230260.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] R eat my data

2010-05-25 Thread Joris Meys
the last entries in the dataframe, how do they look? On Tue, May 25, 2010 at 6:12 PM, Changbin Du wrote: > 644727344ABC-2 type transporterABC-2 type transporter > 644727345conserved hypothetical proteinconserved hypothetical > protein > > Here is the last two lines of the file id

[R] error : subscript out of bounds

2010-05-25 Thread Ayesha Khan
Hi, I'm trying to calculate euclidean distance for my matrix rx1. Its a big matrix with 947 elements. However when i do the following, for(k in 1:947) for(m in (k+1):947){ A =rbind(A,c(k,m,ED(rx1[,k], rx1[,m]))) } I get the following error: ED(rx1[,k], rx1[,m]) : subscript out of bounds I check

[R] Kalman Filter

2010-05-25 Thread Greigiano Jose Alves
Hello My name is greigiano am student of Applied Economics, Department of Rural Economy. I am working on an article forecasting, which use the dynamic linear model, a model state space. I am wondering all the commands in R, to represent the linear dynamic model and Kalman filter. I am available for

Re: [R] Getting sink to work with "message" on R 2.11.0 - what didI miss?

2010-05-25 Thread Greg Snow
OK, I have uploaded a few new functions to the TeachingDemos package on R-forge (it will be a while before the CRAN version is updated, but you can install directly from R-forge once the changes show up there). The main functions to use (after loading TeachingDemos) are wdtxtStart and wdtxtStop

Re: [R] Lattice: relation = 'free' in scales

2010-05-25 Thread Albart
Dear Peter, thank you for your help. This helped. Albart -- View this message in context: http://r.789695.n4.nabble.com/Lattice-relation-free-in-scales-tp2229644p2230511.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-proje

Re: [R] Non-unique Values

2010-05-25 Thread Jannis
The really obvious thing that you missed ;-) was trying: help(unique) and looking at 'see also' which would have led you to help(duplicated) HTH Jannis --- Polwart Calum (County Durham and Darlington NHS Foundation Trust) schrieb am Di, 25.5.2010: > Von: Polwart Calum (County Durham and Da

Re: [R] appending objects to file created with save()

2010-05-25 Thread Jens Oehlschlägel
If you work with large data you might want to look at the ff package - useful if your data is close or above your RAM. The package has ffsave where with option add=TRUE you can add data to an existing ff archive. With ff data is stored outside of R in files, only meta-data is stored within R. An

Re: [R] adding one line to a plot

2010-05-25 Thread Jannis
Your line does show up, but the x values start at ~6 and the y values are incredibly small, so it is masked by the y=0 line. You probably have to check your calculations! --- Dimitri Liakhovitski schrieb am Mo, 24.5.2010: > Von: Dimitri Liakhovitski > Betreff: [R] adding one line to a plot >

Re: [R] R eat my data

2010-05-25 Thread Changbin Du
gene_name<-read.delim("/home/cdu/operon/id_name_gh5.txt", sep="\t", skip=0, header=F, fill=T) > dim(gene_name) [1] 19323 Thanks, Tao! Now you see, read.delim works! Thanks all for your imputs! I really appreciated! On Tue, May 25, 2010 at 10:13 AM, Shi, Tao wrote: > Changbin, >

Re: [R] R eat my data

2010-05-25 Thread Changbin Du
Thanks, Tao, I will try to do it. On Tue, May 25, 2010 at 10:13 AM, Shi, Tao wrote: > Changbin, > > It looks you're trying to read in a gene annotation file and usually it has > many strange characters, e.g. "#", "&", (as other people also > suggest). I encounter this all the time. So

[R] appending objects to file created with save()

2010-05-25 Thread Jannis
Dears, is there a way to append R objects similar to the function save() to a binary file that already consists some previously saved R objects? I browsed the mailing list archive and only found some suggestions that include reading in the old file first and then saving the new objects togethe

[R] Non-unique Values

2010-05-25 Thread Polwart Calum (County Durham and Darlington NHS Foundation Trust)
I might be missing something really obvious, but is there an easy way to locate all non-unique values in a data frame? Example mydata <- numeric() mydata$id <- 0:8 mydata$unique <- c(1:5, 1:4) mydata$result <- c(1:3, 1:3, 1:3) > mydata $id [1] 0 1 2 3 4 5 6 7 8 $unique [1] 1 2 3 4 5 1 2 3 4 $r

[R] Pipe

2010-05-25 Thread Joe Stuart
Hi, I'm trying to use the pipe function to read data from another process on my server. Here is the code I have tried. con <- pipe("/var/matlab/scripts/stream.pl") while(con_read <- readLines(con)) { print(con_read) } Problem is that the data from the perl script just keeps appending to con_re

Re: [R] File normalization

2010-05-25 Thread Joris Meys
On Tue, May 25, 2010 at 7:57 PM, Phil Spector wrote: > The scale function can use whatever vector you choose for > subtraction and division. (It's basically a wrapper for > the sweep function.) Yeah, I know, I said it a bit strong. In this case it becomes scale(data,center=F,scale=apply(data,2

Re: [R] Cohen's Kappa for beginners

2010-05-25 Thread Jason Priem
Thanks; i used update.packages() before I asked this, but apparently it didn't work. A manual upgrade did the trick, and now I'm Kappa-ing to my heart's content. Thanks again to everyone for your help! Best, Jason On 5/25/2010 1:34 PM, Peter Ehlers [via R] wrote: > Jason, > > It seems that y

Re: [R] File normalization

2010-05-25 Thread Phil Spector
The scale function can use whatever vector you choose for subtraction and division. (It's basically a wrapper for the sweep function.) For example, to subtract the median and divide by the median absolute deviation, use scale(x,center=apply(x,2,median),scale=apply(x,2,mad)) Either the center=

Re: [R] Cohen's Kappa for beginners

2010-05-25 Thread Peter Ehlers
Jason, It seems that your version of psych may be outdated. CRAN currently has version 1.0-88, in which wkappa is listed as deprecated. Might be time to upgrade. -Peter Ehlers On 2010-05-25 10:55, Jason Priem wrote: Thanks for you quick responses, all! Bill, it looks like that's just what I

Re: [R] summary of arima model in R

2010-05-25 Thread Joris Meys
Check http://cran.r-project.org/doc/contrib/Ricci-refcard-ts.pdf for some ideas on testing time series in R. I'd go with the acf() and pacf() on the residuals of the arima model. If arima works, both plots will indicate absence of autocorrelation. also check ?tsdiag And if you're really going t

[R] General Question regarding Lists

2010-05-25 Thread Steve_Friedman
Hello, Here is a general question that I think many of you will have insight to. I have 40 independent dataframes. Each has a dimension of 1359 x 15. For example >dim(meanAnnualWaterDepth) > 1539 15 I need to calculate the average value for each dataframe but only for columns 7: 15. I can d

Re: [R] File normalization

2010-05-25 Thread Joris Meys
Scale is written to do that IF you want to normalize according to the mean and the sd. For any other form of normalization, apply or sweep constructs will have to be used. I couldn't really see a way of using the absolute median value in a sweep-statement. On Tue, May 25, 2010 at 7:11 PM, Bert Gu

Re: [R] rounding up to nearest integer

2010-05-25 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Mohan L > Sent: Monday, May 24, 2010 6:26 PM > To: r-help@r-project.org > Subject: [R] rounding up to nearest integer > > Dear All, > > I have a data frame "data" and the below

Re: [R] R eat my data

2010-05-25 Thread Shi, Tao
Changbin, It looks you're trying to read in a gene annotation file and usually it has many strange characters, e.g. "#", "&", (as other people also suggest). I encounter this all the time. So try to be very thorough about your search (the first place I'll look for is the line where R s

Re: [R] File normalization

2010-05-25 Thread Bert Gunter
?scale is specifically written for this. See also ?sweep Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Joris Meys Sent: Tuesday, May 25, 2010 9:54 AM To: cobbler_squad Cc: r-hel

[R] Calculation time of isoMDS and the optimal number of dimensions

2010-05-25 Thread Joris Meys
Dear all, I'm running a set of nonparametric MDS analyses, using a wrapper for isoMDS, on a 800x800 distance matrix. I noticed that setting the parameter k to larger numbers seriously increases the calculation time. Actually, with k=10 it calculates already longer than for k=2 and k=5 together. It

Re: [R] Cohen's Kappa for beginners

2010-05-25 Thread Jason Priem
Thanks for you quick responses, all! Bill, it looks like that's just what I want, but I'm not sure where you're getting the cohen.kappa() function. The only function I could find by that name is in the concord library, and it gives me: > x<-c("red", "yellow", "blue", "red") #coder number 1 > y<-

Re: [R] File normalization

2010-05-25 Thread Joris Meys
My code substracts the median absolute value. If you want to divide by it, the code must be : apply(some_dataset,2,function( > > x){ >x/median(abs(x)) > }) Thanks to Peter Langfelder for pointing out my mistake. On Tue, May 25, 2010 at 6:24 PM, Joris Meys wrote: > What kind of normalizatio

Re: [R] Building correlation matrix

2010-05-25 Thread Jason Morgan
On 2010.05.25 11:52:07, Anyi Zhu wrote: > Hi, > > I am a novice with R, so pardon me if the question is a piece of cake > to some of you. > > Say if I have a stream of data consisting of 3 columns, 1st column is > birth date, 2nd is death date and third is weight for each individual. > > My ulti

Re: [R] Error during wrapup: cannot open the connection

2010-05-25 Thread Martin Morgan
On 05/25/2010 08:52 AM, Sheila Reynolds wrote: > Follow-up : one of my colleagues (who is not experiencing this problem) > noticed that I had an older version of impute than he did, so I have now > installed impute_1.22.0, but I still get the same error. Hi Sheila -- Apparently your 'data' list w

Re: [R] help required to melt a data frame

2010-05-25 Thread Mohan L
> > In that case, you probably want: > > subsets.melt <- melt(subsets.dummy,id.vars=c("State","Bedroom", "Months")) > cast(subsets.melt, State ~ Months, fill = 0, fun = length) > > Hadley > Dear Hadley, > subsets.melt <- melt(subsets.dummy,id.vars=c("State","Bedroom", "Months")) > subsets.melt

Re: [R] R eat my data

2010-05-25 Thread Changbin Du
Thanks you all for the contributions! I will send the data back to the computer guys who collect data yesterday. Actually, the data can be open in excel and txt editor. after replace some ";", > gene_name<-read.table("/home/cdu/operon/id_name_gh5.txt", sep="\t", skip=0, header=FALSE, fill=TRUE) >

Re: [R] multivariate nonparametric test

2010-05-25 Thread Joris Meys
Hi Jose, the datafile gets thrown away on the list. But in any case, first step is to get rid of EXCEL and save the data as a csv-file, with the first row being the variable names. Then you use read.table or read.csv to get this in R as a data frame. e.g.: myData <- read.csv(file="myFile.csv",hea

Re: [R] R eat my data

2010-05-25 Thread David Winsemius
Have you compared them to tail(gene)_name, 2) Come on, man, show some initiative. On May 25, 2010, at 12:12 PM, Changbin Du wrote: > 644727344ABC-2 type transporterABC-2 type transporter > 644727345conserved hypothetical proteinconserved > hypothetical protein > > Here is the

Re: [R] help required to melt a data frame

2010-05-25 Thread Hadley Wickham
On Tue, May 25, 2010 at 8:39 AM, Mohan L wrote: > > > On Tue, May 25, 2010 at 6:59 PM, Hadley Wickham wrote: >> >> > I trying to get a new data frame for 1 bedroom using cast. But I am not >> > able >> > to get the below data for 1 Bedroom using cost. >> > >> > State  Jan Feb >> >  xxx   2    0 >

Re: [R] R eat my data

2010-05-25 Thread Kevin E. Thorpe
When I encounter problems like this, I make sure each row has the expected number of columns. Something like the following awk code is useful. awk -F"\t" '{print NF}' id_name_gh5.txt | sort | uniq -c Note: I'm not sure is the \t will work with the -F switch as above. Kevin Changbin Du wrote

Re: [R] File normalization

2010-05-25 Thread Joris Meys
What kind of normalization do you want to do? If you want to divide all columns by the median absolute value, try : apply(some_dataset,2,function(x){ x-median(abs(x)) }) also look at ?scale for normalization using the average and the sd. Cheers Joris On Tue, May 25, 2010 at 6:01 PM, cobbler_s

Re: [R] R eat my data

2010-05-25 Thread Joris Meys
without any clue about your data-file this is definitely unsolvable. But some things to consider : Where is the dataset coming from? Did you check for special characters? Is there an apostrophe somewhere in a string? (That messed up things for me once). Is the delimiter placed correctly everywher

[R] multivariate nonparametric test

2010-05-25 Thread Aurélio Faria
Hi, I am doing my PhD and I usually use SPSS however now I need to do some multivariate nonparametric tests but SPSS don’t work with this. Recently I was aware of R and I saw that is possible using the MNM pack to perform multivariate nonparametric tests. I am learning step by step how to wor

Re: [R] R eat my data

2010-05-25 Thread Sarah Goslee
Without the actual file to look at, this is like playing 20 questions, only not so much fun. However, this kind of problem is most often caused by the presence in your file of something that R interprets as a special character, usually # or ' or ". Can you open the file in a spreadsheet? Can you

Re: [R] SEM interaction

2010-05-25 Thread Jarrett Byrnes
Have you looked into multigroup analysis? Is that what you're after? If so, you can do multigroup analysis in lavaan fairly easily or, if you're using the sem package, drop me a line. I have some scripts that will do multigroup analysis for an equal sample size. See http://faculty.chass.ncsu

Re: [R] R eat my data

2010-05-25 Thread Changbin Du
c...@nuuk:~/operon$ grep '^#' id_name_gh5.txt c...@nuuk:~/operon$ no lines starts with # On Tue, May 25, 2010 at 9:11 AM, Barry Rowlingson < b.rowling...@lancaster.ac.uk> wrote: > On Tue, May 25, 2010 at 4:42 PM, Changbin Du wrote: > > HI, Dear R community, > > > > My original file has 1932 l

Re: [R] R eat my data

2010-05-25 Thread Changbin Du
644727344ABC-2 type transporterABC-2 type transporter 644727345conserved hypothetical proteinconserved hypothetical protein Here is the last two lines of the file id_name_gh5.txt. On Tue, May 25, 2010 at 8:57 AM, David Winsemius wrote: > > On May 25, 2010, at 11:42 AM, Changbin

Re: [R] R eat my data

2010-05-25 Thread Mohamed Lajnef
cheks the comments sent by David! M Changbin Du a écrit : > length(count.fields("/home/cdu/operon/id_name_gh5.txt")) [1] 1932 It is 1932 lines when count in R On Tue, May 25, 2010 at 8:52 AM, Mohamed Lajnef mailto:mohamed.laj...@inserm.fr>> wrote: Hi Changbin, Try to use this

Re: [R] R eat my data

2010-05-25 Thread Barry Rowlingson
On Tue, May 25, 2010 at 4:42 PM, Changbin Du wrote: > HI, Dear R community, > > My original file has 1932 lines, but when I read into R, it changed to 1068 > lines, how comes? > > > c...@nuuk:~/operon$ wc -l id_name_gh5.txt > 1932 id_name_gh5.txt > > >> gene_name<-read.table("/home/cdu/operon/id_n

Re: [R] R eat my data

2010-05-25 Thread Changbin Du
> length(count.fields("/home/cdu/operon/id_name_gh5.txt")) [1] 1932 It is 1932 lines when count in R On Tue, May 25, 2010 at 8:52 AM, Mohamed Lajnef wrote: > Hi Changbin, > > Try to use this code in R to count the lines of your file without open it > > length(count.fields("id_name_gh5.txt"))

[R] File normalization

2010-05-25 Thread cobbler_squad
Dear all, I have a file with 57 columns (671 time points in each column) File looks like this: 10.279191 -1.203200e-02 -0.166772 6.12080e-02 0.196379 4.591900e-02 0.293689 20.267017 -1.150700e-02 -0.159463 5.85400e-02 0.187775 4.392200e-02 0.280854 30.053778 -2.

Re: [R] Error during wrapup: cannot open the connection

2010-05-25 Thread Sheila Reynolds
Follow-up : one of my colleagues (who is not experiencing this problem) noticed that I had an older version of impute than he did, so I have now installed impute_1.22.0, but I still get the same error. thanks, Sheila On Mon, May 24, 2010 at 3:01 PM, Sheila Reynolds < sheilamoorereyno...@gmail.c

Re: [R] Lattice: relation = 'free' in scales

2010-05-25 Thread Peter Ehlers
Albart, On 2010-05-25 1:51, Albart wrote: Hello list, I am making graphics for an article which I want to publish. The article is about several methods (to calculate breeding values of individuals) applied in several genetic scenarios (scen1 in the example) and using data from two sources (sce

Re: [R] R eat my data

2010-05-25 Thread David Winsemius
On May 25, 2010, at 11:42 AM, Changbin Du wrote: HI, Dear R community, My original file has 1932 lines, but when I read into R, it changed to 1068 lines, how comes? We are being asked to investigate this quest, how? Have you looked at the last line to see if it looks like gene_name? Isn

Re: [R] R eat my data

2010-05-25 Thread Mohamed Lajnef
Hi Changbin, Try to use this code in R to count the lines of your file without open it length(count.fields("id_name_gh5.txt")) Regards Mohamed Changbin Du a écrit : HI, Dear R community, My original file has 1932 lines, but when I read into R, it changed to 1068 lines, how comes? c

[R] Building correlation matrix

2010-05-25 Thread Anyi Zhu
Hi, I am a novice with R, so pardon me if the question is a piece of cake to some of you. Say if I have a stream of data consisting of 3 columns, 1st column is birth date, 2nd is death date and third is weight for each individual. My ultimate goal is to be able to compute the correlation of weig

Re: [R] Problem with Sweave not recognising \Sexpr{}

2010-05-25 Thread Greg Snow
What other packages do you have loaded? Sometimes things interfere with each other. Also, what version, os, etc are you working with? (the info asked for in the posting guide). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111

[R] R eat my data

2010-05-25 Thread Changbin Du
HI, Dear R community, My original file has 1932 lines, but when I read into R, it changed to 1068 lines, how comes? c...@nuuk:~/operon$ wc -l id_name_gh5.txt 1932 id_name_gh5.txt > gene_name<-read.table("/home/cdu/operon/id_name_gh5.txt", sep="\t", skip=0, header=F, fill=T) > dim(gene_name) [1

[R] SEM interaction

2010-05-25 Thread Anthony Dick
Hello all, This is a general stats question--I realize it is an R help list, so tell me to go away if it is inappropriate. I have a 2 X 2 design, and I have specified four identical path models (one for each level of each factor). I want to test for an interaction at each path--essentially (

Re: [R] PRESS and P2 statistics in R

2010-05-25 Thread David Winsemius
If you search with the Vignettes button checked at the RSiteSearch destination for "prediction error sums of squares" you find that the mixOmics package provides a function that returns PRESS. Whether that is a recommended approach to model scoring seems questionable, however. It looks ve

Re: [R] Cohen's Kappa for beginners

2010-05-25 Thread William Revelle
Peter, Scot, Jim, and Jason, Thanks for the various solutions to Jason's problem. In the next release of psych I will a) document how to use non-numeric categorical variables (e.g., red, blue, etc.) when using cohen.kappa, b) suggest that cbind does the job (Peter's solution), c) make it

[R] PRESS and P2 statistics in R

2010-05-25 Thread Alex Roy
Hello all, Is there any function in R by which I can calculate PRESS and P2 statistics for linear regression in R? Thanks Alex [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailma

Re: [R] Problem with Sweave not recognising \Sexpr{}

2010-05-25 Thread Felipe Carrillo
 I had the same problem before and I think it has something to do with the R2HTML package. To take care of that problem simply sweave your rnw file like this: Sweave("yourfile.Rnw",syntax="SweaveSyntaxNoweb") and try Sexpr{} again.   Felipe D. Carrillo Supervisory Fishery Biologist Department of

Re: [R] R: website address for the pseuso-XLS files

2010-05-25 Thread Barry Rowlingson
On Tue, May 25, 2010 at 3:09 PM, Ted Harding wrote: > It is OpenOffice 2.0 (as updated to openoffice.org-core, > dfsg.2-7etch9 Sat Jan 16 2010) running on Linux (Debian Etch, > originally installed Sept 2007), so none of it is particularly > recent. The command to view the files is like: > >  ooca

[R] R: R: website address for the pseuso-XLS files

2010-05-25 Thread mauede
Through clicking on the xls file oocalc (OpenOffice spreadsheet module) is automatically launched. But in my case it cannot load it correctly regardless of my choices (separator, etc..). Maybe I should switch to another Linux distribution. Thank you very much. Maura -Messaggio originale-

Re: [R] R: website address for the pseuso-XLS files

2010-05-25 Thread Ted Harding
It is OpenOffice 2.0 (as updated to openoffice.org-core, dfsg.2-7etch9 Sat Jan 16 2010) running on Linux (Debian Etch, originally installed Sept 2007), so none of it is particularly recent. The command to view the files is like: oocalc Prostatic_Neoplasm-miRNAs.DiseaseTargets.xls Ted. On 25-Ma

Re: [R] how to update R10.0 to R11.0 in Ubuntu linux

2010-05-25 Thread Michael Bibo
Mao Jianfeng gmail.com> writes: > > Dear R-listers, > > I am new to R in linux. And, I am now confused by updating R in Ubuntu > 9.10 linux system. I would like to seek some advice on that problem. > > I have done what are listed in CRAN linux installation guide: > > 1. add an entry like "deb

  1   2   >