Re: [R] How to use your own data in gstat and sp?

2009-08-18 Thread Paul Heinrich Dietrich
Thanks that makes sense. Just a newby to spatial data in R. Thanks. Roger Bivand wrote: First re-read the definition of what a SpatialPixels object is - ?SpatialPixels-class - note that it says: class for defining a pixels, forming a possibly incomplete rectangular grid of arbitrary

[R] image() generates many border lines in pdf, not on screen (quartz) - R 2.9.1 GUI 1.28 Tiger build 32-bit (5444) - OS X 10.5.8

2009-08-18 Thread Andreas Fischlin
Dear all, I have invested substantial amount of work in a complicated, yet on screen perfect looking graph that uses image(). Unfortunately saving it as pdf (or quartz.save at high resolution) all generate very disturbing border lines around each small rectangle that image() has drawn. While

[R] Model comparison with missing values

2009-08-18 Thread Sam.C
Hi, I have created a global model using lmer knowing it contains at least one fixed effect which has missing values. I add the term na.action=na.omit to the model formula as shown below, and the summary output is produced fine, until I wish to simplify the model and compare the resulting model

[R] number 6 e+13

2009-08-18 Thread Inchallah Yarab
  Hi, i export data from an csv file like this :  Data - read.csv2(c:/Art.csv,sep=,) # import data into R Data - Data [1:5,1:5]# extracting the first 5 rows and columns Data   Policy.Number AXA.Entity Country LoB ccy.data 1 6e+13    BNL BNL   P  EUR 2 6e+13   

[R] R formula

2009-08-18 Thread Anwesha Chakrabarti
Hi I was trying to estimate simultaneous equation system in R using systemfit. I used the following commands library(systemfit) data(Kmenta) attach(Kmenta) eqDemand-consump~price+income eqSupply-consump~price+farmprice+trend fitsur-systemfit(SUR,list(demand=eqDemand, supply=eqSupply)) and got

Re: [R] regex problems with the escape character

2009-08-18 Thread Gabor Grothendieck
On Mon, Aug 17, 2009 at 6:12 AM, Gabor Grothendieckggrothendi...@gmail.com wrote: On Mon, Aug 17, 2009 at 3:21 AM, ravirv...@yahoo.se wrote: Hi R-users and R-experts, I am having a hard time in figuring out how to tackle regex questions where the backslash character is an integral part of the

[R] Embedding lists in matrices and matrices in lists

2009-08-18 Thread Michael Kogan
Hi, I'm new to programming, new to R and even new to mailing lists so please be patient with me. I need to manage many matrices generated by an R program. These matrices have different dimensions and I'd like to group them somehow. The best way would be to have a big matrix (let's call it

[R] Applying Logical statement to DateTime string as factor

2009-08-18 Thread Pat Schmitz
R-Help I have a data set which uses a DateTime string as follows : 2009-06-30 18:14:59 While I have been able to convert to DateTime properly time - strptime(as.character(dat$Time),format='%d %b %Y %T') #Convert to dateTime string I would like to use the time of day hour as a *factor* level. I

[R] Log logistic Distribution - Parameter estimation

2009-08-18 Thread Maithili Shiva
Dear R helpers, I have following data c(19679.50,5975.72,17555.52,20078.08,1956.97,8383.25,7899.27,4881.75,2719.29,11701.96,13104.25,10081.01,9417.72,14976.89,7119.62,8373.56,24580.52,8330..70,9110.07,7848.08,12910.46,10310.53,20390.34,15824.71,21703.33) How do I fit 3 parameter Log Logistic

[R] coxph (survival) paper from '82

2009-08-18 Thread Damjan Krstajic
Dear All, I am interested to understand better the coxph() function from the survival R package. There is one referenced paper there which I am not able to get hold of and it is Andersen, P. Gill, R. (1982) Cox's regression model for counting processes, a large sample study. Annals of

[R] (no subject)

2009-08-18 Thread Lars Beckmann
Dear all, I have a problem with the function read.xls from the gdata package, error message see below. Two examples: First, I try to read my data, which does not work; Secondly, I tried the example code/data with the Iris data, which worked Any idea? Thanks, Lars

[R] Plyr and memory allocation issue

2009-08-18 Thread simeon duckworth
Dear R users I am trying to create some new variables for a 4401 x 30 dataframe using ddply and transform. The id variable i am using is a factor with 1330 levles eg bb - function(df) {transform(df, years = study.year - min(study.year) + 1, periods = length(study.year)

[R] Help understanding lrm function of Design library

2009-08-18 Thread Noah Silverman
Hi, I'm developing an experiment with logistic regression. I've come across the lrm function in the Design library. While I understand and can use the basic functionality, there are a ton of options that go beyond my knowledge. I've carefully read the help page for lrm, but don't

[R] how to draw pentagon?

2009-08-18 Thread Hemavathi Ramulu
Hi everyone, I want you all help me to give an idea, how to draw pentagon with points? Maybe can use function, but I'm stuck. Yhank you. -- Hemavathi Ramulu [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] help with expression()

2009-08-18 Thread Kenn Konstabel
All of it is an expression (see ?expression). Maybe you'd better explain what exactly you're trying to do or what you mean by standard format and usual way (this part depends very much on what you're used to). You can manipulate parts of this expression, say, like this: foo -

Re: [R] Multiple comparison on lme model with 2 fixed factors

2009-08-18 Thread Dieter Menne
Billeke wrote: mult2 - glht(lmelac.ex, linfct = mcp(ath:time = Tukey)) I don't have the time to check, but got a mail for Torsten (author) with the following idea: glht(lmeglu, linfct = c(Ath1:tim2 - Ath1:tim3 = 0, ...)) He suggested to build the matrix explicitly instead; that's

[R] Strange package installation error

2009-08-18 Thread Janet Rosenbaum
Hi. I'm trying to install a new package. I'm a relatively long-time (though not advanced) R user and have never seen this error before. For the first example, I tried a few different CRAN mirrors. In the second example, the file does exist; I downloaded it from the CRAN website for the package

Re: [R] graph label greek symbol failure

2009-08-18 Thread Gavin Simpson
On Mon, 2009-08-17 at 11:51 +0100, e-letter wrote: Readers, Previous questions about this requirement have been for m$ users, my failure occurs using linux. I have tried to add the delta (δ) symbol to the y axis label and the result is D, using the command: ...ylab=δt... Works for me

Re: [R] VAR (pckg: vars) and memory problem

2009-08-18 Thread Pfaff, Bernhard Dr.
Hello Bernd, many thanks for providing the details. As you can see from traceback, the warning refers to the calculation of the value of the log-likelihood, which is used in vars:::logLik.varest. I will slice the calculation and hopefully this will resolve the memory problems (update on

[R] R(D) Com not working

2009-08-18 Thread ryan
__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Graphical Parameters

2009-08-18 Thread Stefan Grosse
On Mon, 17 Aug 2009 16:47:23 + mohsin ali ali.moh...@hotmail.com wrote: MA I also found this way much easier. But when to have figure on MS MA Word, it is copied and then pasted on MS word then minor pixels MA appears. How to get a clear figure? Use another device. I personally use *.eps

Re: [R] Installing quantreg package under Ubuntu

2009-08-18 Thread Ben Bolker
Frank E Harrell Jr wrote: Does any have installation instructions for this? When I run install.packages('quantreg') I get: gcc -std=gnu99 -shared -o quantreg.so akj.o boot.o brute.o chlfct.o cholesky.o combos.o crq.o crqfnb.o dsel05.o etime.o extract.o idmin.o iswap.o kuantile.o

[R] Transpose a dataset

2009-08-18 Thread rajclinasia
Hi Everyone, I have a dataset like this mean sd0% 25% 50% 75% 100% n BODY TEMPERATURE 36.41099 0.4015699 35.1 36.2 36.5 36.7 37.1 89 DIASTOLIC BLOOD PRESSURE 73.60079 9.4656186 50.0 67.0 73.0

[R] Reshape package: Casting data to form a grid

2009-08-18 Thread Steve Murray
Dear R Users, I'm trying to use the 'cast' function in the 'reshape' package to convert column-format data to gridded-format data. A sample of my dataset is as follows: head(finalframe) Latitude Longitude Temperature OrigLat p-value Blaney 1 -90-38.75 NA -87.75 17.10167

Re: [R] Plot(x,y)

2009-08-18 Thread Michael Knudsen
On Sun, Aug 16, 2009 at 9:19 PM, malcolm Crouchmalcolm.crouc...@gmail.com wrote: plot(V6,V5, col=red) or plot(V6,V5) It seems that V5 and V6 are column names in your data matrix. If your matrix is called data, you should use plot(x$V6,x$V5,col=red) instead. Best, Michael -- Michael

Re: [R] Differing rows in two data.frames?

2009-08-18 Thread Mark Knecht
On Mon, Aug 17, 2009 at 2:25 PM, Mark Knechtmarkkne...@gmail.com wrote: Hi,   What commands would I look at to compare row-by-row two data frames of the same size and print out any differences between the two? Thanks, Mark So I got an answer using the following code: XXX =

[R] how to pass more than one argument to the function called by lapply?

2009-08-18 Thread Sean Zhang
Dear R helpers: I wonder how to pass more than one argument to the function called by lapply. For example, #R code below --- indf - data.frame(id=I(c('a','b')),y=c(1,10)) #I want to add an addition argument cutoff into the function called by lapply. outside.fun -

[R] FYI conflict between statnet, igraph

2009-08-18 Thread Ben Mazzotta
Dear R users: There appears to be a conflict between the statnet package and the igraph package. With igraph loaded into memory, the network() function of statnet failed, returning the error to the effect that the matrix being converted was not a graph object. Removing igraph from memory

[R] Differing rows in two data.frames?

2009-08-18 Thread Mark Knecht
Hi, What commands would I look at to compare row-by-row two data frames of the same size and print out any differences between the two? Thanks, Mark __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] help with expression()

2009-08-18 Thread Vitalie S.
On Mon, 17 Aug 2009 12:24:28 +0200, deanj2k dl...@le.ac.uk wrote: Hello. I have a vector and within that vector is one expression. When I display this vector it comes up as expression(NA_character_, NA_character_, Null Effect, Pooled effect, NA_character_, NA_character_, NA_character_,

[R] memory limit in R

2009-08-18 Thread Hongwei Dong
Hi, all, I'm doing a discrete choice model in R and kept getting this error: Error: cannot allocate vector of size 198.6 Mb. Does this mean the memory limit in R has been reached? memory.size() [1] 1326.89 memory.size(TRUE) [1] 1336 memory.limit() [1] 1535 My laptop has a 4G memory with

[R] Help understanding lrm function of Design library

2009-08-18 Thread Noah Silverman
Hi, I'm developing an experiment with logistic regression. I've come across the lrm function in the Design library. While I understand and can use the basic functionality, there are a ton of options that go beyond my knowledge. I've carefully read the help page for lrm, but don't

[R] multiple values for a factor using nodematch in ergm()

2009-08-18 Thread Ben Mazzotta
Greetings, and many thanks for any insight you can offer. I have a network object on which I'd like to simulate an ergm() using {statnet}. Since the network object is large, I have not copied it here. Each vertex has an attribute language which can take on integer values greater than or equal to

Re: [R] graph label greek symbol failure

2009-08-18 Thread Michael Knudsen
On Mon, Aug 17, 2009 at 12:51 PM, e-letter inp...@gmail.com wrote: I have tried to add the delta (δ) symbol to the y axis label and the result is D, using the command: ...ylab=δt... Try ylab = expression(delta*t) instead. Best, Michael -- Michael Knudsen micknud...@gmail.com

Re: [R] graph label greek symbol failure

2009-08-18 Thread David Winsemius
ther wrote: Previous questions about this requirement have been for m$ users, my failure occurs using linux. I have tried to add the delta (δ) symbol to the y axis label and the result is D, using the command: ...ylab=δt... Any advice please? A) Next time post full code and

[R] reading in MS Word files

2009-08-18 Thread Mark Kimpel
I am familiar with packages that read and write Excel files on both Windows and Linux platforms. Do any packages provide similar functionality for MS Word files? I have a lot of text processing to do and the text is embedded in ~200 different Word files (.doc format Office 2003). All I need to do

Re: [R] ggplot and RExcel

2009-08-18 Thread Felipe Carrillo
Hi Elaine: I developed an application that includes MS Access,RExcel and R. It is all automated, RExcel conects to MS Access in the background and imports custom data, after performing some calculations, RExcel sends the data to R to perform further calculations and then R returns the final

Re: [R] graph label greek symbol failure

2009-08-18 Thread Patrick Connolly
On Mon, 17-Aug-2009 at 11:51AM +0100, e-letter wrote: | Readers, | | Previous questions about this requirement have been for m$ users, my | failure occurs using linux. | | I have tried to add the delta (δ) symbol to the y axis label and the | result is D, using the command: | | ...ylab=δt... |

[R] help simplifying complex graphic arguments to a function

2009-08-18 Thread Michael Friendly
I'm working on a package to produce graphic displays of 2- and 3-way tables and need some help/advice on how to simplify the specification of a complex argument that gives the drawing details for each cell of the table. Prototypes of two functions, 'tableplot' and 'cellgram' are given below. The

[R] Replacing NA values in one column of a data.frame

2009-08-18 Thread Steve Murray
Dear all, I'm trying to replace NA values with - in one column of a data frame. I've tried using is.na and the testdata[testdata$onecolumn==NA] - approach, but whilst neither generate errors, neither result in -s appearing - the NAs remain there! I'd be grateful for any advice

Re: [R] how to Transpose a dataset

2009-08-18 Thread Ben Bolker
rajclinasia wrote: Hi everyone, How to a transpose a R dataset with a specified variable. If possible send the code. it will be very helpful for us. Not clear what with a specified variable means. t(x) will only work with matrices; if you have read in an (all-numeric) dataset with

[R] number in R

2009-08-18 Thread Inchallah Yarab
Hi, i export data from an csv file like this :  Data - read.csv2(c:/Art.csv,sep=,) # import data into R Data - Data [1:5,1:5]# extracting the first 5 rows and columns Data   Policy.Number AXA.Entity Country LoB ccy.data 1 6e+13    BNL BNL   P  EUR 2 6e+13    USA  

[R] Help with the bash R

2009-08-18 Thread Kaiyu Shen
Hello folks: I am now writing a bash file to run the R script and I met a problem: There is one function in my script that could cause errors in some certain cases and I do want the script to resume, ignoring the error message. Is there any way that can handle this situation, like in C++, using

Re: [R] Newbie that don't understand R code

2009-08-18 Thread Berend Hasselman
kfcnhl wrote: I got some R code that I don't understand. Question as comment in code //where is t comming from, what is phi inverse rAC - function(name, n, d, theta){ . phi.inverse - switch(name, clayton = function(t, theta) //where is t comming from, what is phi

Re: [R] Plotting sigma symbol with unicode and turning into pdf

2009-08-18 Thread Jonathan R. Blaufuss
Paul, Thanks so much for the detailed help with this issue. I appreciate the time that you spent on this and I'm glad that you were able to fix a bug in the process! Thanks, Jonathan - Original Message - From: Paul Murrell p.murr...@auckland.ac.nz To: Jonathan R. Blaufuss

[R] Polygon function

2009-08-18 Thread Cetinyürek Aysun
Dear all, I would like to plot credible interval for a function estimate in R. I would like to plot the credible intervals as shaded region using polygon function. Does anyone ever used that? I tried several times but I could not obtain the right figure. xis=sort(xi,decreasing=TRUE) plot(xi,fm)

[R] R : how does %in% operator work?

2009-08-18 Thread Moumita Das
*Problem-1* CASE-I-(works fine) var1-tom var1 [1tom var1-as.character(var1) var1 [1] tom var2-c(tom,harry,kate) logc-(var1 %in% var2) logc [1] TRUE typeof(var1) [1] character typeof(var2) [1] character *CASE-II-(doesn’t work)* I have my dynamically

Re: [R] Question regarding finding credible interval using r2winbugs

2009-08-18 Thread Ben Bolker
[cc'd to list] You may need coda::HPDinterval(as.mcmc(fit),prob=0.9) SATRAJIT ROYCHOUDHURY wrote: Dear Ben, coda::HPDinterval(fit,prob=0.9) This command is keep giving me error message as; Error in HPDinterval(fit) : no applicable method for HPDinterval Can you pls tell me what

[R] Matching two series

2009-08-18 Thread ONKELINX, Thierry
Dear all, I am struggling with a problem and I am hoping that somebody could point me in the right direction. I am trying to match the locations of two peak patterns. A is the true pattern. B is the measured pattern. Hence A and B have a very strong linear relationship. The problem is that B can

[R] A request for pointers on how to analyse Twitter with R ?

2009-08-18 Thread Tal Galili
Hello dear R members. I just came across this website: http://giladlotan.org/viz/iranelection/ Here what it is about: ReTweet Revolution is a visual exploration of the most popular conversation threads that were passed amongst Twitter users at the time of the events following the Iranian

[R] vector replacement 1/0 to P/A

2009-08-18 Thread Lana Schaffer
Hi, Can someone suggest an efficient way to substitute a vector/matrix which contains 1's and 0's to P's and A's (resp.)? Thanks, Lana __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Applying Logical statement to DateTime string as factor

2009-08-18 Thread Gabor Grothendieck
Try this: Lines - '1,30 Jun 2009 18:14:59 2,02 Jul 2009 07:33:37 3,06 Jul 2009 08:22:35 4,06 Jul 2009 19:25:50 5,08 Jul 2009 08:41:48 6,10 Jul 2009 07:31:39 7,10 Jul 2009 19:59:25 8,13 Jul 2009 07:49:18 9,13 Jul 2009 18:52:52 10,15 Jul 2009 08:06:56 11,15 Jul 2009 19:03:01 12,17 Jul 2009

[R] Bayesian data analysis - help with sampler function

2009-08-18 Thread James Lenihan
I have downloaded the Umacs (Universal Markov chain sampler) and submitted the following sample code from Kerman and Gelman.   s -Sampler( J=8, sigma.y  =c(15,10,16,11,9,11,10,18),   y  =c(28, 8,-3,7,-1,1,18,12), theta =Gibbs(theta.update,theta.init),   V

Re: [R] VAR (pckg: vars) and memory problem

2009-08-18 Thread herrdittmann
Dear Bernard,  Please find attached the output of traceback() below for this rather large VAR. I am using vars 1.4-6 at the moment: dim(var.trial) [1] 22367 3   summary(VAR(var.trial, type=none, p=3)) Error: cannot allocate vector of size 3.7 GbIn addition: Warning messages: 1: In

[R] Problem fitting network meta-analysis using lme

2009-08-18 Thread David Scott
I am trying to use the network meta-analysis approach of Thomas Lumley, described in his paper in Statistics in Medicine, 2002. My problem is fairly simple as network meta analyses go, I have two groups of trials, ones comparing A and B, and ones comparing A and C, and I am interested in

Re: [R] Newbie question re stddev, quantmod and performanceanalytics

2009-08-18 Thread jim holtman
try: ?sd sd(retYHOO, na.rm=TRUE) On Mon, Aug 17, 2009 at 1:43 AM, afx111afx...@yahoo.com wrote: Hi, I am trying to calculate the std dev of returns of YHOO so far i got: getSymbols(YHOO) retYHOO - Return.calculate(Cl(YHOO)) sd(retYHOO) YHOO.Close        NA but i received an

Re: [R] Estimate Discrete Choice Models with R

2009-08-18 Thread Kjetil Halvorsen
Discret choice models often require multinomial probit. The CRAN package MNP can do that. Kjetil On Sat, Aug 15, 2009 at 8:50 PM, Ronggui Huangronggui.hu...@gmail.com wrote: glm can do probit regression, and glmer (lme4 package) and do mixed effect logit model. Ronggui 2009/8/16 Hongwei

Re: [R] R formula

2009-08-18 Thread Berend Hasselman
Anwesha Chakrabarti wrote: fitsur-systemfit(SUR,list(demand=eqDemand, supply=eqSupply)) and got the following error messege Error in systemfit(SUR, list(demand = eqDemand, supply = eqSupply)) : argument 'formula' must be an object of class 'formula' or a list of objects of class

Re: [R] Multiple comparison on lme model with 2 fixed factors

2009-08-18 Thread Dieter Menne
Billeke wrote: Reproducing part of my data (which indeed are here well standardized), I obtain similar results (with regard to the R output) than previously. These are part of an experimentation where people with different athletic (ath) training exercised during 120 minutes. Plasma

Re: [R] Help with the bash R

2009-08-18 Thread jim holtman
?try On Mon, Aug 17, 2009 at 11:05 AM, Kaiyu Shenks280...@ohio.edu wrote: Hello folks: I am now writing a bash file to run the R script and I met a problem: There is one function in my script that could cause errors in some certain cases and I do want the script to resume, ignoring the error

Re: [R] Newbie question re stddev, quantmod and performanceanalytics

2009-08-18 Thread John Kane
What package or library are you using? What is YHOO.Close ? Try str(retYHOO) to see what it looks like. --- On Mon, 8/17/09, afx111 afx...@yahoo.com wrote: From: afx111 afx...@yahoo.com Subject: [R] Newbie question re stddev, quantmod and performanceanalytics To: r-help@r-project.org

Re: [R] Replacing NA values in one column of a data.frame

2009-08-18 Thread jim holtman
testdata[is.na(testdata$onecolumn)] - - On Mon, Aug 17, 2009 at 11:41 AM, Steve Murraysmurray...@hotmail.com wrote: Dear all, I'm trying to replace NA values with - in one column of a data frame. I've tried using is.na and the testdata[testdata$onecolumn==NA] - approach, but

Re: [R] how to pass more than one argument to the function called by lapply?

2009-08-18 Thread jim holtman
lapply(yourList, function(x1,x2,x3){x1*x2*x3}, x2=12, x3=34) ?lapply lapply(X, FUN, ...) sapply(X, FUN, ..., simplify = TRUE, USE.NAMES = TRUE) replicate(n, expr, simplify = TRUE) Arguments X a vector (atomic or list) or an expressions vector. Other objects (including classed objects) will be

Re: [R] Transpose a dataset

2009-08-18 Thread jim holtman
Is this what you want: x mean sd X0. X25. X50. X75. X100. n BODY_TEMPERATURE 36.41099 0.4015699 35.1 36.2 36.5 36.7 37.1 89 DIASTOLIC_BLOOD_PRESSURE 73.60079 9.4656186 50.0 67.0 73.0 80.0 95.0 253 HEIGHT

Re: [R] Help understanding lrm function of Design library

2009-08-18 Thread Richardson, Patrick
I found Professor Harrell's book answered most of my questions as it contains discussion of both Hmisc and Design libraries . http://www.amazon.com/Regression-Modeling-Strategies-Frank-Harrell/dp/0387952322/ref=sr_1_2?ie=UTF8qid=1250596657sr=8-2 Patrick -Original Message- From:

Re: [R] [Fwd: Re: R code to reproduce (while studying) Bates Watts 1988]]]

2009-08-18 Thread Douglas Bates
On Mon, Aug 17, 2009 at 3:28 AM, Ottorino-Luca Pantaniottorino-luca.pant...@unifi.it wrote: Kevin Wright wrote: library(nlme) m2 - gnls(conc  ~ t1*(1-t2*exp(-k*time)),           data  = df.Chloride,           start =  list(             t1 = 35,             t2 = 0.91,             k =

Re: [R] [Fwd: Re: R code to reproduce (while studying) Bates Watts 1988]]]

2009-08-18 Thread Ottorino-Luca Pantani
Douglas Bates ha scritto: I have been without Internet access for a couple of weeks (in the US ATT is now competing with the cable companies and has succeeded in emulating the cable TV companies' terrible service) and I missed the beginning of this discussion. Is there a reason that you have

Re: [R] Reshape package: Casting data to form a grid

2009-08-18 Thread xavier . chardon
Hi, You can't use cast directly on your dataframe. You need to use the melt function before, and use cast on its result. Very good examples are provided in the doc of the package: http://had.co.nz/reshape/ Also, you need to provide one formula (not several as in your code), something like:

[R] how to Transpose a dataset

2009-08-18 Thread rajclinasia
Hi everyone, How to a transpose a R dataset with a specified variable. If possible send the code. it will be very helpful for us. Thanks in Advance. -- View this message in context: http://www.nabble.com/how-to-Transpose-a-dataset-tp25006768p25006768.html Sent from the R help mailing list

Re: [R] Reshape package: Casting data to form a grid

2009-08-18 Thread ONKELINX, Thierry
Dear Steve, You need something like this. cast(Latitude ~ Longitude, data = finalframe, value = Blaney, fun = mean) HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for

[R] postscript, options

2009-08-18 Thread e-letter
Readers, I am not able to create a postscript file with the following command: postscript(/pathto/filename.eps,horizontal=FALSE,onefile=FALSE) A file is not created, instead the command terminal shows the plus sign(+) on a new line: + What does this mean please? rh...@conference.jabber.org

Re: [R] number 6 e+13

2009-08-18 Thread Gabor Grothendieck
Try this: DF - data.frame(a = 6e13, b = X) DF a b 1 6e+13 X options(scipen = 20) DF a b 1 60 X On Tue, Aug 18, 2009 at 5:05 AM, Inchallah Yarabinchallahya...@yahoo.fr wrote: Hi, i export data from an csv file like this :  Data -

[R] Lattice in a loop does not produce output

2009-08-18 Thread Alex van der Spek
I cannot understand why xyplot does not work within a simple for loop. This works up to the for loop; inside the for loop the png files are opened and closed, but nothing is plotted. No error messages are written to the console either. This is the case on both Windows and Linux. By the way,

Re: [R] Installing quantreg package under Ubuntu

2009-08-18 Thread Frank E Harrell Jr
Ben Bolker wrote: Frank E Harrell Jr wrote: Does any have installation instructions for this? When I run install.packages('quantreg') I get: gcc -std=gnu99 -shared -o quantreg.so akj.o boot.o brute.o chlfct.o cholesky.o combos.o crq.o crqfnb.o dsel05.o etime.o extract.o idmin.o iswap.o

Re: [R] number in R

2009-08-18 Thread Vitalie S.
On Mon, 17 Aug 2009 16:49:53 +0200, Inchallah Yarab inchallahya...@yahoo.fr wrote: Hi, i export data from an csv file like this : Data - read.csv2(c:/Art.csv,sep=,) # import data into R Data - Data [1:5,1:5]# extracting the first 5 rows and columns Data Policy.Number AXA.Entity Country

Re: [R] Help understanding lrm function of Design library

2009-08-18 Thread Mark Difford
Hi Noah, Could someone point me to an online resource where I could learn more? (I'm big on trying to teach myself.) [about lrm funcction and the Design library] Go for the hardcopy, but you could look at Google Books if you are pressed. There you will find a good preview of the text. Also

Re: [R] postscript, options

2009-08-18 Thread Duncan Murdoch
On 17/08/2009 9:10 AM, e-letter wrote: Readers, I am not able to create a postscript file with the following command: postscript(/pathto/filename.eps,horizontal=FALSE,onefile=FALSE) A file is not created, instead the command terminal shows the plus sign(+) on a new line: + What does this

Re: [R] Lattice in a loop does not produce output

2009-08-18 Thread jim holtman
Check the FAQs. You need an explicit 'print' on the lattice call: for (i in 1:5) { f-paste('Test',i,'.png',sep='') png(f) print(xyplot(y~x|z)) dev.off() } On Tue, Aug 18, 2009 at 8:13 AM, Alex van der Spekam...@xs4all.nl wrote: I cannot understand why xyplot does not work within a simple

[R] function merge()

2009-08-18 Thread Inchallah Yarab
Hi, Actually, i use the function merge like this: (Data1 - Data1[1:7,1:3])   Policy.Number AXA.Entity Country 1    106077    BNL BNL 2   4001023 CH BNL 3    106006 UK BNL 4   4001025 CH BNL 5  6.00E+13    USA BNL 6  

[R] Odp: Lattice in a loop does not produce output

2009-08-18 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 18.08.2009 14:13:12: I cannot understand why xyplot does not work within a simple for loop. This works up to the for loop; inside the for loop the png files are opened and closed, but nothing is plotted. No error messages are written to the

Re: [R] ggplot2: geom_smooth and legend

2009-08-18 Thread Benoit Boulinguiez
Sorry I forgot the code that goes with **CODE desorb_plot-ggplot() + geom_smooth(data=DATA.B1_SA_N2, aes(Temp,DrTGA*100,colour=B1),span=0.1,size=1.6) + geom_smooth(data=DATA.FM30K_SA_N2,

Re: [R] Embedding lists in matrices and matrices in lists

2009-08-18 Thread Gabor Grothendieck
Try this: m12 - matrix(10, 1, 2) m22 - matrix(20, 2, 2) # create matrix of lists of matrices M - matrix(list(list(1, 2), list(m12, m12), list(t(m12)), list(m22, m22, m22)), 2, 2) M [,1] [,2] [1,] List,2 List,1 [2,] List,2 List,3 M[[1,2]] [[1]] [,1] [1,] 10 [2,] 10

[R] Odp: vector replacement 1/0 to P/A

2009-08-18 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 17.08.2009 16:22:39: Hi, Can someone suggest an efficient way to substitute a vector/matrix which contains 1's and 0's to P's and A's (resp.)? vec-sample(0:1, 20, replace=T) vec [1] 1 1 0 1 0 1 0 1 0 0 1 1 0 0 0 0 0 0 1 0 vec-ifelse(vec==0, A, P)

[R] Odp: function merge()

2009-08-18 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 18.08.2009 14:32:43: Hi, Actually, i use the function merge like this: (Data1 - Data1[1:7,1:3]) Policy.Number AXA.Entity Country 1106077BNL BNL 2 4001023 CH BNL 3106006 UK BNL 4

Re: [R] R formula

2009-08-18 Thread tzygmund mcfarlane
You got the order of the arguments wrong: ## library(systemfit) eqDemand - consump ~ price + income eqSupply - consump ~ price + farmPrice + trend fitsur - systemfit(list(demand=eqDemand, supply=eqSupply), SUR, data=Kmenta) summary(fitsur)

[R] Odp: Polygon function

2009-08-18 Thread Petr PIKAL
r-help-boun...@r-project.org napsal dne 17.08.2009 16:18:43: Dear all, I would like to plot credible interval for a function estimate in R. I would like to plot the credible intervals as shaded region using polygon function. Does anyone ever used that? I tried several times but I could not

Re: [R] (no subject)

2009-08-18 Thread Gabor Grothendieck
The error message seems pretty clear here. It says that you have to supply an integer to specify which sheet you want -- not a sheet name. Also see ?read.xls which describes the sheet argument as (emphasis added): sheet ***number*** of sheet within the Excel file from which data are to be read

[R] Odp: how to draw pentagon?

2009-08-18 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 18.08.2009 06:13:09: Hi everyone, I want you all help me to give an idea, how to draw pentagon with points? Maybe can use function, but I'm stuck. Maybe. Maybe you can use a pencil, instead. Basically this plot(1:10, type=n) polygon(c(2,3,5,6,4),

Re: [R] Transpose a dataset

2009-08-18 Thread S Ellison
Does ??transpose help (for example, leading to ?t for 'transpose') rajclinasia r...@clinasia.com 18/08/2009 05:00:00 Hi Everyone, I have a dataset like this mean sd0% 25% 50% 75% 100% n BODY TEMPERATURE 36.41099

Re: [R] FYI conflict between statnet, igraph

2009-08-18 Thread Gábor Csárdi
Ben, I believe that the reason for this is that both packages define functions with the same name and the 'network' package does not have a NAMESPACE. A possible workaround is to load the 'igraph' package first, and then 'statnet' (which loads 'network', etc.) next. At least library(igraph)

[R] Odp: (no subject)

2009-08-18 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 18.08.2009 10:35:11: Dear all, I have a problem with the function read.xls from the gdata package, error message see below. Two examples: First, I try to read my data, which does not work; Secondly, I tried the example code/data with the Iris

[R] three dimensions barchart

2009-08-18 Thread Yichih Hsieh
Dear R community, I have one problem with figures. I draw the Relative Distribution graph, it looks like barchart(X,Y plot), but I have ten(year) Relative Distribution grapgs, have any command am can combine ten barcharts(X,Y plot) to become a three dimensions barchart(X,Y,Z plot)? All help

Re: [R] number in R

2009-08-18 Thread Philipp Pagel
On Mon, Aug 17, 2009 at 02:49:53PM +, Inchallah Yarab wrote: Hi, i export data from an csv file like this : ?Data - read.csv2(c:/Art.csv,sep=,) # import data into R Data - Data [1:5,1:5]# extracting the first 5 rows and columns Data ? Policy.Number AXA.Entity Country LoB ccy.data

Re: [R] R formula

2009-08-18 Thread Arne Henningsen
Hi Anwesha On Tue, Aug 18, 2009 at 10:48 AM, Anwesha Chakrabartic.anwe...@gmail.com wrote: I was trying to estimate simultaneous equation system in R using systemfit. I used the following commands library(systemfit) data(Kmenta) attach(Kmenta) eqDemand-consump~price+income

Re: [R] number in R

2009-08-18 Thread jim holtman
change the value of 'scipen': options(scipen=6) x Policy.Number AXA.Entity Country LoB ccy.data 1 6e+13BNL BNL P EUR 2 6e+13USA BNL P EUR 3 6e+13 UK BNL E EUR 4 6e+13USA BNL P EUR 5

Re: [R] Embedding lists in matrices and matrices in lists

2009-08-18 Thread Michael Kogan
Thanks, that was exactly what I looked for! jim holtman schrieb: Is this what you want: x - matrix(list(),3,3) # create a matrix of lists # create matrices for testing for(i in 1:3){ + for (j in 1:3){ + x[[i,j]] - matrix(runif((i+1) * (j+1)), i+1) + } + } x

Re: [R] Reshape package: Casting data to form a grid

2009-08-18 Thread jim holtman
Is this what you want: x Latitude Longitude Temperature OrigLat p.value Blaney 1 -90-38.75 NA -87.75 17.10167 NA 2 -90135.75 NA -87.75 17.10167 NA 3 -90 80.25 NA -87.75 17.10167 NA 4 -90 95.75 NA -87.75

Re: [R] number in R

2009-08-18 Thread Duncan Murdoch
On 17/08/2009 10:49 AM, Inchallah Yarab wrote: Hi, i export data from an csv file like this : Data - read.csv2(c:/Art.csv,sep=,) # import data into R Data - Data [1:5,1:5]# extracting the first 5 rows and columns Data Policy.Number AXA.Entity Country LoB ccy.data 1 6e+13BNL

Re: [R] RMySQL - overwrite record, not table

2009-08-18 Thread Adrian Dusa
whizvast wrote: Hi, useR- In RMySQL, how do I overwrite records? (equivalent to replace query). For example, suppose that dat2 is a newer data.frame than dat1. con - dbConnect(MySQL()) res - dbWriteTable(con, DBname, dat1, row.names=F, append=T, replace=T) res - dbWriteTable(con,

[R] Odp: How to use R to perform prediction based on history data

2009-08-18 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 15.08.2009 04:27:39: Say I have a csv file, each row contains several fields, one of them are whether the row is success. In history data, I have all the fields including the result of whether it is success. In future data, I only have fields

  1   2   3   >