Re: [R] Fisher test problem

2009-03-21 Thread Viju Moses
As you say, I guess that's not possible. Meanwhile I've got R's results verified in Stata . tabi 17 6 \ 2 1, chi2 exact | col row | 1 2 | Total ---+--+-- 1 |17 6 |23 2 |

Re: [R] data analysis. R

2009-03-21 Thread Dylan Beaudette
On Sat, Mar 21, 2009 at 5:13 PM, UBC wrote: > > so i am having this question > what should i do if the give data file (.txt) has 4 columns, but different > lengths? > how can i read them in R? > any idea for the following problem? > > > Gas consumption (1000 cubic feet) was measured before and aft

Re: [R] data analysis. R

2009-03-21 Thread Gabor Grothendieck
This works with the example. If the real data is different it may not work. To run the example below just copy and paste it into R. To run with the real data replace textConnection(Lines) with "insulation.txt" everywhere. Lines <- "Before insulAfter insul. tempgas tempgas -0.8

Re: [R] Fisher test problem

2009-03-21 Thread markleeds
Thanks berwin. See what I sent to Ben. I better start looking up my stat textbooks or going back to class before I start using stat terms. You guys are on top of things . On Sat, Mar 21, 2009 at 10:50 PM, Berwin A Turlach wrote: G'day Mark, On Sat, 21 Mar 2009 22:08:21 -0500 (CDT) mar

Re: [R] Fisher test problem

2009-03-21 Thread markleeds
thanks ben: i think my example makes sense but my terminology of one tailed two tailed was wrong or flipped or whatever. in fact, that's why i gave the example. i wasn't remembering the terminology because it's been too long since i stepped in a classroom ( 8 years ). On Sat, Mar 21, 2009 at

Re: [R] Percentage variance

2009-03-21 Thread jim holtman
One that you could write yourself: percVar <- function(init, final) (final - init) / init * 100 On Sat, Mar 21, 2009 at 9:43 PM, Hadil Eshtayah wrote: > Dear Members, > > Simple questions, I am a beginner with R.  What is the function for > percentage variance? A function that replaces: (final

Re: [R] Fisher test problem

2009-03-21 Thread Ben Bolker
verizon.net> writes: > > by definition, the one tailed p-value has to be <= 0.5 so there is > still something wrong with your OpenEpi calc. Most likely it's > calculating the > 2 tailed p-value and then mistakenly multiplying by 2. For example: For what it's worth, Fisher's exact test w

Re: [R] data analysis. R

2009-03-21 Thread jim holtman
If the input file has a separator other than a space (e.g., tabs or commas) then you can read it is and the missing data will be NAs and you can decide how to handle it. If it does not have a separator, then maybe you can read it in with read.fwf. Otherwise when you read it in, you can tell the s

[R] Percentage variance

2009-03-21 Thread Hadil Eshtayah
Dear Members, Simple questions, I am a beginner with R. What is the function for percentage variance? A function that replaces: (final value-Initial value/Initial value)*100 Thank You. H. __ [[alternative HTML

Re: [R] Fisher test problem

2009-03-21 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of C.H. > Sent: Saturday, March 21, 2009 7:07 PM > To: r-help@r-project.org > Subject: Re: [R] Fisher test problem > > I tried the OpenEpi, the p-value of 1.25 is due to the fact th

[R] data analysis. R

2009-03-21 Thread UBC
so i am having this question what should i do if the give data file (.txt) has 4 columns, but different lengths? how can i read them in R? any idea for the following problem? Gas consumption (1000 cubic feet) was measured before and after insulation was put into a house. We are interested in loo

Re: [R] Fisher test problem

2009-03-21 Thread markleeds
by definition, the one tailed p-value has to be <= 0.5 so there is still something wrong with your OpenEpi calc. Most likely it's calculating the 2 tailed p-value and then mistakenly multiplying by 2. For example: A) Suppose you are testing Ho: u = u_0

Re: [R] package "sowas"

2009-03-21 Thread stephen sefick
You must go to his website because it is not on CRAN. I have built it on mac osx by installing it with R CMD install. This should work on other unix platforms. Stephen Sefick On Sat, Mar 21, 2009 at 9:26 PM, wrote: > I cannot find sowas package by Douglas Mauran in CRAN packages list- > On wh

Re: [R] macro in a loop

2009-03-21 Thread Le Wang
Thank you all for the help! Le On Sat, Mar 21, 2009 at 4:23 PM, Pankaj Chopra wrote: > data.year[j] <- > read.table(paste("c:/data/",year[j],".csv",sep=''),header=T,sep=",") > > > should do it. > > > > Le Wang wrote: >> >> Hi there, >> >> Thanks for your time in advance. >> >> I am trying to rea

Re: [R] Fisher test problem

2009-03-21 Thread C.H.
I tried the OpenEpi, the p-value of 1.25 is due to the fact that the one tailed p-value is 0.62. The two tailed p-value then is 0.62 * 2 = 1.25. OpenEpi is not clever enough to ceiling the p-value to 1. CH On Sun, Mar 22, 2009 at 3:43 AM, David Winsemius wrote: > Let me ask you: What degree of c

Re: [R] Plot and Boxplot in the same graph

2009-03-21 Thread JiHO
On 2009-March-20 , at 23:02 , johnhj wrote: Is it possible, to use the plot() funktion and the boxplot() funktion together ? I will plot a simple graph and additionally to the graph on certain places boxplots. I have imagined to plot the graph a little bit transparency and show in the same

Re: [R] plotting two variables with a third used for color

2009-03-21 Thread JiHO
On 2009-March-20 , at 16:23 , David Winsemius wrote: On Mar 20, 2009, at 3:55 PM, Altaweel, Mark R. wrote: I have a problem where I have two columns of data that I can simply plot using: plot(wV[0:15,3],wY[0:15,3]). Perhaps: plot(wV[0:15,3],wY[0:15,3], col = ifelse(wY[0:15,3]>0, "blue","

[R] package "sowas"

2009-03-21 Thread mauede
I cannot find sowas package by Douglas Mauran in CRAN packages list- On which platforms does sowas run ? Has anybody used such a package at all ? hHank you very much, Maura tutti i telefonini TIM! [[alternative HTML version deleted]] __ R-h

Re: [R] Problem with zoo and rbind() converting matrix to vector

2009-03-21 Thread Ken-JP
Hi Achim, That was a very quick reply/fix that got posted in between my reading and my response. I have downloaded your fix from: svn checkout svn://r-forge.r-project.org/svnroot/zoo for the HEAD revision and confirmed that it works as expected - I tested using the code I posted in the first m

Re: [R] Problem with zoo and rbind() converting matrix to vector

2009-03-21 Thread Ken-JP
Thank you for your reply, but I am still confused. Let me clarify... ...my problem isn't with zoo-ness per se. With zoo objects, there appears to be zoo-matrices and zoo-vectors. My problem is this - I start with a zoo-matrix: > x <- m[1,,drop=FALSE] > x inp 2003-02-01 5 > is.matr

Re: [R] Fisher test accuracy in doubt

2009-03-21 Thread hadley wickham
On Sat, Mar 21, 2009 at 2:03 PM, joker77 wrote: > > Hi, I noted a discrepancy between R and openepi when I ran a fisher test with > the same matrix. In R: > >> a=matrix(c(1,2,6,17), nrow=2) >> a >     [,1] [,2] > [1,]    1    6 > [2,]    2   17 >> fisher.test(a, conf.int=T) > >        Fisher's Exa

Re: [R] Problem with zoo and rbind() converting matrix to vector

2009-03-21 Thread Achim Zeileis
On Sat, 21 Mar 2009, Ken-JP wrote: require( zoo ) inp <- c( 5, 9, 4, 2, 1 ); m <- zoo( cbind( inp ), as.Date("2003-02-01") + (0:(length(inp)-1))); dim( m ) # [1] 5 1 dim( m[1,,drop=FALSE] ) # [1] 1 1 - ok dim( lag( m, -1 )) # [1] 4 1 - ok dim( rbind( m[1,,drop=FALSE], lag(m,-1) )) # NULL - c

Re: [R] bargraph.CI change se for sd

2009-03-21 Thread David Winsemius
> library(sciplot) > bargraph.CI(peptide, surface, group=adjunct,data = y) Error in eval(substitute(subset), envir = data) : object "y" not found #groan, ... why can't people offer a workable example? > data(ToothGrowth) # se as default > bargraph.CI(x.factor = dose, response = len, data = To

[R] Fisher test accuracy in doubt

2009-03-21 Thread joker77
Hi, I noted a discrepancy between R and openepi when I ran a fisher test with the same matrix. In R: > a=matrix(c(1,2,6,17), nrow=2) > a [,1] [,2] [1,]16 [2,]2 17 > fisher.test(a, conf.int=T) Fisher's Exact Test for Count Data data: a p-value = 1 alternative hypoth

Re: [R] bargraph.CI change se for sd

2009-03-21 Thread herwig
Sorry about forgetting that. Package "sciplot" Simple example code: This code plots the standard error on the bars; I would like to replace that by the standard deviation bargraph.CI(peptide, surface, group=adjunct,data = y) David Winsemius wrote: > > Package name? > Example code? > > --

Re: [R] factor with numeric names

2009-03-21 Thread Tal Galili
Hi Saiwing, If all you are asking is how to rename a factor vector, the easiest way would be to use: levels(Loblolly$Seed) <- c( a vector of level names you would like to use for the factor - separated by commas) If you are asking how to make your output look better, I am not sure I have an idea (

[R] for transfer function model

2009-03-21 Thread J C
hi i need to use R to make a transfer function model. i searched online for so long for a code. there is no result. anyone help would be appreciated. altho the best situation is that if anyone has done the same kind of work b4? if yes, pls upload ur work as an example. bill

[R] replying to old thread

2009-03-21 Thread joseph . g . boyer
If you come across an archived thread that you would like to reply to, how do you reply to it without starting a new thread? Joe Boyer Statistical Sciences Renaissance Bldg 510, 3233-D Mail Stop RN0320 8-275-3661 cell: (610) 209-8531 [[alternative HTML version deleted]] ___

Re: [R] factor with numeric names

2009-03-21 Thread John Fox
Dear Saiwing Yeung, You appear to be using orthogonal-polynomial contrasts (generated by contr.poly) for Seed, which suggests that Seed is either an ordered factor or that you've assigned these contrasts to it. Because Seed has 14 levels, you end up fitting an degree-13 polynomial. If Seed is inde

Re: [R] macro in a loop

2009-03-21 Thread jim holtman
COnsider the use of a 'list': dataYear <- lapply(c(1940, 1950, 1960), function(.file){ read.table(paste("c:/data/", .file, '.csv', sep=''), header=TRUE, sep=',') }) The you can access your data: dataYear[['1940']] or dataYear$"1940" On Sat, Mar 21, 2009 at 3:53 PM, Le Wang wrote: > Hi th

[R] factor with numeric names

2009-03-21 Thread Saiwing Yeung
Hi all, I have a pretty basic question about categorical variables but I can't seem to be able to find answer so I am hoping someone here can help. I found that if the factor names are all in numbers, fitting the model in lm would return labels that are not very recognizable. # Example: l

Re: [R] Looking for program for sample size determination

2009-03-21 Thread David Winsemius
The MBESS package has many sample size functions. Hmisc has bpower and cpower . The pwr package has some simple power functions. ss.fromdata.pois {package::ssanv} asypow package I worry that beginners in statistics will get their hands on some package or function that gives them a pleasing

Re: [R] macro in a loop

2009-03-21 Thread Pankaj Chopra
data.year[j] <- read.table(paste("c:/data/",year[j],".csv",sep=''),header=T,sep=",") should do it. Le Wang wrote: Hi there, Thanks for your time in advance. I am trying to read in multiple files. For example, data.1940 <- read.table("c:/data/1940.csv",header=TRUE,sep=",") data.1950 <-

[R] Looking for program for sample size determination

2009-03-21 Thread Qianfeng Li
we have some initial data from our field sampling. From the means and variances, we see your sampling field is much heterogeneous (not uniform). We are looking for a "R" program for sampling size determination. Right now, we are not good enough to write a whole "R" program, so please help.

Re: [R] macro in a loop

2009-03-21 Thread Gabor Grothendieck
R does not directly support macros and I don't think that that is what you meant. Also we probably want to put the data frames in a list so we can easily operate over all of them later. (If these are time series also see read.zoo in the zoo package.) setwd("c:/data") filenames <- paste(year, "cs

Re: [R] macro in a loop

2009-03-21 Thread David Winsemius
Sorry. Not sure what you mean by macro not " protected." ?paste ?assign Perhaps: > filelist <- paste("c:\\data\\", year,".csv", sep="") > filelist [1] "c:\\data\\1940.csv" "c:\\data\\1950.csv" "c:\\data\\1960.csv" for (i in filelist) { assign( paste("data.", year[i], sep="") ,

Re: [R] macro in a loop

2009-03-21 Thread Jorge Ivan Velez
Hi again, My bad. Below solution had a typo :(Here is the "correct" one: year<-c(1940,1950,1960) for (i in y) assign(paste("data.",i,sep=""), read.table(paste("c:/data/",i,".csv",sep=""),header=TRUE,sep=",")) HTH, Jorge On Sat, Mar 21, 2009 at 4:01 PM, Jorge Ivan Velez wrote: > > De

Re: [R] macro in a loop

2009-03-21 Thread Jorge Ivan Velez
Dear Le, Try this: year<-c(1940,1950,1960) for (i in y) assign(paste("data.",i,sep=""), read.table("c:/data/i.csv",header=TRUE,sep=",")) data.1940 data.1950 data.1960 See ?assign for more details. HTH, Jorge On Sat, Mar 21, 2009 at 3:53 PM, Le Wang wrote: > Hi there,

[R] macro in a loop

2009-03-21 Thread Le Wang
Hi there, Thanks for your time in advance. I am trying to read in multiple files. For example, data.1940 <- read.table("c:/data/1940.csv",header=TRUE,sep=",") data.1950 <- read.table("c:/data/1950.csv",header=TRUE,sep=",") data.1960 <- read.table("c:/data/1960.csv",header=TRUE

Re: [R] How Can I Concatenate Every Row in a Data Frame with Every Other Row?

2009-03-21 Thread Donald Macnaughton
On Sat, Mar 21, 2009 at 12:01 PM, I wrote: > I have a data frame with roughly 500 rows and 120 variables.   > I would like to generate a new data frame that will include > one row for each PAIR of rows in the original data frame and > will include all 120 + 120 = 240 variables from the two rows.

Re: [R] Fisher test problem

2009-03-21 Thread David Winsemius
Let me ask you: What degree of credibility should be accorded a WWW application that delivers a p-value of 1.25? If the answer is not immediately and glaringly obvious, then tell us, what sort of axioms of probability are you working with? -- David Winsemius On Mar 21, 2009, at 3:17 PM, Vij

Re: [R] Fisher test problem

2009-03-21 Thread Tal Galili
Viju Moses, Are you sure you got a P-value of 1.25 ? Since P-value could only be between 0 to 1... Tal On Sat, Mar 21, 2009 at 9:17 PM, Viju Moses wrote: > Hi, I noted a discrepancy between R and openepi when I ran a fisher test > with the same matrix. In R: > > > a=matrix(c(1,2,6,17), nro

Re: [R] Creating dataframe names on the fly?

2009-03-21 Thread Stavros Macrakis
On Fri, Mar 20, 2009 at 8:18 PM, science! wrote: > I am aware that it is easily possible to create var names on the fly. e.g. > assign(paste("m",i,sep=""),j) > but is it possible to assign dataframes to variables created on the fly? > > e.g. > If I have a dataframe called master and I wanted to su

[R] Fisher test problem

2009-03-21 Thread Viju Moses
Hi, I noted a discrepancy between R and openepi when I ran a fisher test with the same matrix. In R: > a=matrix(c(1,2,6,17), nrow=2) > a [,1] [,2] [1,]16 [2,]2 17 > fisher.test(a, conf.int=T) Fisher's Exact Test for Count Data data: a p-value = 1 alternative hypothesi

Re: [R] Problem with zoo and rbind() converting matrix to vector

2009-03-21 Thread David Winsemius
On Mar 21, 2009, at 2:31 PM, Ken-JP wrote: require( zoo ) inp <- c( 5, 9, 4, 2, 1 ); m <- zoo( cbind( inp ), as.Date("2003-02-01") + (0:(length(inp)-1))); dim( m ) # [1] 5 1 dim( m[1,,drop=FALSE] ) # [1] 1 1 - ok dim( lag( m, -1 )) # [1] 4 1 - ok dim( rbind( m[1,,drop=FALSE], lag(m,-1) )) # NU

Re: [R] Forestplot () box size question

2009-03-21 Thread David Winsemius
I use the CMU site. I think it is US PA #1 or some such. I suppose the fact that I am using a Mac could affect that but I am guessing not. I also found a copy of the 2.14 docs and boxsize was a parameter in that version as well. -- David Winsemius On Mar 21, 2009, at 2:24 PM, Gerar

[R] Problem with zoo and rbind() converting matrix to vector

2009-03-21 Thread Ken-JP
require( zoo ) inp <- c( 5, 9, 4, 2, 1 ); m <- zoo( cbind( inp ), as.Date("2003-02-01") + (0:(length(inp)-1))); dim( m ) # [1] 5 1 dim( m[1,,drop=FALSE] ) # [1] 1 1 - ok dim( lag( m, -1 )) # [1] 4 1 - ok dim( rbind( m[1,,drop=FALSE], lag(m,-1) )) # NULL - converted from zoo matrix to zoo vector

Re: [R] Forestplot () box size question

2009-03-21 Thread Gerard Smits
I have tried several sites (2 in Ca and also Australia) and find only version 2.14. Which site did you pull 2.15 from? Thanks At 11:10 AM 3/21/2009, David Winsemius wrote: >"Latest version" is a tad non-specific. The help page for (my) package >rmeta, version 2.15 (download and compiled today)

Re: [R] Is this sample size big enough to test for statisti cal significance?

2009-03-21 Thread Dieter Menne
J S hotmail.com> writes: Is this sample size large enough to study differences between two groups of the populations? Q1: do the body temperatures differ between the two groups of the overwintering turtles juveniles and adults? One group (adults) has 6 turtles Secon

Re: [R] Forestplot () box size question

2009-03-21 Thread Gerard Smits
Hi David, I did a general package update, but it must not have been quite as complete as I had hoped. I will make sure I download 2.15 and go from there. Thanks for you help. Gerard At 11:10 AM 3/21/2009, David Winsemius wrote: >"Latest version" is a tad non-specific. The help page for (my) p

Re: [R] Forestplot () box size question

2009-03-21 Thread David Winsemius
"Latest version" is a tad non-specific. The help page for (my) package rmeta, version 2.15 (download and compiled today) says: Usage forestplot(labeltext, mean, lower, upper, align = NULL, is.summary = FALSE, clip = c(-Inf, Inf), xlab = "", zero = 0, graphwidth = unit(2, "inches"), col = m

Re: [R] Forestplot () box size question

2009-03-21 Thread Gerard Smits
Hi David, I just checked to make sure I had the latest version. I see no boxsize option in the forestplot function parameters or any other place in the code. function (labeltext, mean, lower, upper, align = NULL, is.summary = FALSE, clip = c(-Inf, Inf), xlab = "", zero = 0, graphwidth =

Re: [R] How to avoid switching on input type?

2009-03-21 Thread Gabor Grothendieck
Create an S3 generic lag.zerofill and then define methods for each class: lag.zerofill <- function(x, k = 1, ...) UseMethod("lag.zerofill") lag.zerofill.zoo <- function(x, k, ...) { m <- merge(x, lag(x, k), fill = 0) structure(m[, -(1:ncol(x))], dimnames = list(NULL

Re: [R] Forestplot () box size question

2009-03-21 Thread David Winsemius
If you look at the original code (or at the help page), you should see a boxsize parameter. If you set that to 1 in the call you get boxes all the same size. Presumably that could be modified to suit your needs. You seem to have removed that section of the code. The two lines with that p

[R] Forestplot () box size question

2009-03-21 Thread Gerard Smits
Hi All, I have been able to modify the x-axis to start at zero by adding xlow and xhigh parameters; that was pretty simple. I have been unable to find the location of the code that would turn off the information weighting of the box size (I have smaller randomized trials getting less weight t

Re: [R] How Can I Concatenate Every Row in a Data Frame with Every Other Row?

2009-03-21 Thread David Winsemius
I hacked at a bit differently than Duncan. See if these help pages and this example point another way: ?combn ?"[" > df <- data.frame(a = 1:4, b=LETTERS[1:4]) > n <- nrow(df) > cbind(df[combn(1:n,2)[1,],], df[combn(1:n,2)[2,],] ) a b a b 1 1 A 2 B 1.1 1 A 3 C 1.2 1 A 4 D 2 2 B 3 C 2.1

[R] Can not replicate estimates with rScreen function from ROSSI "Bayesian Statistics and Marketing"

2009-03-21 Thread eugen pircalabelu
Hi R-users, I have the following problem: I am trying to learn something about bayes methodology and started paying around bayesm package, but could not replicate the Conjunctive model's estimates as they appear in Rossi et al "Bayesian Statistics and Marketing", 2005, JWS, pages 264-265, Tabl

Re: [R] How Can I Concatenate Every Row in a Data Frame with Every Other Row?

2009-03-21 Thread Duncan Murdoch
On 21/03/2009 12:01 PM, Donald Macnaughton wrote: I have a data frame with roughly 500 rows and 120 variables. I would like to generate a new data frame that will include one row for each PAIR of rows in the original data frame and will include all 120 + 120 = 240 variables from the two rows. I

Re: [R] How Can I Concatenate Every Row in a Data Frame with Every Other Row?

2009-03-21 Thread jim holtman
Try this: > x <- data.frame(a=1:100, b=100:1, c=sample(100)) > # assume even number of rows: bind the even/odd together > even <- seq(nrow(x)) %% 2 > new.x <- cbind(x[even==1,], x[even==0,]) > > > head(new.x) a b c a.1 b.1 c.1 1 1 100 69 2 99 60 3 3 98 24 4 97 26 5 5 96 71

[R] How Can I Concatenate Every Row in a Data Frame with Every Other Row?

2009-03-21 Thread Donald Macnaughton
I have a data frame with roughly 500 rows and 120 variables. I would like to generate a new data frame that will include one row for each PAIR of rows in the original data frame and will include all 120 + 120 = 240 variables from the two rows. I need only one row for each pair, not two rows. Thu

[R] How to avoid switching on input type?

2009-03-21 Thread Ken-JP
Hi, I need some help improving this ugly code I wrote. I would like to shift forward a zoo object, matrix, ts, or list by "shift" items (default 1) and fill the holes with 0's. The code below works, but it looks ugly. I could write a function lag.zerofill() which calls the two functions belo

Re: [R] Generalized Extreme Value Distribution (LMOM package) and Frechet Distribution

2009-03-21 Thread Christos Argyropoulos
Hi, The package evd most functions that one would need for analysis of Extreme Values so you should consider giving it a try. By the way your vector of numerical values is not valid; there are a couple of values with repeated decimal point separators. Regards, Christos Argyropoulos University

Re: [R] Retrieving Vertices Coordinates from SpatialPolygons

2009-03-21 Thread David Winsemius
On Mar 21, 2009, at 10:31 AM, Barry Rowlingson wrote: On Sat, Mar 21, 2009 at 12:33 PM, Enrico R. Crema wrote: Dear List, I'm trying to use different R packages for my Teaching Assistantship classes. And I cam out to an (apparently) very simple problem. I would like to retrieve the verti

Re: [R] Bug with the col option in plot function

2009-03-21 Thread heyi xiao
Thanks, David, utils::str(pdf.options()) returns exactly the same results as yours. The colormodel is set to rgb already. The reason I thought this is a bug is that the same plot function + col option works fine when pch=0 or other numbers, except for 1 or 16 (empty or solid circle) or any

Re: [R] Retrieving Vertices Coordinates from SpatialPolygons

2009-03-21 Thread hadley wickham
This came up on R-sig-geo two days ago and this is what I said: I have the following code in ggplot2 for turning a SpatialPolygon into a regular data frame of coordinates. You'll need to load ggplot2, and then run fortify(yoursp). fortify.SpatialPolygonsDataFrame <- function(shape, region = NULL

Re: [R] Retrieving Vertices Coordinates from SpatialPolygons

2009-03-21 Thread Barry Rowlingson
On Sat, Mar 21, 2009 at 12:33 PM, Enrico R. Crema wrote: > Dear List, > > I'm trying to use different R packages for my Teaching Assistantship > classes. And I cam out to an (apparently) very simple problem. I would > like to retrieve the vertices coordinate of a SpatialPolygon data. I > know this

[R] object gstat

2009-03-21 Thread giuseppef...@libero.it
dear all i have this dataset: x,y, datavalue > dati[,c(1,2,5)] [,1] [, 2] [,3] [1,] 2.386 3.077 1.740 [2,] 2.544 1.972 1.335 [3,] 2.807 3.347 1.610 [4,] 4.308 1.933 2.150 [5,] 4.383 1.081 1.565 [6,] 3.244 4.519 1.145 [7,] 3.925 3.785 0.894 [8,] 2.116 3.498 0.525 [9,]

Re: [R] oggetto gstat

2009-03-21 Thread Tobias Verbeke
Hi Giuseppe, The language of this mailing list is English. Ciao a tutti ho appena iniziato ad utilizzare R per ora per attuare un'analisi geostatistica di dati. Volevo sapere come poter creare un oggetto gstat partendo da un file testo(che ho gia importato con read.table)e che contiene 3 col

Re: [R] bargraph.CI change se for sd

2009-03-21 Thread David Winsemius
Package name? Example code? -- On Mar 21, 2009, at 4:22 AM, herwig wrote: Hi there, I am a beginner. I would like to change the error bars in the bargraph.CI function from the default (se) to (sd). The help file says ci.fun= function(x) c(fun(x)-se(x), fun(x)+se(x)) Is there a simple way

Re: [R] Retrieving Vertices Coordinates from SpatialPolygons

2009-03-21 Thread David Winsemius
If it is in an S4 slot then there should be an extraction function, possibly with an obvious name like coords(). Failing that you could offer the name of the package that you are using. Perhaps that would contain an example to be used for illustration. -- David Winsemius On Mar 21, 2009,

[R] oggetto gstat

2009-03-21 Thread giuseppef...@libero.it
Ciao a tutti ho appena iniziato ad utilizzare R per ora per attuare un'analisi geostatistica di dati. Volevo sapere come poter creare un oggetto gstat partendo da un file testo(che ho gia importato con read.table)e che contiene 3 colonne: x,y,value. Mi servirebbe far questo per costruire un var

[R] Retrieving Vertices Coordinates from SpatialPolygons

2009-03-21 Thread Enrico R. Crema
Dear List, I'm trying to use different R packages for my Teaching Assistantship classes. And I cam out to an (apparently) very simple problem. I would like to retrieve the vertices coordinate of a SpatialPolygon data. I know this is stored in the "coords" slot, but I can't get access to it

[R] Solved: [Fwd: Matching failure in merge()]

2009-03-21 Thread Agustin Lobo
I've found where the problem was and a way to solve this problem: One dataset was encoded (and read) as UTF-8 and the other one was encoded (en read) as latin3 In this case, even if at the terminal you see the same characters, R states that the two elements are not equal. Don't know if this is th

[R] bargraph.CI change se for sd

2009-03-21 Thread herwig
Hi there, I am a beginner. I would like to change the error bars in the bargraph.CI function from the default (se) to (sd). The help file says ci.fun= function(x) c(fun(x)-se(x), fun(x)+se(x)) Is there a simple way of telling the function what (x) precisely is - I already define in in the of the

Re: [R] limiting simulated animal movement

2009-03-21 Thread Rainer M Krug
On Sat, Mar 21, 2009 at 1:35 PM, Umesh Srinivasan wrote: > Hi, > > I am trying to simulate animal movement in a gridded landscape made up of > cells. At each time step (iteration), the animal moves from one cell to > another in a random fashion. > This is how I am simulating movement, where a and

[R] limiting simulated animal movement

2009-03-21 Thread Umesh Srinivasan
Hi, I am trying to simulate animal movement in a gridded landscape made up of cells. At each time step (iteration), the animal moves from one cell to another in a random fashion. This is how I am simulating movement, where a and b are the x,y co-ordinates of the animal at the previous time step:

Re: [R] Combining Sweave and fancyvrb

2009-03-21 Thread Michael Friendly
Andrew Ellis wrote: You cannot have \label in an S chunk, as R will not know what to do with it. Neither can you have \label in a verbatim environment, as it will simply be typeset verbatim. Actually, with your definition of Sinput \DefineVerbatimEnvironment{Sinput}{Verbatim} { commentchar

Re: [R] R: Multi-line texts in plots

2009-03-21 Thread Jim Lemon
mau...@alice.it wrote: Now that I have my list of flags with theri respective values (thanks to all those who posted their suggestions): Flags Values 1 TrendOff 0 2 MOdwt 1 3ZeroPadding 1 4 Step1HSOff 1 5 Step1NumHSOff 4 6 Step1NumHSOff

Re: [R] Plot and Boxplot in the same graph

2009-03-21 Thread Tal Galili
Hi there. Try the "add parameter" in boxplot: add logical, if true *add* boxplot to current plot. On Sat, Mar 21, 2009 at 5:02 AM, johnhj wrote: > > Hii, > > Is it possible, to use the plot() funktion and the boxplot() funktion > together ? > I will plot a simple graph and additionally to t

[R] libRlapack.so not found

2009-03-21 Thread Johannes Huesing
Whenever I try to load the Matrix package, I get the following error message: libRlapack.so: cannot open shared object file: No such file or directory A file with that name is indeed not on the hard disk. I am using the R version which comes with Ubuntu Hardy Heron LTS. Here is the output of R.Ver