Re: [R] Memory(RAM) issues

2011-06-10 Thread Abhisek Saha
Thanks Anupam for your inputs. I believe there are two ways to circumvent the issue...1> making the code more efficient 1> Increasing the memory in some way.The reasons why I did not paste the code are 1> It is long and using quite a number of functions that I created 2> Secondly my intention is n

Re: [R] change value in one cell

2011-06-10 Thread jour4life
That's great! But, I guess I should have provided a better example for my problem. The reason being that I did not consider strings. For instance, in my case, I'm actually trying to add a value to a data frame that looks like this: Obs X 0 NA 1 "01 001" 2 "01 002" 3 "01 003"

Re: [R] running R commands asynchronously

2011-06-10 Thread Prof Brian Ripley
On Fri, 10 Jun 2011, Greg Snow wrote: Tk windows run asynchronous to the rest of R, so you could write a small function that lets you type the command into a Tk window and runs it while you continue to work in the main R, then the window could signal you when the function finishes. That is r

Re: [R] NDCG in R?

2011-06-10 Thread Dennis Murphy
Hi: I couldn't find one by searching with RSiteSearch() or package sos, but it's not hard to write a simple function that reproduces the example on the Wikipedia page: ndcg <- function(x) { # x is a vector of relevance scores ideal_x <- rev(sort(x)) DCG <- function(y) y[1] + sum(y[-1]/log(2

Re: [R] How do I make proper use of the by() function?

2011-06-10 Thread Anupam
You may want to read about several "apply" functions. They may help you do what you are trying. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Fredrik Karlsson Sent: Saturday, June 11, 2011 3:13 AM To: R-Help List Subject: [R] How d

Re: [R] Memory(RAM) issues

2011-06-10 Thread Anupam
It will be helpful on this forum to use metric measures: 12 Lakh is 1.2 million, thus your data is 1.2 million observations x 15 variables. I do not know the intricacies of R. You may have to wait for someone with that knowledge to respond. Including some relevant portions of error messages and co

[R] problems with geom_vline, histograms, scale=free and facets in ggplot

2011-06-10 Thread Julian Burgos
Dear list, I´m having a little trouble with adding vertical lines to a histogram. I need to draw a matrix of histograms (using facets), and in each histogram add a vertical line indicating the mean value of the data in each facet. According to the last example in the geom_hline help, to display

[R] NDCG in R?

2011-06-10 Thread Jim Cheng
Dose R have a function to calculate NDCG? http://en.wikipedia.org/wiki/Discounted_cumulative_gain#Normalized_DCG Thanks! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-proj

Re: [R] R program writing standard/practices

2011-06-10 Thread Rolf Turner
On 11/06/11 03:35, Santosh wrote: Dear Experts, I notice that there are different ways of writing programs. Was wondering if there is anything like a standard which could be used to write good/complete R programs, maintain quality, easy to debug, a standard/practice that can be consistent in an

Re: [R] running R commands asynchronously

2011-06-10 Thread Greg Snow
Tk windows run asynchronous to the rest of R, so you could write a small function that lets you type the command into a Tk window and runs it while you continue to work in the main R, then the window could signal you when the function finishes. -Original Message- From: r-help-boun...@r-

Re: [R] change value in one cell

2011-06-10 Thread jim holtman
you probably need to read the Introduction to R to understand indexing: > x Obs X Y Z 1 1 1 0 1 2 2 0 0 1 3 3 1 1 1 4 4 0 1 1 5 5 1 1 0 6 6 0 0 0 > x[4, "Y"] <- 0 > x Obs X Y Z 1 1 1 0 1 2 2 0 0 1 3 3 1 1 1 4 4 0 0 1 5 5 1 1 0 6 6 0 0 0 On Fri, Jun 10, 2011 at 5:42 PM

[R] Is there an implementation loess with more than 4 parametric predictors or a trick to similar effect?

2011-06-10 Thread Dr. D. P. Kreil (Boku)
Dear R experts, I have a problem that is a related to the question raised in this earlier post https://stat.ethz.ch/pipermail/r-help/2007-January/124064.html My situation is different in that I have only 2 predictors (coordinates x,y) for local regression but a number of global ("parametric")

[R] Memory(RAM) issues

2011-06-10 Thread Abhisek Saha
Dear All, I have been working with R(desktop version) in VISTA. I have the latest version R 2.13.0. I have been working with few data-sets of size 12Lakh * 15 and my code is quite computing intensive ( applying MCMC gibbs sampler on a posterior of 144 variables) that often runs into a memory issue

[R] RES: Linear multivariate regression with Robust error

2011-06-10 Thread Filipe Leme Botelho
--- Begin Message --- Hi Barjesh, I am not sure which data you analyze, but once I had a similar situation and it was a multicolinearity issue. I realized this after finding a huge correlation between the independent variables, then I dropped one of them and signs of slopes made sense. Beforehand

[R] change value in one cell

2011-06-10 Thread jour4life
Hello all, I am wondering if there is a way to change the value of one cell in R. For instance let's say I have a hypothetical data frame that looks like this: Obs X Y Z 11 0 1 20 0 1 31 1 1 40 1 1 51 1 0 60 0 0 I would like to change the value of the 4th observation in t

[R] Help with Median test and Coxon-Mann-Whittney test

2011-06-10 Thread Robert Johnson
Hi All, I have the following dataset (triplicates values of 5 independent measurements and duplicate vaues of a control): 12 3 4 5 C 181.8 58.2 288.9 273.2290.953.9 120.3 116.8108.9 281.3 446 39.6 86.1

Re: [R] Test if data uniformly distributed (newbie)

2011-06-10 Thread Kairavi Bhakta
Thanks for your answer. The reason I want the data to be uniform: It's the first step in a machine learning project I am working on. If I know the data isn't uniformly distributed, then this means there is probably something wrong and the following steps will be biased by the non-uniform input data

Re: [R] Counting the Number of Letters in a row

2011-06-10 Thread Weidong Gu
Is this what you want? sapply(sapply(strsplit(as.character(f1$keyword),' '),nchar),sum) Weidong Gu On Fri, Jun 10, 2011 at 1:25 PM, Jorge Ivan Velez wrote: > Hi Abraham, > > Try > > foo <- function(x){ > x <- as.character(x) >  sapply(strsplit(x, " "), function(s) sum(nchar(s))) > } > foo(f1$key

Re: [R] Linear multivariate regression with Robust error

2011-06-10 Thread Daniel Malter
I am with Michael. It is almost impossible to figure out what you are trying. However, I assume, like Michael, that you regress y on x2 and find, say, a negative effect. But when you regress y on x1 and x2, then you find a positive effect of x2. The short answer to your question is that in this cas

Re: [R] Double x grid in ggplot2

2011-06-10 Thread Dennis Murphy
This toy example works as you seem to expect: library(ggplot2) dat <- data.frame(time = factor(rep(0:59, each = 100), levels = 0:59), error = rnorm(6000)) qplot(time, error, data = dat, size = I(1), main =" title", ylab="Error (min)", xlab="Time before ON (min)", alpha=I(1

[R] How do I make proper use of the by() function?

2011-06-10 Thread Fredrik Karlsson
Dear list, I have a function that uses values from two vectors and spits out one new vector based on all the values of the two original vectors, and with the same length as them. Ok, I would now like to be able to apply that function simply on two columns in a data frame, divided by the levels o

[R] running R commands asynchronously

2011-06-10 Thread Richard M. Heiberger
I am interested in running R commands asynchronously. My first choice is in the same R session that I am currently in. Here, the goal would be to run something like RunAsynchSameSession(myfunction(), "outputname.rda") Once RunAsynchSameSession had started myfunction(), RunAsynchSameSession

Re: [R] 'PROC CONTENTS' = ?

2011-06-10 Thread Frank Harrell
See the contents function in the Hmisc package. karena wrote: > > Is there any function in R which does the same thing as what 'PROC > CONTENTS' does in SAS? > > thanks, > > karena > - Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: htt

Re: [R] Test if data uniformly distributed (newbie)

2011-06-10 Thread Greg Snow
OK, that is not the correct format for the KS test (which is expecting data ranging from 0 to 1 with a fairly flat histogram). You could possibly test this with a Chi-squared test. Can you tell us more about how the numbers you are looking at are generated? The Chi-squared test could be used

Re: [R] Test if data uniformly distributed (newbie)

2011-06-10 Thread Greg Snow
Yes, punif is the function to use, however the KS test (and the others) are based on an assumption of independence, and if you know that your data points sum to 1, then they are not independent (and not uniform if there are more than 2). Also note that these tests only rule out distributions (w

Re: [R] Problem loading packages in R 2.13.0 on Mac

2011-06-10 Thread Berend Hasselman
Adrienne Keller wrote: > > I am having problem loading packages in the newest version of R > (2.13.0) on my Mac. I have tried to install various packages (e.g. > lawstat, Rcmdr, car) and load them using the Package Installer and > Package Manager menu options but I get the follow error: >

Re: [R] Problem loading packages in R 2.13.0 on Mac

2011-06-10 Thread Ethan Brown
Hi Adrienne, I'm not familiar with your interface, but it sounds like R thinks the package "mvtnorm" is not installed. You can see the packages you've installed with: row.names(installed.packages()) Is "mvtnorm" in the output of that command? You could test with the command, "mvtnorm" %in% row.

Re: [R] Plotting NLS profiles

2011-06-10 Thread Sam Stewart
Wow, that's really clever, I didn't know you could manipulate the palette like that. Thanks Dr Ripley, Sam On Fri, Jun 10, 2011 at 3:45 PM, Prof Brian Ripley wrote: > On Fri, 10 Jun 2011, Prof Brian Ripley wrote: > >> On Fri, 10 Jun 2011, R Help wrote: >> >>> Hello list, >>> >>> I'm trying to pl

Re: [R] scatterplot3d - help assign colors based on multiple conditions

2011-06-10 Thread Karthik Kota
Thanks! That did the trick. On Jun 10, 2011, at 3:16 AM, Jim Lemon wrote: > On 06/10/2011 06:40 AM, Karthik Kota wrote: >> Thanks a lot! This is very helpful. >> >> If I have to extend this to one more condition say assign "blue" if both the >> corresponding labels have "_Tongue_dorsum", is t

Re: [R] Plotting NLS profiles

2011-06-10 Thread Prof Brian Ripley
On Fri, 10 Jun 2011, Prof Brian Ripley wrote: On Fri, 10 Jun 2011, R Help wrote: Hello list, I'm trying to plot nls profiles, but the plot.profile.nls function in R doesn't seem to accept any plot.default variables. Specifically, I'd like to be able to change the x-axis title and the colors

Re: [R] Plotting NLS profiles

2011-06-10 Thread Dieter Menne
R Help wrote: > > I'm trying to plot nls profiles, but the plot.profile.nls function in > R doesn't seem to accept any plot.default variables. > Package nlstools has a few nice graphical display methods. Dieter -- View this message in context: http://r.789695.n4.nabble.com/Plotting-NLS-pr

Re: [R] Plotting NLS profiles

2011-06-10 Thread Prof Brian Ripley
On Fri, 10 Jun 2011, R Help wrote: Hello list, I'm trying to plot nls profiles, but the plot.profile.nls function in R doesn't seem to accept any plot.default variables. Specifically, I'd like to be able to change the x-axis title and the colors to black and white. Has anyone had any luck wit

[R] Test if data uniformly distributed (newbie)

2011-06-10 Thread Kairavi Bhakta
Hello, I have a bunch of files containing 300 data points each with values from 0 to 1 which also sum to 1 (I don't think the last element is relevant though). In addition, each data point is annotated as an "a" or a "b". I would like to know in which files (if any) the data is uniformly distrib

Re: [R] R program writing standard/practices

2011-06-10 Thread vioravis
Check this out: http://www1.maths.lth.se/help/R/RCC/ -- View this message in context: http://r.789695.n4.nabble.com/R-program-writing-standard-practices-tp3588716p3588911.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-projec

[R] Problem loading packages in R 2.13.0 on Mac

2011-06-10 Thread Adrienne Keller
I am having problem loading packages in the newest version of R (2.13.0) on my Mac. I have tried to install various packages (e.g. lawstat, Rcmdr, car) and load them using the Package Installer and Package Manager menu options but I get the follow error: > library(lawstat) Loading required

Re: [R] Item analysis

2011-06-10 Thread John Kane
Here are two different ways with your data as the data.frame xx # Basic R aggregate(xx$Tip, list(xx$Time), sum) # Using the rshape package library(reshape2) yy <- melt(xx, id=c("Time"), measure.vars=c("Tip")) dcast(yy , Time ~ variable , sum) --- On Thu, 6/9/11, Trying To learn again wrote:

[R] Double x grid in ggplot2

2011-06-10 Thread James Rome
I am trying to overlay raw data with a boxplot as follows: pp = qplot(factor(time, levels=0:60, ordered=TRUE), error, data=dfsub, size=I(1), main =" title", ylab="Error (min)", xlab="Time before ON (min)", alpha=I(1/10), ylim=c(-30,40),geom="jitter") +

[R] Plotting NLS profiles

2011-06-10 Thread R Help
Hello list, I'm trying to plot nls profiles, but the plot.profile.nls function in R doesn't seem to accept any plot.default variables. Specifically, I'd like to be able to change the x-axis title and the colors to black and white. Has anyone had any luck with this? If not, is there a way to ove

Re: [R] Counting the Number of Letters in a row

2011-06-10 Thread Jorge Ivan Velez
Hi Abraham, Try foo <- function(x){ x <- as.character(x) sapply(strsplit(x, " "), function(s) sum(nchar(s))) } foo(f1$keyword) HTH, Jorge On Fri, Jun 10, 2011 at 12:48 PM, Abraham Mathew <> wrote: > I'm trying to find the total number of letters in a row of a data frame. > > Let's say I have

Re: [R] Counting the Number of Letters in a row

2011-06-10 Thread Ingmar Visser
something like this: sapply(strsplit(as.character( f1$keyword), " "), function(x){sum(nchar(x))}) hth, Ingmar On Fri, Jun 10, 2011 at 6:48 PM, Abraham Mathew wrote: > I'm trying to find the total number of letters in a row of a data frame. > > Let's say I have the following data frame. > > f1 <-

Re: [R] Sorting Data Frame Without Loop

2011-06-10 Thread jim holtman
This will give you the unique gene values: > colA <- c("M-012847-00" ,"M-012847-00" ,"M-015544-00", "M-015544-00", > "M-024202-00","M-024202-00") > colB <- c("NM_057175", "NM_057175", "NM_153008", "NM_153027", "NM_207330", > "NM_207330") > colC <- c( 'NARG1', 'TBDN100', 'FLJ30277', 'FLJ31659', '

Re: [R] Sorting Data Frame Without Loop

2011-06-10 Thread jim holtman
Is this what you want: > colA <- c("M-012847-00" ,"M-012847-00" ,"M-015544-00", "M-015544-00", > "M-024202-00","M-024202-00") > colB <- c("NM_057175", "NM_057175", "NM_153008", "NM_153027", "NM_207330", > "NM_207330") > colC <- c( 'NARG1', 'TBDN100', 'FLJ30277', 'FLJ31659', 'NIPAL1', 'NPAL1') >

[R] Counting the Number of Letters in a row

2011-06-10 Thread Abraham Mathew
I'm trying to find the total number of letters in a row of a data frame. Let's say I have the following data frame. f1 <- data.frame(keyword=c("I live in Denver", I live in Kansas City, MO", "Pizza is good")) The following function gives me the number of characters in each string. So for "I live

Re: [R] How to log-2 transform a matrix

2011-06-10 Thread wcc
CGH<-as.matrix(CGH) mode(CGH)<-"numeric" log2(CGH) -- View this message in context: http://r.789695.n4.nabble.com/How-to-log-2-transform-a-matrix-tp839455p3588441.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org ma

[R] Multilevel pseudo maximum likelihood

2011-06-10 Thread Caterina Giusti
Dear all, I posted this two years ago, getting no answers or suggestions - now I am trying again, hoping something new is available in R. I am interested in an application of linear multilevel model with unequal selection probabilities at both levels. Do you know if there is an R function f

Re: [R] Linear multivariate regression with Robust error

2011-06-10 Thread Mike Marchywka
> Date: Fri, 10 Jun 2011 09:53:20 +0530 > From: bkkoc...@gmail.com > To: r-help@r-project.org > Subject: [R] Linear multivariate regression with Robust error > > Dear all, > > i am doing linear regression with robust error to know the effect of >

[R] Sorting Data Frame Without Loop

2011-06-10 Thread hi Berven
Hello all! I am currently trying to sort a data frame in a particular way, but I am having some difficulties with this. Specifically I want to sort the below dataset in such a way that there is only one line per ProteinID and if there are multiple GeneID or GeneName entries for a single prote

[R] read.graph: vertex labels in GML file?

2011-06-10 Thread Robinson, David G
I can successfully read a GML file using read.graph (e.g. those at http://www-personal.umich.edu/~mejn/netdata/ , the football data set in particular). However, I don't seem to be able to read the vertex labels that are in the GML file; or maybe I am, but I cannot get at them? I suspect I'm not re

Re: [R] giving factor names

2011-06-10 Thread Ethan Brown
Hi Kieran, I'm not very familiar with lattice, but here's a workaround that works for me. Basically, I just created a new data.frame column that was a factor (combo$zf), and forced its levels to be what you're looking for here. require(lattice) x<-c(1,2,3) y<-c(2,4,6) z<-c(0.1,0.5,2) combo<-expa

Re: [R] Linear multivariate regression with Robust error

2011-06-10 Thread Michael Friendly
On 6/10/2011 12:23 AM, Barjesh Kochar wrote: Dear all, i am doing linear regression with robust error to know the effect of a (x) variable on (y)other if i execute the command i found positive trend. But if i check the effect of number of (x.x1,x2,x3)variables on same (y)variable the

[R] R program writing standard/practices

2011-06-10 Thread Santosh
Dear Experts, I notice that there are different ways of writing programs. Was wondering if there is anything like a standard which could be used to write good/complete R programs, maintain quality, easy to debug, a standard/practice that can be consistent in an enterprise environment. Also, are th

Re: [R] ggplot2 avoid automatic color selection

2011-06-10 Thread Ista Zahn
See ?scale_colour_manual Best, Ista On Fri, Jun 10, 2011 at 9:55 AM, Immanuel B wrote: > Hey all, > > I'm trying to replicate some plots with ggplot2. The problem is that I > need to specify the color for every > attribute (drug). If I use the code below the colors get automatically > assigned b

[R] ggplot2 avoid automatic color selection

2011-06-10 Thread Immanuel B
Hey all, I'm trying to replicate some plots with ggplot2. The problem is that I need to specify the color for every attribute (drug). If I use the code below the colors get automatically assigned but I need to plot drug1 in black drug2 in blue etc. How do I do that? q = qplot(days,vol,data = cell

Re: [R] Help on selecting genes showing highest variance

2011-06-10 Thread Juliet Hannah
# Let's say your expression data is in a matrix # named expression in which the rows are genes # and the columns are samples myvars <- apply(expression,1, var,na.rm=TRUE) myvars <- sort(myvars,decreasing=TRUE) myvars <- myvars[1:200] expression <- expression[names(myvars),] dim(expression) Also

Re: [R] Setting up a State Space Model in dlm

2011-06-10 Thread Michael Ash
Thank you.    The new article linked below is excellent. BTW, I have had trouble getting the sample code to run.In particular, there is a variable k that does not appear to be set when it is used at line 227. Here is the line where it is called: fit <- optim(par = rep(0, 2 * k), fn = logLik,

Re: [R] Fwd: package.sk​eleton() does not create 'data' folder

2011-06-10 Thread Duncan Murdoch
On 10/06/2011 9:01 AM, Nipesh Bajaj wrote: Dear all, somebody please look into my problem here? Does it not contain sufficient information? Please let me know how can I post my question more complete. You could try following the posting guidelines, which suggest this question belongs in the R-

[R] Fwd: package.sk​eleton() does not create 'data' folder

2011-06-10 Thread Nipesh Bajaj
Dear all, somebody please look into my problem here? Does it not contain sufficient information? Please let me know how can I post my question more complete. Thanks, -- Forwarded message -- From: Nipesh Bajaj Date: Fri, Jun 10, 2011 at 12:57 AM Subject: package.sk​eleton() does

Re: [R] How to assess the accuracy of fitted logistic regression using glm

2011-06-10 Thread Uwe Ligges
On 10.06.2011 08:54, Xiaobo Gu wrote: Hi Professor Brian, Thanks for your reply. I think there are many statisticians here, and it is somehow R related, hoping someone can help me. I have done a simple test, using a sample csv data which I post if need. donut<- read.csv(file="D:/donut.csv",

Re: [R] gam() (in mgcv) with multiple interactions

2011-06-10 Thread Ben Haller
On Jun 9, 2011, at 11:35 AM, Simon Wood wrote: > I think that the main problem here is that smooths are not constrained to > pass through the origin, so the covariate taking the value zero doesn't > correspond to no effect in the way that you would like it to. Another way of > putting this is t

Re: [R] Logistic Regression

2011-06-10 Thread John Sorkin
First a word of caution: Forward, backward, and stepwise regression analyses are not well received among statisticians. There are many reasons for this. Some of the reasons include: (1) The p value computed at each step is computed ignoring all the previous steps. This can lead to incorrect infe

Re: [R] merge large number of raster objects

2011-06-10 Thread Ben Zaitchik
Thank you Henrik and Rolf. My migraine just disappeared. : ) myobjects = ls(pattern='^RH') dataobj = mget(myTemp,.GlobalEnv) map = Reduce(merge,dataobj) did the trick. do.call() didn't cut it for some reason . . . it returned an " 'x' is missing " error. But Reduce works quite nicely for

[R] Odp: How to subset based on column name that is a number ?

2011-06-10 Thread Petr PIKAL
Hi > [R] How to subset based on column name that is a number ? > > Hi, > > I have a data frame with column names "1", "2", "3", ... and I'd like to extract > a subset based on the values in the first column. None of the methods I tried > worked (below). > > > x <- subset(dframe, 1 = = "My

[R] Odp: what is the mistake?? the coding still not function. no result display

2011-06-10 Thread Petr PIKAL
Hi > > [R] what is the mistake?? the coding still not function. no result display > > #lda.r > > # > > #Author:Amsha Nahid, Jairus Bowne, Gerard Murray > > #Purpose:Perform Linear Discriminant Analysis (LDA) > > # > > #Input:Data matrix as specified in Data-matrix-for

Re: [R] k-nn hierarchical clustering

2011-06-10 Thread Carlos Ortega
Hi, Yes, check for function ann in package "yaImpute". Regards, Carlos Ortega www.qualityexcellence.es On Thu, Jun 9, 2011 at 1:51 PM, Christian Hennig wrote: > Hi there, > > is there any R-function for k-nearest neighbour agglomerative hierarchical > clustering? > By this I mean standard aggl

Re: [R] Logistic Regression

2011-06-10 Thread Frank Harrell
Which statistical principles are you invoking on which to base such analyses? Frank Sergio Della Franca wrote: > > Dear R-Helpers, > > I want to perform a logistic regression on my dataset (y). > > I used the following code: > > logistic<-glm(formula="interest_variable"~.,family = binomial(lin

Re: [R] error with geomap in googleVis

2011-06-10 Thread Mike Marchywka
> Subject: RE: [R] error with geomap in googleVis > Date: Fri, 10 Jun 2011 11:06:47 +0100 > From: markus.gesm...@lloyds.com > To: marchy...@hotmail.com; r-h...@stat.math.ethz.ch > > Hi Mike, > > I believe you are trying to put two charts on the same page.

Re: [R] error with geomap in googleVis

2011-06-10 Thread Gesmann, Markus
Hi Mike, I believe you are trying to put two charts on the same page. The demo(googleVis) provides you with an example for this. So applying the same approach to your data sets would require: library(googleVis) df<-data.frame(foo=c("Brazil","Canada"), bar=c(123,456)) map1<-gvisGeoMap(df,location

Re: [R] Remove Duplicate numbers from a vector through witing set of commands

2011-06-10 Thread Jim Holtman
?duplicated Sent from my iPad On Jun 10, 2011, at 1:22, Z B wrote: > Hi, > > I want to write a set of commands instead of "unique(x)" to remove duplicate > numbers from a vector. > > Would you please help me. I don't know how to compare a vector numbers > together. I am new to R. > > Thanks.

Re: [R] Calculating a mean based on a factor range

2011-06-10 Thread Jim Lemon
On 06/10/2011 08:10 AM, Sam Albers wrote: Hello all, I have been using an instrument that collects a temperature profile of a water column. The instrument records the temperature and depth any time it takes a reading. I was sampling many times at discrete depth rather than a complete profile of

Re: [R] lattice plot query

2011-06-10 Thread Vijayan Padmanabhan
Dear Dennis Thanks for the comments, I read thru the script that was originally created and gathered that the issue was because of the use of index.cond in the xyplot function. I modified the script to drop the index.cond parameter in the function and now it works to give the subject order as i

Re: [R] scatterplot3d - help assign colors based on multiple conditions

2011-06-10 Thread Jim Lemon
On 06/10/2011 06:40 AM, Karthik Kota wrote: Thanks a lot! This is very helpful. If I have to extend this to one more condition say assign "blue" if both the corresponding labels have "_Tongue_dorsum", is there a straight forward function. Doing something like below is overriding the colors ass

Re: [R] merge large number of raster objects

2011-06-10 Thread Rolf Turner
On 10/06/11 14:57, Ben Zaitchik wrote: Hello, I have a large number of raster objects in memory, with names RH100, RH101, RH102, etc. (myobjects <- ls(pattern='^RH')). These rasters are sections of a continuous map, and I would like to combine them using the RasterObject merge tool in package

Re: [R] scatterplot3d - help assign colors based on multiple conditions

2011-06-10 Thread Uwe Ligges
On 09.06.2011 22:40, Karthik Kota wrote: Thanks a lot! This is very helpful. If I have to extend this to one more condition say assign "blue" if both the corresponding labels have "_Tongue_dorsum", is there a straight forward function. Doing something like below is overriding the colors assi

Re: [R] how to convert a vector to an upper matrix

2011-06-10 Thread Berend Hasselman
Zhishi Wang wrote: > > Hi all, > > If I have a vector A<-1:6, I would like to convert A to an upper > matrix M=[0 1 2 3 ; 0 0 4 5 ; 0 0 0 6; 0 0 0 0]. > That is, if the length of the known vector is n, then the order m of > the matrix I'd like to have should satisfy m(m-1)/2=n > How could I do t

Re: [R] Help with plotting plsr loadings

2011-06-10 Thread Bjørn-Helge Mevik
Amit Patel writes: >>plot(BHPLS1, "loadings", comps = 1:2, legendpos = "topleft", labels = >>"numbers", >>xlab = "nm") > > Error in loadingplot.default(x, ...) : > Could not convert variable names to numbers. > > > str(BHPLS1_Loadings) > loadings [1:8892, 1:60] -0.00717 0.00414 0.02611 0.0

Re: [R] Setting up a State Space Model in dlm

2011-06-10 Thread Gavin Simpson
On Tue, 2011-06-07 at 17:24 +0100, Michael Ash wrote: > This question pertains to setting up a model in the package "dlm" > (dynamic linear models, > http://cran.r-project.org/web/packages/dlm/index.html The author of the dlm package has just published a paper on state space models in R including

[R] Remove Duplicate numbers from a vector through witing set of commands

2011-06-10 Thread Z B
Hi, I want to write a set of commands instead of "unique(x)" to remove duplicate numbers from a vector. Would you please help me. I don't know how to compare a vector numbers together. I am new to R. Thanks. [[alternative HTML version deleted]] _