Re: [R] loop for a large database

2012-02-27 Thread Petr Savicky
On Sun, Feb 26, 2012 at 11:39:01AM -0800, mari681 wrote: SORRY! The data in MyTable are tagsets of photos, like this: V1 V2 V3 V4 V5 V6V7 V8 230green nailpolish barrym 0 00 00 231 ny green

[R] Bayesian Hidden Markov Models

2012-02-27 Thread monkeylan
Dear R buddies, Recently, I attempt to model the US/RMB Exchange rate log-return time series with a *Hidden Markov model (first order Markov Chain mixed Normal distributions). * I have applied the RHmm package to accomplish this task, but the results are not so satisfying. So, I would like to

[R] What is the fastest way to combine all columns of a matrix to one column?

2012-02-27 Thread ali_protocol
Dear all, Newbie: What is the fastest way to combine all columns of a matrix to one column? -- View this message in context: http://r.789695.n4.nabble.com/What-is-the-fastest-way-to-combine-all-columns-of-a-matrix-to-one-column-tp4423882p4423882.html Sent from the R help mailing list archive at

Re: [R] randomForest2Rules

2012-02-27 Thread saskay
Hi, The work around this is to use printRandomForests function in Rattle package. It outputs the forest in the form of rules. For ex: #Load libraries library(rattle) library(randomForest) #Load sample data data(iris) #Build a forest iris.rf - randomForest(Species ~ ., data=iris,

[R] Need advice on GLM

2012-02-27 Thread Christofer Bogaso
Dear all, I was trying to fit a GLM on the following data (this data was taken from Agresti): Dat - matrix(c(24, 1355, 35, 603, 21, 192, 30, 224), 4, byrow = TRUE) Here the 1st column denotes the success and the second column is for failure. We have 4 rows represeting the 4 states of some

Re: [R] loop for a large database

2012-02-27 Thread Petr PIKAL
Hi SORRY! The data in MyTable are tagsets of photos, like this: V1 V2 V3 V4 V5 V6V7 V8 230green nailpolish barrym 0 00 00 231 ny green brooklyn cleanup clean gowanus volunteer gcc 232

Re: [R] What is the fastest way to combine all columns of a matrix to one column?

2012-02-27 Thread Petr PIKAL
Hi Dear all, Newbie: What is the fastest way to combine all columns of a matrix to one column? If mm is your matrix use dim(mm) -NULL Regards Petr -- View this message in context: http://r.789695.n4.nabble.com/What-is-the-

Re: [R] tcl tk command function with arguments ??

2012-02-27 Thread Alexander
Hi Elai and Peter, thanks a lot for your suggestions. I am still reading your answers, but I didn't get at the begining the difference between c-NULL for (i in seq(3)) c[[i]]-i c and the exempel with the tcl tk buttons. Now I think, it is clear. Its due to the interaction between R and tcl. The

Re: [R] Bayesian Hidden Markov Models

2012-02-27 Thread Oscar Rueda
Dear James, Although designed for the analysis of copy number CGH microarrays, RJaCGH uses a Bayesian HMM model. Cheers, Oscar On 27/2/12 08:32, monkeylan lanjin...@yahoo.com.cn wrote: Dear R buddies, Recently, I attempt to model the US/RMB Exchange rate log-return time series with a

Re: [R] tm_map help

2012-02-27 Thread Milan Bouchet-Valat
Le lundi 27 février 2012 à 10:47 +1100, Sachinthaka Abeywardana a écrit : Hi all, I am trying to do some text mining with twitter and I am getting the error: Error in structure(names(sapply(possibleCompletions, [, 1)), names = x) : 'names' attribute [1] must be the same length as the

Re: [R] What is the fastest way to combine all columns of a matrix to one column?

2012-02-27 Thread Petr PIKAL
Hi Hi, Thank you. I actually wanted to reserve the rows, I dont know how to do this with dim(mm) -NULL I do not understand. What does it mean reserve rows. Matrix is a vector with dimension so you can change dimensions freely with dim(mm) - any suitable combination dim(mm) -NULL gives

Re: [R] Military Time Comparison

2012-02-27 Thread Jim Holtman
what does 'str' of the object show? are the columns factors/characters? does the comparison have to consider the date? Sent from my iPad On Feb 27, 2012, at 0:37, Edgar Alminar eaalmi...@ucsd.edu wrote: Oh, haha -- sorry for the vagueness: I was expecting to get the comparison to work.

Re: [R] best option for big 3D arrays?

2012-02-27 Thread Djordje Bajic
Steven, sorry for the delay in responding, I have been investigating this also and here is the way I do it (though probably not the best way): # .. define a 3D array ngen = 904 gratios - ff(NA, dim=rep(ngen,3), vmode=double) # .. fill the array with standard R functions ffsave (gratios,

[R] read.csv converts NA to missing values

2012-02-27 Thread nikhil abhyankar
Hello, I have a CSV file with region codes listed in a column. E.g. 'AS' for Asia, 'AU' for Australia and 'NA' North America. However, the data frame created using read.csv shows NA where the string variable should have had the value 'NA'. How can I input the value 'NA' present in a column in a

Re: [R] read.csv converts NA to missing values

2012-02-27 Thread R. Michael Weylandt
I believe read.csv(..., na.strings = ) will do it. Michael On Mon, Feb 27, 2012 at 8:15 AM, nikhil abhyankar nsabhyan...@gmail.com wrote: Hello, I have a CSV file with region codes listed in a column. E.g. 'AS' for Asia, 'AU' for Australia and 'NA' North America. However, the data frame

Re: [R] read.csv converts NA to missing values

2012-02-27 Thread peter dalgaard
On Feb 27, 2012, at 14:15 , nikhil abhyankar wrote: Hello, I have a CSV file with region codes listed in a column. E.g. 'AS' for Asia, 'AU' for Australia and 'NA' North America. However, the data frame created using read.csv shows NA where the string variable should have had the value

[R] identify and delete in table

2012-02-27 Thread Jonas Fransson
Dear all, I want to delete the exact matches in a large dataset based on a smaller dataset. In other words I want to subtract the smaller dataset from the larger one. The smaller dataset is a part of the larger one. The datasets contains hundred of thousands of lines (1 column) and the content

[R] solnp inconsistent error messages

2012-02-27 Thread Diogo Alagador
Dear all, I am tryng to solve a nonlinear optimization probel using the solnp function. I have different datasets. For the smaller I get full solutions, for the bigger I got an error message stating: Iter: 1 fn: 101.8017 Pars: 0.21000 0.21000

[R] Extract data point coordinates from kernel home range estimation

2012-02-27 Thread despina_tg
Hello, I'm very new in working on R and maybe that's a simple thing I'm trying to do, but I am really stuck. I have a data point set of animal tracking coordinates and I have implemented a kernel utilization distribution analysis in order to find the home range for 95% of the relocation data. I

[R] General question about GLMM and heterogeneity of variance

2012-02-27 Thread GibsonR
My data have heterogeneity of variance (in a categorical variable), do I need to specify a variance structure accounting for this in my model or do GLMMs by their nature account for such heterogeneity (as a result of using deviances rather than variances)? And if I do need to do this, how do I do

Re: [R] loop for a large database

2012-02-27 Thread mari681
2012/2/27 Petr Savicky [via R] ml-node+s789695n4423895...@n4.nabble.com On Sun, Feb 26, 2012 at 11:39:01AM -0800, mari681 wrote: SORRY! The data in MyTable are tagsets of photos, like this: V1 V2 V3 V4 V5 V6V7 V8 230green nailpolish

[R] Loop

2012-02-27 Thread kerry1912
I've tried to create a loop for the following code but have failed miserably. This is what the code is: pnorm((Normal.Team.LnAveragePPPConceded.LnAveragePPPScores.HA.pred[1,1] -Normal.Team.LnAveragePPPConceded.LnAveragePPPScores.HA.pred[50,1])/ sqrt(prediction.SE[1]^2 + prediction.SE[50]^2))

[R] goodness of fit for glms

2012-02-27 Thread kerry1912
We are working on trying to find how well glm models fit our set of sports results. We want to consider the following two models and work out which one fits the data better: summary(Tries.Team.Ha.glm) (Dispersion parameter for poisson family taken to be 1) Null deviance: 321.46 on 269

[R] how to read file append at specified positon

2012-02-27 Thread sagarnikam123
i have one file as munnabhai-read.table(hyphen[1],skip=1) munnabhai V1 V2 V3 V4 V5 V6 V7 1 1 12AS_A 4 A0.0 157.8994119 2 2 2 12AS_A 5 Y -41.61818 -56.8011795 1 3 3 12AS_A 6 I -55.47021 -51.1328352 1 4 4 12AS_A 7 A -54.43085

Re: [R] strange behaviour of POSIXlt POSIXt object

2012-02-27 Thread ikuzar
Hi, I do not know what part of my code should I post here (I use large size of data, the loop for contains many lines). The situation is difficult to post here, but I hope these lines would be useful for help: hcEndDateTmp = userDateStart if((hcStartTime=23:59) (hcEndTime = 00:00)){

[R] compare two data frames with same columns names but of different dimensions

2012-02-27 Thread Arnaud Gaboury
Dear List, I want to compare and return the rows which are NOT in the two data frames. Classic methods don't work as the df have NOT the same dimensions. Here are one example of my df: reported - structure(list(Product = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 3L, 4L, 5L, 5L), .Label = c(Cocoa,

[R] Ubuntu jaunty - R can't be install

2012-02-27 Thread Veyssière Marine
Dear helpers, I would like to install R on a computer with Ubuntu Jaunty. Unfortunately, Jaunty does not appear in any CRAN mirror website I have tried (France, Canada, Italy, Germany). Could you give me any mirror website allowing installation on Jaunty?or could you give me a procedure

Re: [R] identify and delete in table

2012-02-27 Thread jim holtman
Is this what you want: ds1 - read.table(text = 1 A + 2 B + 3 X + 4 AA + 5 A + 6 D + 7 XA + 8 C, as.is = TRUE) ds2 - read.table(text = 1 A + 2 X + 3 A, as.is = TRUE) # find matches ds3 - ds1[!(ds1$V2 %in% ds2$V2), ] ds3 V1 V2 2 2 B 4 4 AA 6 6 D 7 7 XA 8 8 C On Mon, Feb 27, 2012

Re: [R] Ubuntu jaunty - R can't be install

2012-02-27 Thread Arnaud Gaboury
I don't understand where is your problem. Are you looking for jaunty as a package on R Crans?? Are you looking to install R package on your Ubuntu box? As you know, Jaunty is no more supported by Ubuntu, so packets have been moved in Archives. Arnaud Gaboury   A2CT2 Ltd. -Original

Re: [R] Matrix problem to extract animal associations

2012-02-27 Thread ilai
set.seed(1) (DFid - data.frame( x = sample(1:20,10), y = sample(1:20,10), IDs = sapply(1:10,function(i) paste(ID,i,sep= require(spdep) coordinates(DFid) - ~x+y coords - coordinates(DFid) dnn4 - dnearneigh(DFid,0,4) summary(dnn4) plot(DFid) plot(dnn4,coords,add=T,col=2) nb2mat(dnn4,

Re: [R] strange behaviour of POSIXlt POSIXt object

2012-02-27 Thread William Dunlap
is.na(POSIXltObject) can behave oddly if you manipulate the fields of the POSIXlt object directly so as to cause illegal combinations of values. E.g., the 35th of February, 2009, is not considered an NA but the 36th and above are: z - as.POSIXlt(2009-02-25 06:30:00) for(i in 1:20){ z$mday

Re: [R] strange behaviour of POSIXlt POSIXt object

2012-02-27 Thread ikuzar
So, how is the correct way to increment the day ? -- View this message in context: http://r.789695.n4.nabble.com/strange-behaviour-of-POSIXlt-POSIXt-object-tp4418115p4425206.html Sent from the R help mailing list archive at Nabble.com. __

[R] RStudio: how to change language from fr(french) to eng(english)

2012-02-27 Thread ikuzar
Hello, RStudio displays errors in french . I'd like to change it in english Please help, Thanks -- View this message in context: http://r.789695.n4.nabble.com/RStudio-how-to-change-language-from-fr-french-to-eng-english-tp4424972p4424972.html Sent from the R help mailing list archive at

[R] set heatmap.2 color ranges

2012-02-27 Thread Wendy
Hi all, I have a matrix with values between 0 and 1. I want to plot this matrix on a heat map so anything 0.05 is blue, anything =0.05 and 0.01 is yellow, and anything else is grey. I am using the heatmap.2 function. I searched around but did not find an efficient way to set colour ranges as I

Re: [R] RStudio: how to change language from fr(french) to eng(english)

2012-02-27 Thread Prof Brian Ripley
On 27/02/2012 15:29, ikuzar wrote: Hello, RStudio displays errors in french . I'd like to change it in english See the 'R Installation and Administration' manual. If that does not help, ask RStudio's help (it is not a product supported here). Setting the LANGUAGE environment variable to

Re: [R] RStudio: how to change language from fr(french) to eng(english)

2012-02-27 Thread Jeff Newmiller
Then why don't you ask about it on the RStudio support forum? --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...

Re: [R] best option for big 3D arrays?

2012-02-27 Thread steven mosher
Thanks, That helped. Maybe when I get a chance I will do some blog posts on the basics of ff I think some tutorials would be a good idea Steve On Mon, Feb 27, 2012 at 3:47 AM, Djordje Bajic je.li@gmail.com wrote: Steven, sorry for the delay in responding, I have been investigating

Re: [R] Need advice on GLM

2012-02-27 Thread ilai
On Mon, Feb 27, 2012 at 1:44 AM, Christofer Bogaso bogaso.christo...@gmail.com wrote:  Here I was expecting those 2 approaches should give exactly same result (i.e. same estimates and same SE), which is not the case. Can somebody point me what I am missing here? The vector of weights as

[R] compare two data frames of different dimensions and only keep unique rows

2012-02-27 Thread Arnaud Gaboury
Dear list, I am still struggling with something that should be easy: I compare two data frames with a lot of common rows and want to keep only rows that are NOT in both data frames, unique. Here are an example of these data frame. reported - structure(list(Product = structure(c(1L, 1L, 1L,

[R] problem with assign and get

2012-02-27 Thread Jannis
Dear list members, does anyone have an idea why the following construction does not work but gives the following error message: assign('test', array(1:10, dim=c(10,10))) dimnames(get('test')) - list(1:10,1:10) Error in dimnames(get(test)) - list(1:10, 1:10) : target of assignment expands

Re: [R] compare two data frames of different dimensions and only keep unique rows

2012-02-27 Thread jim holtman
is this what you want: v - rbind(reported, exportfile) v[!duplicated(v), ] ProductPrice Nbr.Lots 1Cocoa 2331.00 -61 2Cocoa 2356.00 -61 3Cocoa 2440.005 4Cocoa 2450.001 6 Coffee C 204.55 40 7 Coffee C

Re: [R] problem with assign and get

2012-02-27 Thread Peter Langfelder
On Mon, Feb 27, 2012 at 9:41 AM, Jannis bt_jan...@yahoo.de wrote: Dear list members, does anyone have an idea why the following construction does not work but gives the following error message: assign('test', array(1:10, dim=c(10,10))) dimnames(get('test')) - list(1:10,1:10) Error in

Re: [R] problem with assign and get

2012-02-27 Thread Sarah Goslee
Hi, On Mon, Feb 27, 2012 at 12:41 PM, Jannis bt_jan...@yahoo.de wrote: Dear list members, does anyone have an idea why the following construction does not work but gives the following error message: assign('test', array(1:10, dim=c(10,10))) dimnames(get('test')) - list(1:10,1:10) Error

Re: [R] compare two data frames of different dimensions and only keep unique rows

2012-02-27 Thread Arnaud Gaboury
No, but I tried your way too. In fact, the only three unique rows are these ones: Product Price Nbr.Lots Cocoa 24405 Cocoa 24501 Cocoa 24406 Here is a dirty working trick I found : df-merge(exportfile,reported,all.y=T) df1-merge(exportfile,reported)

Re: [R] Virus Infection in colorspace_1.1-1.zip (R x64 2.14.1)

2012-02-27 Thread Duncan Murdoch
On 24/01/2012 7:44 PM, R. Michael Weylandt wrote: I'm skeptical that CRAN would produce a bug, but it's not unheard of for anti-viruses to not like its compiled code. Are you able to compile locally? That might make it more comfortable -- if you do so, you could also white list those files

Re: [R] problem with assign and get

2012-02-27 Thread William Dunlap
Sarah Gosless said But frequently there are better options than the use of get/assign for solving particular problems. I tend to be more extreme say recommend that you forget you ever heard of the get and assign functions. First, out-of-the-local-evaluation-environment assignments make for

Re: [R] set heatmap.2 color ranges

2012-02-27 Thread David Winsemius
On Feb 27, 2012, at 11:26 AM, Wendy wrote: 0.05 is blue, anything =0.05 and 0.01 is yellow, and anything else is grey No data structures offered, but this may be a useful example: col= c(grey, yellow, blue)[findInterval(X, c(-.01, 0.01, 0.05, 1.1))] -- David Winsemius, MD Heritage

[R] How can the citation to be included in the manual for a package?

2012-02-27 Thread Matyas Sustik
Hi All, I have a CITATION file in inst for my package, however I would like to have our relevant paper to show up in the package documentation file as well. I tried to put the paper in the Description field but that does not seem to allow formatting (like a new line before the reference) it is a

[R] Installing package QRMlib

2012-02-27 Thread DT54321
Hi, I am having real problems downloading the package 'QRMlib'. The tar.gz file is shown here: http://cran.r-project.org/src/contrib/Archive/QRMlib/ I have downloaded this to my local folder and entered the following command: nstall.packages(myLocalFolder/QRMlib_1.4.5.1.tar.gz, repos = NULL)

[R] macro function

2012-02-27 Thread mrzung
hi, I know how to use the for loop function like: for(i in 1:ncol(mat)){ mat[i]-b[i,2] } but, in this case r1-b[1,1] r2-b[2,1] r3-b[3,1] r4-b[4,1] * * * r3002-b[3002,1] r3003-b[3003,1] - must make vectors how should I make a efficient code for that? Is there anything in R like SAS MACRO

Re: [R] compare two data frames of different dimensions and only keep unique rows

2012-02-27 Thread Rui Barradas
Hello, In fact, the only three unique rows are these ones: Product Price Nbr.Lots Cocoa 24405 Cocoa 24501 Cocoa 24406 The code below doesn't give the three in one step. (ixmat - apply(reported, 1, function(x) apply(exportfile, 1, function(y) any(x

Re: [R] set heatmap.2 color ranges

2012-02-27 Thread David Winsemius
On Feb 27, 2012, at 1:32 PM, David Winsemius wrote: On Feb 27, 2012, at 11:26 AM, Wendy wrote: 0.05 is blue, anything =0.05 and 0.01 is yellow, and anything else is grey No data structures offered, but this may be a useful example: col= c(grey, yellow, blue)[findInterval(X, c(-.01,

Re: [R] macro function

2012-02-27 Thread Bert Gunter
On Mon, Feb 27, 2012 at 9:56 AM, mrzung mrzun...@gmail.com wrote: hi, I know how to use the for loop function like: for(i in 1:ncol(mat)){ mat[i]-b[i,2] } but, in this case r1-b[1,1] r2-b[2,1] r3-b[3,1] r4-b[4,1] * * * r3002-b[3002,1] r3003-b[3003,1] - must make vectors

Re: [R] compare two data frames of different dimensions and only keep unique rows

2012-02-27 Thread Petr Savicky
On Mon, Feb 27, 2012 at 07:10:57PM +0100, Arnaud Gaboury wrote: No, but I tried your way too. In fact, the only three unique rows are these ones: Product Price Nbr.Lots Cocoa 24405 Cocoa 24501 Cocoa 24406 Here is a dirty working trick I found :

Re: [R] strange behaviour of POSIXlt POSIXt object

2012-02-27 Thread R. Michael Weylandt
Hadley's lubridate package might be of some help to you. Michael On Mon, Feb 27, 2012 at 11:40 AM, ikuzar raz...@hotmail.fr wrote: So, how is the correct way to increment the day ? -- View this message in context:

Re: [R] Installing package QRMlib

2012-02-27 Thread R. Michael Weylandt
Do you perhaps need to add install.packages(..., type=src)? Just a (untested) guess... Michael On Mon, Feb 27, 2012 at 12:07 PM, DT54321 deepan.tailo...@gmail.com wrote: Hi, I am having real problems downloading the package 'QRMlib'. The tar.gz file is shown here:

Re: [R] Installing package QRMlib

2012-02-27 Thread Duncan Murdoch
On 27/02/2012 3:01 PM, R. Michael Weylandt wrote: Do you perhaps need to add install.packages(..., type=src)? Just a (untested) guess... That should be type=source, and that should solve the problem, assuming Deepan has the necessary tools installed. If not, he can get them from CRAN in

[R] Principal Components for matrices with NA

2012-02-27 Thread Joyous Fisher
Hello, I have a matrix with 267 columns, all rows of which have at least one column missing (NA). All three methods i've tried (pcs, princomp, and prcomp) fail with either Error in svd(zsmall) : infinite or missing values in 'x' (latter two) or Error in cov.wt(z) : 'x' must contain finite

[R] How to incorporate interaction terms in MRM function of ecodist library?

2012-02-27 Thread Hossm_R
Hi, I'm interested in incorporating some interaction terms between my explanatory variables (distance matrices in this case) when I'm using the function MRM of the package ecodist. The function is doing a multiple regression on distance matrices. I can get the function to work perfectly on my

Re: [R] How to incorporate interaction terms in MRM function of ecodist library?

2012-02-27 Thread Sarah Goslee
Hi, On Mon, Feb 27, 2012 at 2:28 PM, Hossm_R hossamesap...@gmail.com wrote: Hi, I'm interested in incorporating some interaction terms between my explanatory variables (distance matrices in this case) when I'm using the function MRM of the package ecodist. The function is doing a multiple

[R] Help with rJava

2012-02-27 Thread Steve_Friedman
I am trying to invoke an in house developed java program from R and am running into some confusing issues. I've written this function: DoNormalSkew - function() { .jaddClassPath(U:/development/software/untilities/ELVeSkew/dist/ELVeSkew.jar)

Re: [R] What is the fastest way to combine all columns of a matrix to one column?

2012-02-27 Thread Rolf Turner
On 27/02/12 20:57, ali_protocol wrote: Dear all, Newbie: What is the fastest way to combine all columns of a matrix to one column? What (on earth!) do you mean by ``combine''? *You* understand what you mean; I doubt that anyone else does. For Pete's sake, if you are going to ask a

Re: [R] Bootstrapping

2012-02-27 Thread Jim Silverton
Hi, I am doing some bootstrap. This the is the method I am procceding: I select a value of sigma and set the sharp ratio = 4. From this I can compute the mean mu. For a set sample size say n = 11, I generate 999 samples of size 11 with the sigma and mean above. This is a 11 x 999 matrix. Now, I

Re: [R] Principal Components for matrices with NA

2012-02-27 Thread Rui Barradas
Hello, I could find the maximal set of columns such that there exists a subset of rows with non NA values for every column in the set - what is an efficient way to do that? Try 'na.exclude' on the transpose matrix. Example: set.seed(1) x - matrix(1:200, ncol=25) f -

[R] Non linear regression with complex equation

2012-02-27 Thread jeff_hawkes
Hi all, Is it possible to model a function where the unknown parameter appears both in the fitted equation AND in the determination of other parameters? E.g. y = a^2 + b/2 + k where a = 2/k and b = k^2 and the model needs to determine k? I know this is a very simple equation (its just an

Re: [R] compare two data frames with same columns names but of different dimensions

2012-02-27 Thread Gaurav Sood
m - rbind(reported, exportfile) m1 - m[duplicated(m),] m[is.na(match(m$key, m1$key)),] On Mon, Feb 27, 2012 at 9:46 AM, Arnaud Gaboury arnaud.gabo...@a2ct2.com wrote: Dear List, I want to compare and return the rows which are NOT in the two data frames. Classic methods don't work as the df

[R] export 3D array to .txt file

2012-02-27 Thread frauke
Hey, I have an array with the dimensions 200x6x200 and I want to save it in a textfile. I want to be able to reload the text file to get the same array again: new.array-load(mytextfile.txt) or something similar. I was not able to figure out a way to do that with write.table without having to

Re: [R] memory management

2012-02-27 Thread Sam Steingold
It appears that the intermediate data in functions is never GCed even after the return from the function call. R's RSS is 4 Gb (after a gc()) and sum(unlist(lapply(lapply(ls(),get),object.size))) [1] 1009496520 (less than 1 GB) how do I figure out where the 3GB of uncollected garbage is hiding?

[R] asking for a script

2012-02-27 Thread Luo, Ruijuan
Dear who may concern, I am sending you this email to ask if I could have someone help me to write this script I am interested in. I am requesting the script for performing variance-stabilizing normalizations on the R language. Could you please help me on that? If I am asking a wrong person,

[R] Note: no visible binding for global variable 'Dimnames'

2012-02-27 Thread Sam Steingold
I get this (twice): Note: no visible binding for global variable 'Dimnames' Note: no visible binding for global variable 'Dimnames' on the __first__ invocation of a function which does this: sm - sparseMatrix(i = ..., j = ..., x = ...) for (i in 1:length(mynames)) usr[[mynames[i]]] - sm[,i]

Re: [R] export 3D array to .txt file

2012-02-27 Thread R. Michael Weylandt
You can save it directly as an R object with save() and load with load() -- that's probably easiest. It should be portable between R platforms and sesions, but won't be easily accessible to other programs. Michael On Mon, Feb 27, 2012 at 3:45 PM, frauke fh...@andrew.cmu.edu wrote: Hey, I have

Re: [R] export 3D array to .txt file

2012-02-27 Thread Jim Holtman
why a text file? are you going to pass it to another program? 'load'/'save' has already been suggested. if you really want text, try 'dump'. Sent from my iPad On Feb 27, 2012, at 15:45, frauke fh...@andrew.cmu.edu wrote: Hey, I have an array with the dimensions 200x6x200 and I want to

Re: [R] What is the fastest way to combine all columns of a matrix to one column?

2012-02-27 Thread Bert Gunter
Mod Rolf's question, the answer probably is: do nothing -- it already **is** a single column. If you read the section on arrays and matrices in An Intro to R *carefully* (this is part of every standard R distro) you will be enlightened. Have you read it? If not, why not? If mat is your matrix,

[R] from data.frame to Venn diagram

2012-02-27 Thread Lara Poplarski
Hello All, I have a data.frame with this structure: m - matrix(sample(c(rep('yes', 10, replace = TRUE), rep('no', 10, replace = TRUE), NA), 500, replace = TRUE), nrow = 100, ncol = 5) colnames(m) - colnames(m, do.NULL = FALSE, prefix = col) m - as.data.frame(m) I need to generate a Venn diagram

Re: [R] from data.frame to Venn diagram

2012-02-27 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Lara Poplarski Sent: Monday, February 27, 2012 5:24 PM To: r-help@r-project.org Subject: [R] from data.frame to Venn diagram Hello All, I have a data.frame with this

Re: [R] Non linear regression with complex equation

2012-02-27 Thread Rolf Turner
Your question is (completely) ill-posed. What is your actual model? What you have said makes no sense at all as it stands. (Minimal self-contained example .) cheers, Rolf Turner On 28/02/12 09:25, jeff_hawkes wrote: Hi all, Is it possible to model a function where the

[R] Packages/functions for competing risk analysis

2012-02-27 Thread Jennifer Sabatier
Hi Rs, I am analyzing a time to event dataset with several competing risks. 0 = Active by end of study 1 = Stopped treatment to start another treatment 2 = Lost 3 = Dead My event of interest in Lost to Followup but starting a different treatment and dying are competing risks. All 1,2,3 events

Re: [R] General question about GLMM and heterogeneity of variance

2012-02-27 Thread Ben Bolker
GibsonR rachel.gibson at bristol.ac.uk writes: My data have heterogeneity of variance (in a categorical variable), do I need to specify a variance structure accounting for this in my model or do GLMMs by their nature account for such heterogeneity (as a result of using deviances rather than

Re: [R] Principal Components for matrices with NA

2012-02-27 Thread Rui Barradas
Hello again, Q: is there a way to do princomp or another method where every row has at least one missing column? See also package 'psych', function 'principal'. You can impute mean or median to NAs. Rui Barradas -- View this message in context:

[R] row names of a heatmap on left hand side

2012-02-27 Thread 1Rnwb
Hello R Gurus, I have a matrix for which I am doing a heatmap using heatmap.2. I want to put the rownames on the lefthand side instead of the right side of the heatmap. how can i put the rownames on left hand side: I have already tried axis but could not make it work ccc-structure(c(1,

[R] kmeans: how to retrieve clusters

2012-02-27 Thread ikuzar
Hello, I'd like to classify data with kmeans algorithm. In my case, I should get 2 clusters in output. Here is my data colCandInd colCandMed 1 822950.5 2 83 1831.5 3 1192 2899.0 4 1193 2103.5 The first cluster is the

Re: [R] memory management

2012-02-27 Thread Bert Gunter
This appears to be the sort of query that (with apologies to other R gurus) only Brian Ripley or Luke Tierney could figure out. R generally passes by value into function calls (but not *always*), so often multiple copies of objects are made during the course of calls. I would speculate that this

Re: [R] Bayesian Hidden Markov Models

2012-02-27 Thread monkeylan
Dear Oscar,   I really appreciate your help for my problem. I have taken a look at the R package RJaCGH you mentioned roughly, but I am really a little confused by the CGH microarrays background of the package. Actually, I am a graduate student, majoring Mathematical Statistics. So, I know

[R] R for Mac - editor's pick on Download Typhoon

2012-02-27 Thread Download Typhoon
Dear R Development Core Team R for Mac has been reviewed by Download Typhoon and got Editor's Pick award: http://www.downloadtyphoon.com/r-for-mac/infoyvnppyhf Please publish Download Typhoon Editor's Pick award on your website by adding the following HTML code: 160 x 80: a

Re: [R] compare two data frames of different dimensions and only keep unique rows

2012-02-27 Thread Rui Barradas
Hello, I've made Petr's solution a bit more general Petr Savicky wrote On Mon, Feb 27, 2012 at 07:10:57PM +0100, Arnaud Gaboury wrote: No, but I tried your way too. In fact, the only three unique rows are these ones: Product Price Nbr.Lots Cocoa 24405 Cocoa 2450

Re: [R] Bayesian Hidden Markov Models

2012-02-27 Thread monkeylan
Dear Doctor Oscar,   Sorry for not noticing that you are the author of the RJaCGH package. But I noticed that hidden Markov model in your package is with non-homogeneous transition probabilities. Here in my work, the HMM is just a first-order homogeneous Markov chain, i.e. the  transition 

[R] aggregating specific parts in zoo index column to perform sliding average

2012-02-27 Thread knavero
Here's my code: http://pastebin.com/0yRxEVtm The important parts are uncommented and should be easy to find using the link above. For the following line of code, I plan on looking for a way to offset it up 7 rows so that the 15 minute timestamp would be considered the median of the subset being

[R] having this error below.

2012-02-27 Thread wilson_peter88
hi. can anybody help me to resolve this problem i am facing? Warning in odbcDriverConnect(con, tabQuote = c([, ]), ...) : [RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Warning in odbcDriverConnect(con,

Re: [R] from data.frame to Venn diagram

2012-02-27 Thread Rui Barradas
Hello, Lara Poplarski wrote Hello All, I have a data.frame with this structure: m - matrix(sample(c(rep('yes', 10, replace = TRUE), rep('no', 10, replace = TRUE), NA), 500, replace = TRUE), nrow = 100, ncol = 5) colnames(m) - colnames(m, do.NULL = FALSE, prefix = col) m -

Re: [R] having this error below.

2012-02-27 Thread Jeff Newmiller
Quite possibly, after you read the posting guide and provide a complete example of code that is causing the problem. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.us

Re: [R] R for Mac - editor's pick on Download Typhoon

2012-02-27 Thread Steve Lianoglou
Thanks for taking the time to really kick the tires on R for mac and providing a great service to the community. The screen shots[1] you chose to use in order to really highlight R for mac as well as ensuring that you are reviewing the latest and greatest[2] really says volumes about the

Re: [R] To define a function which includes two functions as arguments such as plot and text

2012-02-27 Thread Yashwanth M.R
Hi Mr. Uwe Ligges, I really thankful for the reply. I even tried the same, means writing the new function. But the result is same as the last. Here is the picture below, Telco.Rpart.PLOT.TEXT.Functn - function(Telco.Rpart.METHOD.CLASS)

Re: [R] kmeans: how to retrieve clusters

2012-02-27 Thread Peter Langfelder
On Mon, Feb 27, 2012 at 3:18 PM, ikuzar raz...@hotmail.fr wrote: Hello, I'd like to classify data with kmeans algorithm. In my case, I should get  2 clusters in output. Here is my data colCandInd       colCandMed 1       82                2950.5 2       83               1831.5 3      

[R] e1071 : class.weights

2012-02-27 Thread Yuliya Matveyeva
Dear R-society, I know this is probably a question to LibSVM, but I have not found a LibSVM mailing list, so I would be really grateful if someone from this list helped me. In the LibSVM documentation I have found a passage about dealing with unbalanced sets, that says that in this case one