Re: [R] Installing package QRMlib

2012-02-28 Thread Pfaff, Bernhard Dr.
Dear all: well, what Duncan has suggested would work in principle. However, the dependencies of QRMlib as contained in the archive have been deprecated and the package maintainer (cc'ed to this email directly) is pretty close to a re-release of his package on CRAN, whereby primarily the

Re: [R] Principal Components for matrices with NA

2012-02-28 Thread Mark Difford
On Feb 27, 2012 at 9:30pm Joyous Fisher wrote: Q: is there a way to do princomp or another method where every row has at least one missing column? You have several options. Try function nipals in packages ade4 and plspm. Also look at package pcaMethods (on Bioconductor), where you will find a

[R] Conditional density estimation in R and integration

2012-02-28 Thread fReak
Hey there, I have the following problem: I need to carry out a nonparametric conditional density estimation -- pretty much what can be achieved using the np package. However, I need to be able to use the output of the np package in such a way that i get a continuous function as output, which

[R] data analysis

2012-02-28 Thread nontokozo mhlanga
Please assist me with all the tests including risk factor analysis i can use to analyse the enclosed database established from a questionnaire survey to test for the prevalence of tuberculosis in humans . Thank you Nonty -- View this message in context:

[R] macro function

2012-02-28 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

Re: [R] Error message: object of type 'closure' is not subsettable

2012-02-28 Thread Aparna Sampath
Hi All I am trying to use the unlist() in R to a list variable. The following statements are within a function. { denominator - sqrt(s1 / res.em1$n + s2 / res.em2$n) returnValue - l2 / (denominator + 11) attr(returnValue,numerator) - l2 attr(returnValue,denominator) - denominator

Re: [R] data analysis

2012-02-28 Thread Hans Ekbrand
On Mon, Feb 27, 2012 at 11:04:13PM -0800, nontokozo mhlanga wrote: Please assist me with all the tests including risk factor analysis i can use to analyse the enclosed database established from a questionnaire survey to test for the prevalence of tuberculosis in humans . That's quite a

Re: [R] macro function

2012-02-28 Thread Joshua Wiley
Hi, There is not anything really like macro functions in R (and honestly, that is probably a good thing). Most the times I have seen people generating thousands of variables (vectors in your case) it is due to a lack of understanding how lists can be utilized to simplify code. If you give us

Re: [R] Error message: object of type 'closure' is not subsettable

2012-02-28 Thread Joshua Wiley
Hi Aparna, Can you please post a reproducible example? It is difficult to provide much concrete help without having testStatistics. One thing you might try is looking at: str(testStatistics[numerator,]) is it actually a list? If it is not (most likely given the error) and it is supposed to

Re: [R] Error message: object of type 'closure' is not subsettable

2012-02-28 Thread Joshua Wiley
Hi Aparna, If you have not defined testStatistics in your code, but it is a function, then either you defined it at some earlier point and it was never removed, or some other package you loaded defines it. You could try using your code in a clean R session (make sure that an old workspace is not

Re: [R] asking for a script

2012-02-28 Thread Petr PIKAL
Hi 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

Re: [R] Non linear regression with complex equation

2012-02-28 Thread jeff_hawkes
Apologies for the phrasing of the question. I've sorted the problem (thanks Bert Gunter) by using the curly brackets {} as below (using a simplified version of my real model). I hope this helps someone else! Jeff --- data Alpha ip X 1 0.7106967

Re: [R] Bayesian Hidden Markov Models

2012-02-28 Thread Oscar Rueda
Dear James, Basically you just need the values (y) and the positions (in your case it would be the index of the times series). The chromosome argument does not apply to your case so it can be a vector of ones. If the positions are at the same distance between (equally spaced) then the model will

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

2012-02-28 Thread Gabor Grothendieck
On Mon, Feb 27, 2012 at 10:17 PM, knavero knav...@gmail.com wrote: 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

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

2012-02-28 Thread Arnaud Gaboury
TY very much for your setdiffDF(). It does the job perfectly. Arnaud Gaboury   A2CT2 Ltd. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Petr Savicky Sent: lundi 27 février 2012 20:41 To: r-help@r-project.org Subject: Re: [R]

[R] colour by z value, persp in raster package

2012-02-28 Thread Omphalodes Verna
Hi all!   My question is how to colour pixels by z value in persp plot in raster package. Here is an example:     x - seq(-1.95, 1.95, length = 30) y - seq(-1.95, 1.95, length = 35) z - outer(x, y, function(a,b) a*b^2) r1 - raster(nrows=35, ncols=30, xmn=0, xmx=30, ymn = 0, ymx = 35) r1[] - c(z)

Re: [R] kmeans: how to retrieve clusters

2012-02-28 Thread ikuzar
Hi, Ok, I understand what you mean. I wanted to get sorted data group by cluster in output ... But I have to do it myself using kres$cluster thanks for your help -- View this message in context: http://r.789695.n4.nabble.com/kmeans-how-to-retrieve-clusters-tp4426427p4427543.html Sent from

Re: [R] Installing package QRMlib

2012-02-28 Thread DT54321
Thanks for the reply guys. Well, I've tried the following command after installing the package dependancies including timeSeries: install.packages(file_name, type = source, repos = NULL) Ans still no luck...I get the following error message: Installing package(s) into ‘C:/Program

Re: [R] Error message: object of type 'closure' is not subsettable

2012-02-28 Thread Aparna Sampath
Hi Josh Kindly find below the code as it is executed: test.functional.t - function(res.em1,res.em2,mint,maxt,se.m=0,points=300) { at - seq(mint,maxt,length.out=points) by - at[2] - at[1] mu1 - spline(x=res.em1$tau,y=res.em1$eta,xout=at,method=natural)$y l2 - functional.norm(mu1,mu2,by=by)

[R] Error in solve.default(res$hessian * n.used) :Lapack routine dgesv: system is exactly singular

2012-02-28 Thread Vinicius Magalhães
Hi there! I´m a noob when it comes to R and I´m using it to run statisc analysis. With the code for ARIMA below I´m getting this error: Error in solve.default(res$hessian * n.used) :Lapack routine dgesv: system is exactly singular The code is: s.ts - ts(x[,7], start = 2004, fre=12)

[R] Interpreting the Results of GLM

2012-02-28 Thread sazzle
Hi, I'm wondering if you can help me, this is a really simple query but I keep getting confused. I have run a GLM to see how boldness varies over time following a particular treatment. The results are as follows... Call: glm(formula = boldtwentyfour ~ treatment + boldcontrol) Deviance

[R] how to append element at last position in array dynamically

2012-02-28 Thread sagarnikam123
h-array() h [1] NA append(h,9) [1] NA 9 but what it append. h [1] NA -- View this message in context: http://r.789695.n4.nabble.com/how-to-append-element-at-last-position-in-array-dynamically-tp4427893p4427893.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] kmeans: how to retrieve clusters

2012-02-28 Thread R. Michael Weylandt
But it won't be hard at allyou can likely get what you need using the tapply() function (or ave) Michael On Tue, Feb 28, 2012 at 4:33 AM, ikuzar raz...@hotmail.fr wrote: Hi, Ok, I understand what you mean. I wanted to get sorted data group by cluster  in output ... But I have to do it

[R] how to get file name/file path

2012-02-28 Thread sagarnikam123
i open a table table-read.table(file.choose(),skip=1) at sometime i forget which file i open,so i want file name/file path -- View this message in context: http://r.789695.n4.nabble.com/how-to-get-file-name-file-path-tp4428126p4428126.html Sent from the R help mailing list archive at

Re: [R] macro function

2012-02-28 Thread mrzung
Actually, what I really want to do is that, annual productivity data(2011) firts date 2011-01-01 2011-01-02 2011-01-03 2011-01-04

Re: [R] how to append element at last position in array dynamically

2012-02-28 Thread R. Michael Weylandt
You need to reassign the value of append back to h -- in more technical terms, this is a pass-by-value rather than pass-by-reference behavior: h - append(h, 9) This is not likely to be efficient in production code, however. Michael On Tue, Feb 28, 2012 at 7:15 AM, sagarnikam123

[R] indexing??

2012-02-28 Thread helin_susam
Hello All, My algorithm as follows; y - c(1,1,1,0,0,1,0,1,0,0) x - c(1,0,0,1,1,0,0,1,1,0) n - length(x) t - matrix(cbind(y,x), ncol=2) z = x+y for(j in 1:length(x)) { out - vector(list, ) for(i in 1:10) { t.s - t[sample(n,n,replace=T),] y.s - t.s[,1] x.s - t.s[,2] z.s - y.s+x.s out[[i]]

Re: [R] how to get file name/file path

2012-02-28 Thread R. Michael Weylandt
Use this line instead: table - read.table(fileIchoose - file.choose(), skip = 1) This will have the side effect of creating fileIchoose as a variable containing a file path. Michael On Tue, Feb 28, 2012 at 8:34 AM, sagarnikam123 sagarnikam...@gmail.com wrote: i open a table

Re: [R] Installing package QRMlib

2012-02-28 Thread Pfaff, Bernhard Dr.
As stated, you need to install the *deprecated* dependencies of QRMlib as shown in its DESCRIPTION as well as the reverse dependent *deprecated* packages. These can still be fetched from R-Forge (Rmetrics project). The package 'timeSeries' will become a dependency of the to be re-released

Re: [R] how to append element at last position in array dynamically

2012-02-28 Thread jim holtman
'append' returns a value that you have assign back to the object you want, in this case 'h' h - append(h, 9) On Tue, Feb 28, 2012 at 7:15 AM, sagarnikam123 sagarnikam...@gmail.com wrote: h-array() h [1] NA append(h,9) [1] NA  9 but what it append. h [1] NA -- View this

Re: [R] Error message: object of type 'closure' is not subsettable

2012-02-28 Thread Petr PIKAL
Hi Difficult to without knowing what objects you are operating your functions. I get test.functional.t(1:10,1:10,3,4) Error in res.em1$eta : $ operator is invalid for atomic vectors moderated.functional.t(1:10) Error in testStatistics[numerator, ] : incorrect number of dimensions And

Re: [R] indexing??

2012-02-28 Thread Petr PIKAL
Hi My algorithm as follows; y - c(1,1,1,0,0,1,0,1,0,0) x - c(1,0,0,1,1,0,0,1,1,0) n - length(x) t - matrix(cbind(y,x), ncol=2) Do not use t, it is a function for transposing matrix and after you redefine it you can get nasty surprise in future. tt - cbind(y,x) is enough z = x+y

Re: [R] macro function

2012-02-28 Thread Petr PIKAL
Hi Your mail is quite messy. what is ***? How your data are structured? str(your.data) Please submit part of your data by dput(your.data) and show what the output shall be. Regards Petr Actually, what I really want to do is that, annual productivity data(2011) firts date

Re: [R] indexing??

2012-02-28 Thread Petr Savicky
On Tue, Feb 28, 2012 at 05:59:24AM -0800, helin_susam wrote: Hello All, My algorithm as follows; y - c(1,1,1,0,0,1,0,1,0,0) x - c(1,0,0,1,1,0,0,1,1,0) n - length(x) t - matrix(cbind(y,x), ncol=2) z = x+y for(j in 1:length(x)) { out - vector(list, ) for(i in 1:10) { t.s -

Re: [R] Installing package QRMlib

2012-02-28 Thread jthetzel
I think you'll need to install fEcofin from CRAN, and then the following .tar.gz files from the CRAN archives: fUtilities fCalenday fSeries And then try installing the QRMlib .tar.gz. If you're still having problems, try: C:/Program Files/R/R-2.14.0/bin/x64/R CMD check QRMlib_1.4.5.1.tar.gz (or

[R] vlookup type function

2012-02-28 Thread Priyan Fernando
Hi I''m looking for an Excel Vlookup type function in R. Example: list - c(1,2,3,4,5,6,7) base - c(2.2,3,5.2) What I want is, for each number in base, the highest value in list, which is equal to or less than the number in base So the results would be: base         list 2.2  -- 2 3    

[R] Cluster GUI package worth publishing/enhancing?

2012-02-28 Thread Todd Gillette
For a school course I and a partner developed a GUI in R designed to enable exploration of data via visualization of hierarchical clustering and correlation of cluster partitions with external metadata. The key features were the ability to load in a distance matrix (most GUI-based clustering

Re: [R] vlookup type function

2012-02-28 Thread Petr Savicky
On Tue, Feb 28, 2012 at 09:02:04PM +0530, Priyan Fernando wrote: Hi I''m looking for an Excel Vlookup type function in R. Example: list - c(1,2,3,4,5,6,7) base - c(2.2,3,5.2) What I want is, for each number in base, the highest value in list, which is equal to or less than the number

Re: [R] vlookup type function

2012-02-28 Thread Berend Hasselman
On 28-02-2012, at 16:32, Priyan Fernando wrote: Hi I''m looking for an Excel Vlookup type function in R. Example: list - c(1,2,3,4,5,6,7) base - c(2.2,3,5.2) What I want is, for each number in base, the highest value in list, which is equal to or less than the number in base So

Re: [R] vlookup type function

2012-02-28 Thread William Dunlap
findInterval returns the index (into list) of what you want. Use [ to get the numbers at the bottom of the found intervals: list - c(1,2,3,4,5,6,7) base - c(2.2,3,5.2) findInterval(base, list) [1] 2 3 5 findInterval(base+100, list+100) [1] 2 3 5 (list+100)[.Last.value] [1]

Re: [R] vlookup type function

2012-02-28 Thread Petr Savicky
On Tue, Feb 28, 2012 at 09:02:04PM +0530, Priyan Fernando wrote: Hi I''m looking for an Excel Vlookup type function in R. Example: list - c(1,2,3,4,5,6,7) base - c(2.2,3,5.2) What I want is, for each number in base, the highest value in list, which is equal to or less than the number

Re: [R] Installing package QRMlib

2012-02-28 Thread DT54321
According to the QRMlib package pdf, http://www.mirrorservice.org/sites/lib.stat.cmu.edu/R/CRAN/doc/packages/QRMlib.pdf the package depennds on methods, fCalendar, fEcofin, mvtnorm, chron,its,Hmisc. I have installed all of these (some were retrieved from archive and some were retrieved from

[R] Volcano Plot

2012-02-28 Thread aishsk
Hi I am using the ggplot2 package for the volcano plot and I am using the following code for the same: g = ggplot(data=data, aes(x=data[11], y=-log10(data[12]), colour=threshold)) + + geom_point(alpha=0.4, size=1.75) + + opts(legend.position = none) + + xlim(c(-10, 10)) + ylim(c(0, 15)) + +

Re: [R] Table into a list

2012-02-28 Thread Alemtsehai Abate
Perhaps, the following does it as well. (d - data.frame(x1=letters[2*1:4 - 1], x2=letters[2*1:4])) c(t(d)) Alemtsehai Hello, I am looking for a way to transform an array into a list (or a string). My array has two columns 1 and 2, and I would like to create a list of the values.

[R] Off Topic: Lowess on Yahoo

2012-02-28 Thread Bert Gunter
Folks: Graphics afficianados might enjoy this link (although conditional probability is also mentioned!): http://news.yahoo.com/blogs/signal/republican-nomination-extends-march-candidates-face-weakening-odds-152347629.html Pay attention to the graph. Never thought I'd see the phrase lowess

[R] Dotplot edition

2012-02-28 Thread Jose Bustos Melo
Hi everyone, Im very new with R and I would like to change the size text (names) in the ylab in a dotplot. I have checked many webpages and R sites,  but I have not found any help. This is the same structure of the plot in R graph Gallery:

Re: [R] Installing package QRMlib

2012-02-28 Thread DT54321
In command prompt, I direct to the following directory: C:\Program Files\R\R-2.14.1\bin Now I enter: R CMD check my_local_folder\QRMlib_1.4.5.1.tar.gz The following appears: * using log directory 'C:/Program Files/R/R-2.14.1/bin/QRMlib.Rcheck' * using R version 2.14.1 (2011-12-22) * using

Re: [R] indexing??

2012-02-28 Thread helin_susam
Dear Petr Pikal and Petr Savicky thank you for your replies.. If the y vector contains different elements my algorithm gives this result; y - c(1,2,3,4,5,6,7,8,9,10) x - c(1,0,0,1,1,0,0,1,1,0) n - length(x) t - matrix(cbind(y,x), ncol=2) z = x+y for(j in 1:length(x)) { out -

Re: [R] Installing package QRMlib

2012-02-28 Thread jthetzel
Next, you should check C:/Program Files/R/R-2.14.1/bin/QRMlib.Rcheck/00install.out for details on the error. DT54321 wrote In command prompt, I direct to the following directory: C:\Program Files\R\R-2.14.1\bin Now I enter: R CMD check my_local_folder\QRMlib_1.4.5.1.tar.gz The

Re: [R] macro function

2012-02-28 Thread mrzung
I really appreciate to your attention. I want to change the data form A into B http://r.789695.n4.nabble.com/file/n4428807/1.png http://r.789695.n4.nabble.com/file/n4428807/2.png In fact, there are 1095 column in data A. Specifically, variable publish_day is when some book in the same

Re: [R] Installing package QRMlib

2012-02-28 Thread jthetzel
I installed fEcofin, fUtilities, fCalenday, and fSeries from the CRAN archives and was able to install and load QRMlib. Which errors does R CMD check QRMlib_1.4.5.1.tar.gz show? DT54321 wrote According to the QRMlib package pdf,

Re: [R] macro function

2012-02-28 Thread Rui Barradas
Hello, Is it just a columns names issue? Try (DF is your data, 'A' or other data.frame) # colNames - colnames(DF) colNames - c(name, publish day, 2011-01-01, 2011-01-02, 2011-01-03, 2011-01-04, 2011-01-05) x - as.Date(colNames[-(1:2)]) x [1] 2011-01-01 2011-01-02 2011-01-03 2011-01-04

Re: [R] indexing??

2012-02-28 Thread Petr Savicky
On Tue, Feb 28, 2012 at 08:50:45AM -0800, helin_susam wrote: Dear Petr Pikal and Petr Savicky thank you for your replies.. If the y vector contains different elements my algorithm gives this result; y - c(1,2,3,4,5,6,7,8,9,10) x - c(1,0,0,1,1,0,0,1,1,0) n - length(x) t -

Re: [R] Dotplot edition

2012-02-28 Thread Patrick Connolly
There seems to be a clash of character sets so I can't see just what you're trying to do, but I think you'll find out how to adjust the text size with a scales list. Check out how it's used in the help for xyplot. HTH On Tue, 28-Feb-2012 at 06:05PM +, Jose Bustos Melo wrote: | Hi

[R] update.formula has 512 char buffer?

2012-02-28 Thread Chris Hane
Hello, I am trying to paste together a formula to use in the mob function of party. This means the formula will be of the form y ~ x1+ ...+xM | z1+..zN. I am doing some preliminary fits of y ~ x1+ ...+xM, then want to add the conditional part of the equation using update(). Here's the test

Re: [R] indexing??

2012-02-28 Thread Petr Savicky
On Tue, Feb 28, 2012 at 08:50:45AM -0800, helin_susam wrote: Dear Petr Pikal and Petr Savicky thank you for your replies.. If the y vector contains different elements my algorithm gives this result; y - c(1,2,3,4,5,6,7,8,9,10) x - c(1,0,0,1,1,0,0,1,1,0) n - length(x) t -

Re: [R] data analysis

2012-02-28 Thread David Winsemius
On Feb 28, 2012, at 4:16 AM, Hans Ekbrand wrote: On Mon, Feb 27, 2012 at 11:04:13PM -0800, nontokozo mhlanga wrote: Please assist me with all the tests including risk factor analysis i can use to analyse the enclosed database established from a questionnaire survey to test for the

[R] Error in read.table(file = file, header = header, sep = sep, quote = quote, : more columns than column names

2012-02-28 Thread Ben Ganzfried
Hey, I just googled my error and many things came up. I followed the leads and read the ?read.delim page; I tried changing header = TRUE, and row.names = TRUE-- but I've still been having trouble fixing it, so I would greatly appreciate any help you can provide. Here is my code: rm(list=ls())

Re: [R] update.formula has 512 char buffer?

2012-02-28 Thread Bert Gunter
Your code seems to be screwed up. There are no (small) size limitations on formulas (afaik). The following worked fine for me: x - paste(x,1:100,sep=,collapse = + ) part1 - paste(y,x,sep= ~ ) part2 - paste(f,1:50, sep=,collapse = + ) fml - formula(paste(part1,part2,sep= | )) Cheers, Bert On

Re: [R] colour by z value, persp in raster package

2012-02-28 Thread David Winsemius
On Feb 28, 2012, at 4:34 AM, Omphalodes Verna wrote: Hi all! My question is how to colour pixels by z value in persp plot in raster package. Here is an example: x - seq(-1.95, 1.95, length = 30) y - seq(-1.95, 1.95, length = 35) z - outer(x, y, function(a,b) a*b^2) r1 - raster(nrows=35,

Re: [R] memory management

2012-02-28 Thread Sam Steingold
My basic worry is that the GC does not work properly, i.e., the unreachable data is never collected. * Bert Gunter thagre.ore...@trar.pbz [2012-02-27 14:35:14 -0800]: This appears to be the sort of query that (with apologies to other R gurus) only Brian Ripley or Luke Tierney could figure

Re: [R] memory management

2012-02-28 Thread Bert Gunter
On Tue, Feb 28, 2012 at 11:57 AM, Sam Steingold s...@gnu.org wrote: My basic worry is that the GC does not work properly, i.e., the unreachable data is never collected. Highly unlikely. Such basic inner R code has been well tested over 20 years. I believe that you merely don't understand the

Re: [R] macro function

2012-02-28 Thread David Winsemius
On Feb 28, 2012, at 12:10 PM, mrzung wrote: I really appreciate to your attention. I want to change the data form A into B http://r.789695.n4.nabble.com/file/n4428807/1.png http://r.789695.n4.nabble.com/file/n4428807/2.png Please use text copied versions of dput(a) and dput(b) rather

Re: [R] memory management

2012-02-28 Thread William Dunlap
Look into environments that may be stored with your data. object.size(obj) does not report on the size of the environment(s) associated with obj. E.g., f - function(n) { +d - data.frame(y=rnorm(n), x1=rnorm(n), x2=rnorm(n)) +terms(data=d, y~.) + } z - f(1e6)

Re: [R] update.formula has 512 char buffer?

2012-02-28 Thread Duncan Murdoch
On 28/02/2012 2:46 PM, Bert Gunter wrote: Your code seems to be screwed up. There are no (small) size limitations on formulas (afaik). The following worked fine for me: x- paste(x,1:100,sep=,collapse = + ) part1- paste(y,x,sep= ~ ) part2- paste(f,1:50, sep=,collapse = + ) fml-

[R] Cleaning up messy Excel data

2012-02-28 Thread Noah Silverman
Unfortunately, some data I need to work with was delivered in a rather messy Excel file. I want to import into R and clean up some things so that I can do my analysis. Pulling in a CSV from Excel is the easy part. My current challenge is dealing with some text mixed in the values. i.e.

Re: [R] Cleaning up messy Excel data

2012-02-28 Thread jim holtman
First of all when reading in the CSV file, use 'as.is = TRUE' to prevent the changing to factors. Now that things are character in that column, you can use some pattern expressions (gsub, regex, ...) to search for and change your data. E.g., sub(.*, 0, yourCol) should do it for you. On Tue,

Re: [R] Cleaning up messy Excel data

2012-02-28 Thread Robert Baer
-Original Message- From: Noah Silverman Sent: Tuesday, February 28, 2012 3:27 PM To: r-help Subject: [R] Cleaning up messy Excel data Unfortunately, some data I need to work with was delivered in a rather messy Excel file. I want to import into R and clean up some things so that I can

Re: [R] Cleaning up messy Excel data

2012-02-28 Thread Noah Silverman
That's exactly what I need. Thank You!! -- Noah Silverman UCLA Department of Statistics 8117 Math Sciences Building Los Angeles, CA 90095 On Feb 28, 2012, at 1:42 PM, jim holtman wrote: First of all when reading in the CSV file, use 'as.is = TRUE' to prevent the changing to factors. Now

Re: [R] memory management

2012-02-28 Thread Sam Steingold
* William Dunlap jqha...@gvopb.pbz [2012-02-28 20:19:06 +]: Look into environments that may be stored with your data. thanks, but I see nothing like that: for (n in ls(all.names = TRUE)) { o - get(n) print(object.size(o), units=Kb) e - environment(o) if (!identical(e,NULL)

Re: [R] memory management

2012-02-28 Thread William Dunlap
You need to walk through the objects, checking for environments on each component or attribute of an object. You also have to look at the parent.env of each environment found. E.g., f - function(n) { + d - data.frame(y = rnorm(n), x = rnorm(n)) + lm(y ~ poly(x, 4), data=d) + } z

Re: [R] Cleaning up messy Excel data

2012-02-28 Thread Stephen Sefick
Just replace that value with zero. If you provide some reproducible code I could probably give you a solution. ?dput good luck, Stephen On 02/28/2012 03:27 PM, Noah Silverman wrote: Unfortunately, some data I need to work with was delivered in a rather messy Excel file. I want to import

[R] group calculations with other columns for the ride

2012-02-28 Thread Ben quant
Hello, I can get the median for each factor, but I'd like another column to go with each factor. The nm column is a long name for the lvls column. So unique work except for the order can get messed up. Example: x =

Re: [R] group calculations with other columns for the ride

2012-02-28 Thread ilai
aggregate(val~lvls+nm,data=x,FUN='median') On Tue, Feb 28, 2012 at 4:43 PM, Ben quant ccqu...@gmail.com wrote: Hello, I can get the median for each factor, but I'd like another column to go with each factor. The nm column is a long name for the lvls column. So unique work except for the

Re: [R] group calculations with other columns for the ride

2012-02-28 Thread Ben quant
Excellent! I wonder why I haven't seen aggregate before. Thanks! ben On Tue, Feb 28, 2012 at 4:51 PM, ilai ke...@math.montana.edu wrote: aggregate(val~lvls+nm,data=x,FUN='median') On Tue, Feb 28, 2012 at 4:43 PM, Ben quant ccqu...@gmail.com wrote: Hello, I can get the median for

Re: [R] Error in read.table(file = file, header = header, sep = sep, quote = quote, : more columns than column names

2012-02-28 Thread R. Michael Weylandt
What is initialCuratedDF? I'm not seeing it in any standard location so there's no way to debug it... Also see inline. Michael On Tue, Feb 28, 2012 at 2:41 PM, Ben Ganzfried ben.ganzfr...@gmail.com wrote: Hey, I just googled my error and many things came up.  I followed the leads and read

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

2012-02-28 Thread knavero
Thanks Gabor. Answering all my noob questions haha. Interesting strategy to adjust the input raw data as opposed to Excel where one offsets the output data instead. I'll remember that. -- View this message in context:

[R] Error: could not find function hier.part

2012-02-28 Thread haiyan
Error: could not find function hier.part things I have tried: 1. reinstall R (lastest version, on windows XP) 2. install package gtools 3. include: library(gtools) require(gtools) 4. how I call this function: hier.part(c$Y, xdata, fam = gaussian, gof = Rsqu) 5.when I try to check what's in the

Re: [R] Installing package QRMlib

2012-02-28 Thread DT54321
Yes, I did. But my Windows did not know what program to open it with... -- View this message in context: http://r.789695.n4.nabble.com/Installing-package-QRMlib-tp4425269p4429275.html Sent from the R help mailing list archive at Nabble.com. __

[R] Installing the package Rcplex

2012-02-28 Thread zheng wei
Hello, I have posted this question earlier and got a lot of helps. Appreciate all those helps. After intensive learning and researching, this is to summurize what I have now. Target: Install the package Rcplex OS: windows 7 64bit The Story: Installed the Rtool, and setted the path to all

Re: [R] indexing??

2012-02-28 Thread helin_susam
Dear Petr Savicky, Actually, this is based on jackknife after bootstrap algorithm. In summary, I have a data set, and I want to compute some values by using this algorithm. Firstly, using bootstrap, I create some bootstrap re-samples. This step O.K. Then, for each data point within these

[R] igraph find the path with the smallest weights

2012-02-28 Thread Wendy
Hi all, I am trying to analyze some graphs in R. Given a weighted directed network with 7 nodes. I want to find a path from node 1 to node 7, so the sum of all the edges on the path is the smallest comparing to all the other paths. I am wondering if I can do this in igraph. After I identify the

[R] Quantile scores as dependent variables.. an R and general method question

2012-02-28 Thread Rob James
I have a dataset that does not include native scores, but only serial quantile rankings for a set of units. Clearly these observations are dependent (in that you can't alter one observation without also altering others). Are there methods for dealing with quantile dependent variables. My atempt

[R] ts.plot and x axes customization

2012-02-28 Thread Jochem Schuster
Dear List, I would be pleased if someone can help me with the following issue: I'm about to plot two time series in one plot via ts.plot which looks like: ts.plot(series1, series2, main=main, xlab=xlab, ylab=ylab, col=c(green, red, blue), lwd=2) The problem is, that R

[R] Database

2012-02-28 Thread Trying To learn again
Hi all, I´m new using Access. I see that many things that you can do on Access you can do on CRAN R but not on contrary. My question is: Is there any manual with examples comparing how to do data base analysis on access and making the same on CRAN R? Imagine I want to compare two columns Name

Re: [R] Error: could not find function hier.part

2012-02-28 Thread R. Michael Weylandt
It would seem that hier.part is not in the gtools packagedo you have some reference that suggests otherwise? I don't know the function, but I might suggest you check the hier.part package (also on CRAN). Michael On Tue, Feb 28, 2012 at 4:27 PM, haiyan tucsonaug...@gmail.com wrote: Error:

Re: [R] Installing package QRMlib

2012-02-28 Thread R. Michael Weylandt
Please quote context. You can open it with any plain text editor. (i.e., notepad) Michael On Tue, Feb 28, 2012 at 2:42 PM, DT54321 deepan.tailo...@gmail.com wrote: Yes, I did. But my Windows did not know what program to open it with... -- View this message in context:

Re: [R] Siegel-Tukey test for equal variability (code)

2012-02-28 Thread Daniel Malter
The previously posted code contains bugs. The code below should work: x: a vector of data y: Group indicator (if id.col=TRUE); data of the second group (if id.col=FALSE). If y is the group indicator it MUST take 0 or 1 to indicate the groups, and x must contain the data for both groups.

Re: [R] Error message: object of type 'closure' is not subsettable

2012-02-28 Thread Aparna Sampath
Hi Josh, Petr I checked that testStatistics is a function but it is not defined in the code anywhere else. But if I am able to remove it and give the input by my own to the function which calls testStatistics, it might work. The hurdle here for me is that the input is a set* of values and each

[R] How to replace the values in a column

2012-02-28 Thread hannahmaohuang
Dear All, I've been searching relevant topics about replacing values, none seemed to be applicable to me... I have a file with many many varieties, and want to replace some of them into different names. I tried various of ways, still don't know how to do that most efficiently.. Here is part of

[R] Using a FOR LOOP to name objects

2012-02-28 Thread michaelyb
Hello, I am trying to use a for loop to name objects in each iteraction. As in the following example (which doesn't work quite well) my_list-c(A,B,C,D,E,F) for(i in c(1:length(my_list))){ url- http://finance.yahoo.com; doc = htmlTreeParse(url, useInternalNodes = T) tab_nodes =

Re: [R] Bayesian Hidden Markov Models

2012-02-28 Thread monkeylan
Dear Oscar,   I am extremely grateful to your help and detailed explanation of the use of RJaCGH package. But, when runing the sample codes you listed, another issue I am a little confused is as following: After runing summary(res), I have got the estimation of the random matrix Beta:

Re: [R] colour by z value, persp in raster package

2012-02-28 Thread Omphalodes Verna
David thanks!   Maybe is better ''orginal'' example from raster package:   r - raster(system.file(external/test.grd, package=raster)) persp(r) class(r)   It is not a problem to colour plot by z value in perspective plot (persp) in package graphic - there is an example in help files:   par(bg =

Re: [R] How to replace the values in a column

2012-02-28 Thread ilai
Hannah, If Gen is a factor you can simply build the new factor on top of it: dataframe$Gen- factor( c('Wynda' , 'A_2' , 'B_1' , 'Wynda' , 'Wynda' , 'OP1_5')[Gen] ) Just make sure the replacement labels are in the same order as levels(Gen). Cheers On Tue, Feb 28, 2012 at 8:39 PM, hannahmaohuang

Re: [R] ts.plot and x axes customization

2012-02-28 Thread ilai
On Tue, Feb 28, 2012 at 12:57 PM, Jochem Schuster jochem.schus...@web.de wrote:   ts.plot(series1, series2, main=main, xlab=xlab, ylab=ylab, col=c(green,   red, blue), lwd=2)   What I've tried before is deleting the X axes via gpars=list(xaxt=n) in   the ts.plot-code. But after that I was

Re: [R] How to replace the values in a column

2012-02-28 Thread andrija djurovic
Hi. You can do something like this: df - read.table(textConnection( GenRep A_1 1 A_1 2 A_2 1 A_2 2 B_1 1 B_1 2 B_3 1 B_3 2 OP1_1 1 OP1_1 2 OP1_5 1 OP1_5 2),header=TRUE,stringsAsFactors=FALSE) str(df) #adding a new column cbind(df,ncol =

[R] SOUTH ACTRESS PHOTOS VIDEOS

2012-02-28 Thread devi
HOT LINKS FOR YOUTH ONLY FOR FAST UPDATES IN FILM INDUSTRY KATRINA KAIF RARE PHOTOS http://allyouwants.blogspot.com/2011/12/katrina-kaif.html KAJAL AGARWAL LATEST STILLS http://allyouwants.blogspot.com/2011/03/kajal-latest-stills.html PRIYANKA CHOPRA

[R] Cannot use negative argument in function

2012-02-28 Thread lidaky
Hi, today i wrote a function in R of the type: index.refraction - function(Temp,Press, RH, CO2) When i try to plug a negative number in Temp, i got this type of error: n - index.refraction(Temp= -40,100,80,CO2) Messages d'avis : 1: In Ops.ordered(left, right) : '-' is not meaningful for

[R] Coverage probability for the normal distribution in plot.spec.coherency function.

2012-02-28 Thread Pascal Oettli
Hello to the members of the list, I am using the 'spectrum' function from 'stats' package, to calculate the squared coherency between two time series. The function 'plot.spec.coherency' provides information for the coverage probability for the normal distribution. It seems that the