Re: [R] How to delete an entire row, if a specific colum has the value of "#VALUE!"

2011-04-22 Thread David Winsemius
On Apr 22, 2011, at 10:35 PM, empyrean wrote: I am importing CSV data with thousands of rows, if any row contains an error from excel, the whole program crashes, so i need to delete all rows with the value of #VALUE!, all other values are non-numeric... I've tried a bunch of strategies, bu

[R] Using Java methods in R

2011-04-22 Thread hill0093
I just now registered in R forum. I use Windows because of past history of using windows. I have been writing and using programs in java for about a decade. I work with unequal-interval-time-series data files, 1st 5 lines like: Title Line CnYrMoDaHrMnScDCMQ,ColSerTit1,ColSerTit2,ColSerTit3,ColSerTi

[R] How to delete an entire row, if a specific colum has the value of "#VALUE!"

2011-04-22 Thread empyrean
I am importing CSV data with thousands of rows, if any row contains an error from excel, the whole program crashes, so i need to delete all rows with the value of #VALUE!, all other values are non-numeric... I've tried a bunch of strategies, but nothing seems to work. Thanks ahead of time guys,

Re: [R] Problem having tick marks aligned when plotting three graphs on top of one another.

2011-04-22 Thread Jorge Ivan Velez
Hi Dr. Sorkin, One way of doing what you want is via matplot(): with(d, matplot(Slope, d[, -1], type = 'l', lty = 1)) where "d" is your data. HTH, Jorge On Fri, Apr 22, 2011 at 11:55 PM, John Sorkin <> wrote: > R 2.10 > Windows 7 > > I am trying to plot three graphs on top of each other. I n

Re: [R] Problem having tick marks aligned when plotting three graphs on top of one another.

2011-04-22 Thread Jim Holtman
use 'plot' and 'lines' plot(x,y1,ylim=range(c(y1,y2,y3))) lines(x,y2) lines(x,y3) Sent from my iPad On Apr 22, 2011, at 23:55, "John Sorkin" wrote: > R 2.10 > Windows 7 > > I am trying to plot three graphs on top of each other. I need to have the > axises perfectly aligned. For some reason t

Re: [R] Problem having tick marks aligned when plotting three graphs on top of one another.

2011-04-22 Thread Richard M. Heiberger
John, you need ylim for that capability. Rich tmp <- read.table(textConnection(" Slope PctCont PctCat PctTTst 0.05 7.45.6 6.3 0.1017.7 11.313.3 0.1532.7 18.725.6 0.2053.3 27.540.2 0.2572.1 41.254.5 0.3085.5 52.970.8

[R] Problem having tick marks aligned when plotting three graphs on top of one another.

2011-04-22 Thread John Sorkin
R 2.10 Windows 7 I am trying to plot three graphs on top of each other. I need to have the axises perfectly aligned. For some reason the ticks on the y axes are slightly off so they do not perfectly align. Can someone tell me how I can get the to overlay each other perfectly? I thought the yaxp

Re: [R] Convert a presence/ absence matrix to a list of presence only

2011-04-22 Thread jim holtman
try this; added an extra row so that the lengths would not be even: > x <- read.table(textConnection(" spl_A spl_B spl_C + spcs1 1 1 0 + spcs2 1 0 1 + spcs3 0 1 1 + spcs4 0 0 1"), header = TRUE) > closeAllConnections() > x spl

Re: [R] Matching a vector with a matrix row

2011-04-22 Thread Ravi Varadhan
Here is one solution: rowmatch <- function(A,B) { # Rows in A that match the rows in B f <- function(...) paste(..., sep=":") if(!is.matrix(B)) B <- matrix(B, 1, length(B)) a <- do.call("f", as.data.frame(A)) b <- do.call("f", as.data.frame(B)) match(b, a) } A <- matrix(1:1000

Re: [R] Matching a vector with a matrix row

2011-04-22 Thread Luis Felipe Parra
Hello Niels, I am trying to find the rows in Matrix which contain all of the elements in LHS. Thank you Felipe Parra On Fri, Apr 22, 2011 at 10:30 PM, Niels Richard Hansen < niels.r.hansen+li...@math.ku.dk> wrote: > Joshua and Luis > > Neither of you is exactly solving the problem as stated, se

Re: [R] Insert regression coefficients in a graphic.

2011-04-22 Thread David Winsemius
On Apr 22, 2011, at 2:16 PM, JJCV wrote: Hello. I did a graphic with the next code: T=c(10,15,20,25,30) p=c(1003,1005,1010,1011,1014) plot(T, p, xlab=" ",, ylab=" ", pch=1, cex=2, lwd=2, xlim=c(5,30), ylim=c(1000,1015)) abline(lm(p ~ T), lwd=2) lm(p ~ T) I want to see the regression coeffici

Re: [R] statistic Q

2011-04-22 Thread Joshua Wiley
Hi Shatha, There is a function built into the core packages that lets you easily extract coefficients. See the documentation for ?coef For the standard errors, you can extract them from a model object yourself, but that can be a bit of a pain. An alternative is to use se.coef from package "arm".

Re: [R] statistic Q

2011-04-22 Thread David Winsemius
On Apr 22, 2011, at 6:30 PM, Shatha Omar wrote: Dear, i am a student and I need help in comparing between different slopes and finding whther there is a significant difference between them? slope1/slope2 > 1 If TRUE then slope1 is greater. OK. That was facetious. But I hope it highlight

[R] MASS fitdistr call in plyr help!

2011-04-22 Thread Justin Haynes
I have a set of wind speeds read at different locations. The data is a data frame with two columns: site and wind speed. I want to split the data on site and call a function to find the shape and scale parameters of a weibull distribution fit. The end result is a plot with x-axis = shape and y-a

[R] Insert regression coefficients in a graphic.

2011-04-22 Thread JJCV
Hello. I did a graphic with the next code: T=c(10,15,20,25,30) p=c(1003,1005,1010,1011,1014) plot(T, p, xlab=" ",, ylab=" ", pch=1, cex=2, lwd=2, xlim=c(5,30), ylim=c(1000,1015)) abline(lm(p ~ T), lwd=2) lm(p ~ T) I want to see the regression coefficient in the graphic. ¿How can I do that? Than

[R] statistic Q

2011-04-22 Thread Shatha Omar
Dear, i am a student and I need help in comparing between different slopes and finding whther there is a significant difference between them? Thanks a lot [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.e

[R] Convert a presence/ absence matrix to a list of presence only

2011-04-22 Thread antu
this thread (http://r.789695.n4.nabble.com/how-to-combine-presence-only-data-sets-to-one-presence-absence-table-td830140.html ) covered the need for making present list list to a matrix, Now, I ran into an opposite problem. I have a data matrix with 0, 1 on them, what I need now is list of presen

Re: [R] Two Copies of Each Message

2011-04-22 Thread Thomas Lumley
On Sat, Apr 23, 2011 at 12:25 AM, Stephen P Molnar wrote: > I receive two copies of every message posted to this list. > > > > How can I stop this?  I have read the Primary Help web page and searched the > achieves without finding an answer. > Unsubscribe from the list. You will then either rec

Re: [R] indexing list elements with lapply?

2011-04-22 Thread Jorge Ivan Velez
Dear Simon, Try any of the following: sapply(r, function(l) l[,2] / l[1, 2]) lapply(r, function(l) l[,2] / l[1, 2]) HTH, Jorge On Fri, Apr 22, 2011 at 5:52 PM, Simon Kiss <> wrote: > Dear colleagues, > I have a list that looks like what the code below produces. I need a > function to go thr

[R] indexing list elements with lapply?

2011-04-22 Thread Simon Kiss
Dear colleagues, I have a list that looks like what the code below produces. I need a function to go through each list element and work on the second column of each list element (the first column is irrelevant to me...if the proposed function works on the first column as a consequence of a wri

Re: [R] set.seed ( ) function

2011-04-22 Thread Tal Galili
Hello Niel, Thank you for writing this. In my original post I wrapped the word "real" with quotes for just the reason you've mentioned (although I didn't know of Xi'ans post), so I agree with you that I should have instead wrap the sentence with words of caution (instead of merely with quotes).

Re: [R] Parametrized object name in Save statement

2011-04-22 Thread Brian Diggs
On 4/22/2011 12:42 PM, John Dennison wrote: Greetings All, I am looking to write a parametrized Rscript that will accept a variable name(that also is the name of the flat file), transform the data into a data frame and preform various modeling on the structure and save the output and plot of the

Re: [R] convert string to variable

2011-04-22 Thread Uwe Ligges
Please read the R FAQs (Frequently Asked Questions) before posting here as the posting guide asks you to do. Uwe Ligges On 22.04.2011 22:27, André de Boer wrote: Hello, Is it possible to convert a string to a variable? I have a set of names: stocks [1] "ACCELL" "AHOLD" "AJAX"

Re: [R] Parametrized object name in Save statement

2011-04-22 Thread Phil Spector
John - When you have a character string, and you want the R object whose name is contained in that character string, the easiest way to get the object is to use the get() function. So save(get(paste("cart_",args, sep ="")), file = file) would probably do what you want.

[R] convert string to variable

2011-04-22 Thread André de Boer
Hello, Is it possible to convert a string to a variable? I have a set of names: > stocks [1] "ACCELL" "AHOLD" "AJAX""ARCADIS" "BALLAST" "BAM.GROEP" [7] "BESI""BETER.BED" "BINCKBANK.NV""BOSKALIS" "CATE" "CROWN.V.GELDER" And a data frame with stock

Re: [R] Error in png: unable to start png() device

2011-04-22 Thread Patrick McKann
Smug condescension to an admitted newb asking for help is a sign of ... smug condescension. Don't confuse a lack of technical knowledge with laziness or stupidity just because you happen to be technically knowledgable. I was just asking for a little help and maybe a discussion of what could be go

Re: [R] Parametrized object name in Save statement

2011-04-22 Thread John Dennison
I have found the solution. i need to use eval() to execute my text parse like eval(parse(text =as.expression(paste("save(cart_", args, ", file=file)",sep="" I hope this helps someone else. John On Fri, Apr 22, 2011 at 3:42 PM, John Dennison wrote: > Greetings All, > > I am looking to write

[R] Parametrized object name in Save statement

2011-04-22 Thread John Dennison
Greetings All, I am looking to write a parametrized Rscript that will accept a variable name(that also is the name of the flat file), transform the data into a data frame and preform various modeling on the structure and save the output and plot of the model. In this example i am using a rpart dec

Re: [R] applying a function over a matrix 2N x M to produce a matrix N x M

2011-04-22 Thread David Winsemius
On Apr 22, 2011, at 2:38 PM, Richard M. Heiberger wrote: I like David's answer and it can be made much faster. I show three refinements, each faster than the preceding one. Rich > system.time(for (i in 1:1000) + mat[seq(1, nrow(mat), by=2), ]+mat[seq(2, nrow(mat), by=2), ] + ) user syst

Re: [R] Paste problem when looping variable assignments

2011-04-22 Thread Jonathan Daily
The function you are looking for is ?assign. assign(paste(pds_gagehandles[[i]], "_pdswy", sep = ""), ...) For the reverse, in case you are interested, check out ?get. HTH, Jon On Fri, Apr 22, 2011 at 1:49 PM, armstrwa wrote: > One thing I should have mentioned before is that "pds_gagehandles"

Re: [R] Create 2x2 table from summary data and run chi square test.

2011-04-22 Thread Marc Schwartz
On Apr 22, 2011, at 1:37 PM, John Sorkin wrote: > > R 2.12 > windows 7 > > I am summary data that I would like to make into a 2x2 table representing > counts positive vs. negative counts: > 28/289 20/276 > > My table should look something like the following: > > group1 group2 > Posi

Re: [R] applying a function over a matrix 2N x M to produce a matrix N x M

2011-04-22 Thread Richard M. Heiberger
I like David's answer and it can be made much faster. I show three refinements, each faster than the preceding one. Rich > system.time(for (i in 1:1000) + mat[seq(1, nrow(mat), by=2), ]+mat[seq(2, nrow(mat), by=2), ] + ) user system elapsed 0.180.000.19 > > system.time(for (i in

[R] Create 2x2 table from summary data and run chi square test.

2011-04-22 Thread John Sorkin
R 2.12 windows 7 I am summary data that I would like to make into a 2x2 table representing counts positive vs. negative counts: 28/289 20/276 My table should look something like the following: group1 group2 Positive28 20 Negative 289 276 How can a (1) create the 2x2 t

Re: [R] histogram of dates

2011-04-22 Thread Marc Schwartz
On Apr 22, 2011, at 12:31 PM, Terry Therneau wrote: > I can't seem to get a histogram of dates: > > tmt910% R --vanilla > > R version 2.13.0 (2011-04-13) > Copyright (C) 2011 The R Foundation for Statistical Computing > ISBN 3-900051-07-0 > ... >> temp <- as.Date(1:200, origin="1970/01/01") >> r

Re: [R] Paste problem when looping variable assignments

2011-04-22 Thread armstrwa
One thing I should have mentioned before is that "pds_gagehandles" is a character vector that contains the site names that I am interested in. An example of a site name is "saho". So with with the paste function, I am trying to get R to assign a variable with the site name followed by "_potwy".

Re: [R] Can R replicate this data manipulation in SAS?

2011-04-22 Thread peter dalgaard
On Apr 22, 2011, at 18:50 , Douglas Bates wrote: > What about reading a deck of punched cards with the cards statement in > SAS? How do you propose to do that in R? Actually, with the new text= argument to read.table in r-devel, it should be rather easy (given that you can find a card-punc

[R] Paste problem when looping variable assignments

2011-04-22 Thread armstrwa
Hi all, I am attempting to run through a large set of data and sort events by the water year (1 Oct - 30 Sep) in which they occurred. I have no problem doing this for each individual site I am looking at (so my problem is not with most of the code, just one minor thing), but when I try to loop

[R] histogram of dates

2011-04-22 Thread Terry Therneau
I can't seem to get a histogram of dates: tmt910% R --vanilla R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 ... > temp <- as.Date(1:200, origin="1970/01/01") > range(temp) [1] "1970-01-02" "1970-07-20" > hist(temp) Error in .Intern

Re: [R] filling array with functions

2011-04-22 Thread Jerome Asselin
On Fri, 2011-04-22 at 10:02 -0700, derek wrote: > Hello R, > > I would like to find out how to generate array full of functions. I tried it > like this: > > fv=array(,dim=c(1,10)) > V=c(1:10) > for (i in 1:10){ > fv[i]<-function(x)(V[i]-b*a*x) # b, x are constants. > } > > But it returns: > "inc

Re: [R] post-hoc test (glht?) which takes treatment into account not just explanatory variable overall

2011-04-22 Thread Bert Gunter
David: 1. Sounds like you want to test the **interaction** of song type and treatment. 2. Does glht work ( S3 vs S4 class issues) with lmer fits? 3. If it works, does glht give sensible results? (see Doug Bates's discussions on this issue). 4. Probably best to direct all such questions to the

[R] post-hoc test (glht?) which takes treatment into account not just explanatory variable overall

2011-04-22 Thread Ellis, David
Hi R helpers! I have used a glht as a post-hoc test on an lmer with: -2 treatments (A & B) -1 categorical explanatory variable (song type) -1 response variable (latency to respond) I wanted to make comparisons between the categorical variables depending on treatment. At the moment the glht simp

[R] filling array with functions

2011-04-22 Thread derek
Hello R, I would like to find out how to generate array full of functions. I tried it like this: fv=array(,dim=c(1,10)) V=c(1:10) for (i in 1:10){ fv[i]<-function(x)(V[i]-b*a*x) # b, x are constants. } But it returns: "incompatible types (from closure to logical) in subassignment type fix" --

Re: [R] Can R replicate this data manipulation in SAS?

2011-04-22 Thread Gabor Grothendieck
On Fri, Apr 22, 2011 at 11:27 AM, Gabor Grothendieck wrote: > Since this involves time series within each id group I thought it > would be interesting to see if this could be formulated using > zoo series.   The approach is to read it in, and convert it to a long > form by just stacking the start

Re: [R] Can R replicate this data manipulation in SAS?

2011-04-22 Thread Douglas Bates
On Thu, Apr 21, 2011 at 5:34 PM, peter dalgaard wrote: > > On Apr 21, 2011, at 16:00 , Bert Gunter wrote: > >> Folks: >> >> It is perhaps worth noting that this is probably  a Type III error: right >> answer to the wrong question. The right question would be: what data >> structures and analysis s

Re: [R] Two Copies of Each Message

2011-04-22 Thread Greg Snow
Do you have 2 e-mail addresses (or 2 versions of your email address) subscribed to the list? -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounce

[R] avoiding if-then statements for looped chi-square tests

2011-04-22 Thread Louis Plough
Hi, I am trying to test for pairwise associations between genotypes ( Rows=individuals, Columns =genes, data are up to 4 genotypes per gene, some with 2,3 or 4) where each chisquare comparison is different depending on the genes tested. The test is the observed multilocus (across columns for each

Re: [R] trends regarding memory limitations for R use under Linux

2011-04-22 Thread Uwe Ligges
On 22.04.2011 18:17, Christine SINOQUET wrote: Hello, I am aware of possibilities to extend memory, for the R language, under Windows. Since I read it is not the case under Linux, I would like to know up to which size R can handle matrices. > The RAM limitation of my PC is 4 G0. Then a c

Re: [R] applying a function over a matrix 2N x M to produce a matrix N x M

2011-04-22 Thread David Winsemius
On Apr 22, 2011, at 12:13 PM, Christine SINOQUET wrote: Hello, mat1 only consists of 0s and 1s: 0 0 1 0 0 0 1 1 0 1 1 0 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 0 0 0 1 0 1 0 1 N = 3 M = 6 I would like to "compress" mat1 every two rows, applying summation over the two rows (per column), at each ste

Re: [R] Error in png: unable to start png() device

2011-04-22 Thread David Winsemius
>  I post using html because that is the only way I know > how, that is, I send an email to r-help@r-project.org. This message was sent from gmail. It is trivial to do so. Failing to look around the interface is just a sign of failing to look around. Notice there is no html mail deleted mes

Re: [R] Reading a TIFF file

2011-04-22 Thread Julio Rojas
Dear Uwe, find attached an small portion of the file I'm working with. ArcGIS values for this file are in the CSV file. They are a vector of all rows put together. Thanks and regards. --- El vie, 4/22/11, Uwe Ligges escribió: > De: Uwe Ligges > Asunto: Re: [R] Reading a TIFF file > A: "Juli

[R] trends regarding memory limitations for R use under Linux

2011-04-22 Thread Christine SINOQUET
Hello, I am aware of possibilities to extend memory, for the R language, under Windows. Since I read it is not the case under Linux, I would like to know up to which size R can handle matrices. The RAM limitation of my PC is 4 G0. I thank you in advance for any indication on the subject.

[R] applying a function over a matrix 2N x M to produce a matrix N x M

2011-04-22 Thread Christine SINOQUET
Hello, mat1 only consists of 0s and 1s: 0 0 1 0 0 0 1 1 0 1 1 0 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 0 0 0 1 0 1 0 1 N = 3 M = 6 I would like to "compress" mat1 every two rows, applying summation over the two rows (per column), at each step, to yield: mat2 1 1 1 1 1 0 1 2 2 0 1 1 1 1 0 2 0 1 The

Re: [R] Can R replicate this data manipulation in SAS?

2011-04-22 Thread Gabor Grothendieck
Since this involves time series within each id group I thought it would be interesting to see if this could be formulated using zoo series. The approach is to read it in, and convert it to a long form by just stacking the start and stop times in a data frame and converting that to zoo using the c

Re: [R] writing/appending a text file

2011-04-22 Thread jim holtman
Collect the results in an object via 'cbind' and then write out the results at the end of the test. You did not mention how large these vectors were. You can 'append' to the end of the file, but you can not add more columns to an existing file without reading it in, 'cbind'ing and the writing it

Re: [R] writing/appending a text file

2011-04-22 Thread David Winsemius
On Apr 22, 2011, at 8:40 AM, PBFrance wrote: Hello I'm fairly new to R. I have a script which produces a 1-column vector (numeric). I can write it to a text file using the write command. What I want to do is to run the script a number of times on different input files, producing a differen

Re: [R] Can R replicate this data manipulation in SAS?

2011-04-22 Thread Ista Zahn
Hi Paul, On Fri, Apr 22, 2011 at 10:21 AM, Paul Miller wrote: > > Hello Everyone, > > It seems to me that Bert’s assertion about my question is not entirely > accurate. > > In my question, I wrote: > > I'm hearing in some places that R may not be able to accomplish all of the > data manipulatio

Re: [R] How to generate normal mixture random variables with given covariance function

2011-04-22 Thread Giovanni Petris
On Fri, 2011-04-22 at 09:59 -0400, Chee Chen wrote: > Dear All, > Suppose Z_i, i=1,...,m are marginally identically distributed as a two > normal mixture p0*N(0,1) + (1-p0) *N( miu_i, 1) where miu_i are > identically distributed according to a mixture and I have generated > Z_i one by one . > >

[R] Survival analysis: same subject with multiple treatments and experience multiple events

2011-04-22 Thread Qian Liu
Hi there, I need some help to figure out what is the proper model in survival analysis for my data. Subjects were randomized to 3 treatments in trial 1, some of them experience the event during the trial; After period of time those subjects were randomized to 3 treatments again in trial 2, but dif

[R] combining from two samples with restrictions

2011-04-22 Thread Rujealous
hello again, I have two sets of data, 1 = {A, B, C, D, E} and 2 = {F, G, H, I, J), and the figure is the same personof the the figure F , B is the same that G and so on until E = J. So I have to make about 200 combinations with two pictures of each group, forming a new group of four elements, wit

[R] writing/appending a text file

2011-04-22 Thread PBFrance
Hello I'm fairly new to R. I have a script which produces a 1-column vector (numeric). I can write it to a text file using the write command. What I want to do is to run the script a number of times on different input files, producing a different 1-column vector each time and save all the vectors

Re: [R] SPDEP Package, neighbours list for Moran's I on large grid dataset

2011-04-22 Thread Ben Haller
On Apr 22, 2011, at 2:07 AM, Laurent Jégou wrote: > Hello, thank you very much for this solution, i'll try to adapt it to my > problem, i think i'll be able to. Great! > By the way, i wrote about a "sliding-window" weight matrix, it's an > expression used in satellite images processing, esp.

Re: [R] all combinations with replacement

2011-04-22 Thread William Dunlap
Does the following do what you want? It should generate all the (unordered) NPart-partitions of Sum by mapping the output of combn(Sum+NParts-1,NParts-1). f <- function (Sum, NParts) { cm <- combn(Sum + NParts - 1, NParts - 1) cm <- rbind(cm, Sum + NParts) if (NParts > 1) {

Re: [R] set.seed ( ) function

2011-04-22 Thread Niels Richard Hansen
Tal Let me express some concern about using words like "true" or "real" in relation to random number generation - for exactly the same reasons as mentioned here: http://xianblog.wordpress.com/2010/09/07/truly-random/ Device random number generators (whether provided via web-services or not) sh

Re: [R] Matching a vector with a matrix row

2011-04-22 Thread Niels Richard Hansen
Joshua and Luis Neither of you is exactly solving the problem as stated, see below. Luis, could you clarify if you want rows that are _equal_ to a vector or rows with entries _contained_ in a vector? If m <- matrix(c("A", "B", "C", "B", "A", "A"), 3, 2) LHS <- c("A", "B") then LHS equals the f

Re: [R] Reading a TIFF file

2011-04-22 Thread Uwe Ligges
On 22.04.2011 16:19, Julio Rojas wrote: Thanks Uwe. I totally understood the problem. BTW, in your code you forgot to define "reduce". Can you define it in the function? Just see how I modified the function, you can do so as well. If the file has different minimum as well as maximum level

Re: [R] ggplot

2011-04-22 Thread Ista Zahn
Hi Alaios, I don't see how the error message could be any clearer. You must specify the labels for geom_text. Best, Ista On Fri, Apr 22, 2011 at 7:27 AM, Alaios wrote: > Hello everyone, > > I am using ggplot > > to plot but I am getting the following error which I do not understand > > Error: ge

Re: [R] Reading a TIFF file

2011-04-22 Thread Julio Rojas
Thanks Uwe. I totally understood the problem. BTW, in your code you forgot to define "reduce". Can you define it in the function? If the file has different minimum as well as maximum levels from this one, will it work? Regards. Julio --- El vie, 4/22/11, Uwe Ligges escribió: > De: Uwe Ligge

Re: [R] Error in png: unable to start png() device

2011-04-22 Thread Patrick McKann
Uwe, I didn't include reproducible code because I don't think it will be reproduced on somebody else's machine. Like I said, I can use the png function with impunity on one machine, but not on the other. So I am assuming it is a computer error, and a very weird one at that. I just posted it here

[R] How to generate normal mixture random variables with given covariance function

2011-04-22 Thread Chee Chen
Dear All, Suppose Z_i, i=1,...,m are marginally identically distributed as a two normal mixture p0*N(0,1) + (1-p0) *N( miu_i, 1) where miu_i are identically distributed according to a mixture and I have generated Z_i one by one . Now suppose these m random variables are jointly m-dimensional

Re: [R] Reading a TIFF file

2011-04-22 Thread Uwe Ligges
Fine, looking at the code shows that readTiff read the image with using libtiff which should be fine. Afterwards, a pixmap obnject is generated via pixmapRGB() which includes the following lines: datamax <- max(data) datamin <- min(data) data <- as.numeric(data) if (datamax > 1

Re: [R] Pattern match

2011-04-22 Thread neetika nath
Thank you so much. On Fri, Apr 22, 2011 at 1:29 PM, David Winsemius wrote: > > On Apr 22, 2011, at 6:42 AM, neetika nath wrote: > > > Thank you for your message. please see attach file for the template/test > dataset of my file. > > > On Thu, Apr 21, 2011 at 1:30 PM, David Winsemius > wrote: > >

Re: [R] Image as a vector of values

2011-04-22 Thread Uwe Ligges
On 22.04.2011 13:16, Jim Lemon wrote: On 04/22/2011 06:45 PM, piravi wrote: hi:) An image may be viewed as a vector of pixels where the value of each entry in the vector is the grayscale value of the corresponding pixel. How can I do this using R project? Hi Piravi, image (graphics) or colo

Re: [R] Odp: ploting continuos function

2011-04-22 Thread derek
Nice. Thank you -- View this message in context: http://r.789695.n4.nabble.com/ploting-continuos-function-tp3467533p3467816.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/

Re: [R] Pattern match

2011-04-22 Thread David Winsemius
On Apr 22, 2011, at 6:42 AM, neetika nath wrote: > > Thank you for your message. please see attach file for the template/ > test dataset of my file. > > > On Thu, Apr 21, 2011 at 1:30 PM, David Winsemius > wrote: > > On Apr 21, 2011, at 5:27 AM, neetika nath wrote: > > Thank you Dennis, > > yes

[R] Two Copies of Each Message

2011-04-22 Thread Stephen P Molnar
I receive two copies of every message posted to this list. How can I stop this? I have read the Primary Help web page and searched the achieves without finding an answer. Thanks in advance. Stephen P. Molnar, Ph.D. Life is a fuzzy set Foundatio

[R] ggplot

2011-04-22 Thread Alaios
Hello everyone, I am using ggplot to plot but I am getting the following error which I do not understand Error: geom_text requires the following missing aesthetics: label My code is dimx<-256 library(ggplot2) dev.new() xandy<-expand.grid(seq(1:dimx),seq(1:dimy)) xx<-data.frame(xandy

[R] Odp: ploting continuos function

2011-04-22 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 22.04.2011 09:19:19: > Hello R, > > I would like to plot continuos function (e.g. y=x^2) without creating a > sequence for x. > Is there a possibility to somehow specify the range - x belongs to > <-100,100>? Something like curve(x^2, -100,100) Mayb

Re: [R] Image as a vector of values

2011-04-22 Thread Jim Lemon
On 04/22/2011 06:45 PM, piravi wrote: hi:) An image may be viewed as a vector of pixels where the value of each entry in the vector is the grayscale value of the corresponding pixel. How can I do this using R project? Hi Piravi, image (graphics) or color2D.matplot (plotrix) Jim _

[R] Image as a vector of values

2011-04-22 Thread piravi
hi:) An image may be viewed as a vector of pixels where the value of each entry in the vector is the grayscale value of the corresponding pixel. How can I do this using R project? Best regards for your support. Piravi -- View this message in context: http://r.789695.n4.nabble.com/Image-as-a-v

Re: [R] How to answer the question about transitive correlation?

2011-04-22 Thread Mike Marchywka
> Date: Fri, 22 Apr 2011 11:42:59 +0800 > From: mailzhu...@gmail.com > To: r-help@r-project.org > Subject: [R] How to answer the question about transitive correlation? > > Hi, everyone. I know it may be a basic statistical question. But I can't > f

[R] ploting continuos function

2011-04-22 Thread derek
Hello R, I would like to plot continuos function (e.g. y=x^2) without creating a sequence for x. Is there a possibility to somehow specify the range - x belongs to <-100,100>? -- View this message in context: http://r.789695.n4.nabble.com/ploting-continuos-function-tp3467533p3467533.html Sent fr

Re: [R] Pattern match

2011-04-22 Thread neetika nath
Thank you for your message. please see attach file for the template/test dataset of my file. On Thu, Apr 21, 2011 at 1:30 PM, David Winsemius wrote: > > On Apr 21, 2011, at 5:27 AM, neetika nath wrote: > > Thank you Dennis, >> >> yes the problem is the input file. i have .rdf file and the forma

Re: [R] Reading a TIFF file

2011-04-22 Thread Uwe Ligges
Unless you can provide a small reproducible example (say a very small tiff including the values you got from the non-R software) it will be hard to tell what is going on. Uwe Ligges On 22.04.2011 11:23, Julio Rojas wrote: Dear all, I have been trying to speed up a process we have been done i

Re: [R] How to answer the question about transitive correlation?

2011-04-22 Thread Uwe Ligges
On 22.04.2011 05:42, zhu yao wrote: Hi, everyone. I know it may be a basic statistical question. But I can't find a good answer. I have a question raised by one of the reviewers. Factor A expression was strongly correlated with B expression (chi-square) in this series. Prior reports by the sam

Re: [R] Rearranging PCA results from R

2011-04-22 Thread Uwe Ligges
On 22.04.2011 00:36, psycrcyo wrote: Hi!! I'm having trouble selecting 10 out of 41 attributes of the KDD data set. In order to identify the components with the higher variance I'm using princomp. the result i get for summary(pca1) is: Actually you calculated the first 10 principal components.

Re: [R] Dual colour ramps based on pos/neg values

2011-04-22 Thread Achim Zeileis
On Fri, 22 Apr 2011, Jim Lemon wrote: On 04/22/2011 12:48 PM, Tyler Hayes wrote: Hi Everyone: I'm going a little nuts here and am hoping someone might have some ideas to help out. Here is my problem: I am using the calendarHeatMap function (http://blog.revolutionanalytics.com/2009/11/charting

Re: [R] 'Structure' compatible between Matlab and R

2011-04-22 Thread Uwe Ligges
Package R-matlab may be a good point to start: it allows to read Matlab structures from files and connections. Uwe Ligges On 21.04.2011 23:15, Alaios wrote: Dear all, I would like to store some data in a such way that I can import and export the data from matlab to R (And vice versa). I hav

Re: [R] Package check issue: Rprofile.site is not used

2011-04-22 Thread Uwe Ligges
See ?Startup: ‘R CMD check’ and ‘R CMD build’ do not always read the standard startup files, but they do always read specific ‘Renviron’ files such as ‘~/.R/check.Renviron’, ‘~/.R/build.Renviron’ or sub-architecture-specific versions. Uwe Ligges On 21.04.2011 22:48, Sébastien

Re: [R] Error in png: unable to start png() device

2011-04-22 Thread Uwe Ligges
On 21.04.2011 22:32, Patrick McKann wrote: I don't know if anyone is reading this, but I have more information now. I can run the same script on my other computer over and over, change the height, width and res, and it works every time. But on the faulty computer, I can open R, open the script,

Re: [R] Dual colour ramps based on pos/neg values

2011-04-22 Thread Jim Lemon
On 04/22/2011 12:48 PM, Tyler Hayes wrote: Hi Everyone: I'm going a little nuts here and am hoping someone might have some ideas to help out. Here is my problem: I am using the calendarHeatMap function (http://blog.revolutionanalytics.com/2009/11/charting-time-series-as-calendar-heat-maps-in-r.

[R] Reading a TIFF file

2011-04-22 Thread Julio Rojas
Dear all, I have been trying to speed up a process we have been done in ArcGIS. We have to read a single layer TIFF (monochrome image) in . For this, I have used the "rtiff" package. After reading the TIFF file, I compared the raw values for each pixel that I have in ArcGIS to the ones obtained

Re: [R] What does the "<<-" operator mean?

2011-04-22 Thread Rolf Turner
On 22/04/11 17:53, Liviu Andronic wrote: On Thu, Apr 21, 2011 at 9:59 PM, Thomas Lumley wrote: The Evil and Wrong use is to modify variables in the global environment. I'm a bit at a loss. Why is it so wrong and evil? Because there is extreme danger of accidentally overwriting objects in you

Re: [R] set.seed ( ) function

2011-04-22 Thread Tal Galili
BTW, Ken Kleinman recently wrote a post on how to get a "real" random numbers (into R) from a web-service: http://www.r-bloggers.com/example-8-35-grab-true-not-pseudo-random-numbers-passing-api-urls-to-functions-or-macros/

Re: [R] SPDEP Package, neighbours list for Moran's I on large grid dataset

2011-04-22 Thread Laurent Jégou
Hello, thank you very much for this solution, i'll try to adapt it to my problem, i think i'll be able to. By the way, i wrote about a "sliding-window" weight matrix, it's an expression used in satellite images processing, esp. convolution filters, meaning that the main matrix is not confronted to