Re: [R] bonjour

2010-08-01 Thread Ivan Calandra
Hi! Well, I actually have no idea how to do it. But here a few more tips to get answers: - write a specific subject to your email - explain what you want to do, what you already did, what did not work, etc. - provide a reproducible example, that's really important so that people can know what y

[R] zoo, time() & index()

2010-08-01 Thread Costas
Hi, I have to zoo real valued time series "a" and "b" same length. is index(a)<-index(b) same as time(a)<-time(b)? Which one is better? Best, Costas __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

Re: [R] Why do the results of paste() depend on how the argument (data.frame) is constructed?

2010-08-01 Thread Bill.Venables
Just to add to the confusion, for (nearly) all practical purposes they are the same: > all.equal(df1, df2) [1] TRUE > do.call(paste, df1) [1] "1 4" "2 5" "3 6" > do.call(paste, df2) [1] "1 4" "2 5" "3 6" > -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r

Re: [R] Why do the results of paste() depend on how the argument (data.frame) is constructed?

2010-08-01 Thread Erik Iverson
On 08/01/2010 08:48 PM, thmsfuller...@gmail.com wrote: Hi, The following two 'df's should be the same, although their constructions are different. But they aren't the same. df1 <- data.frame(X=c(1, 2, 3), Y=c(4, 5, 6)) df2 <- data.frame(X=1:3, Y=4:6) identical(df1, df2) yields FALSE See st

[R] package for measurement error models

2010-08-01 Thread Carrie Li
Hi, R-helpers, I am working on a problem of measurement error modeling. (I am new to this filed) The model I am dealing with is simple. Consider a linear regression y= beta0 + beta1 * x + error, in which x is measured with errors. (the variance of errors are known. ) I looked up the package simex

[R] Convert an expression to a function

2010-08-01 Thread wg2f
Hi John, Here is my code practicing. Please give me some advises. Thank you. Wu Gong # Extract the function string f.str <- sub("y~","",exprtext) # Get arglist from the text sp1 <- paste("\\",c(getGroupMembers(Arith),"(",")"),sep="") sp2 <- getGroupMembers(Math) sps <- paste(c(sp1,sp2),sep="",c

[R] Why do the results of paste() depend on how the argument (data.frame) is constructed?

2010-08-01 Thread thmsfuller...@gmail.com
Hi, The following two 'df's should be the same, although their constructions are different. But the results of paste() are different. I don't see this is explained in ?paste. Could you help me understand why it is like this? > df=data.frame(X=c(1, 2, 3), Y=c(4, 5, 6)) > df X Y 1 1 4 2 2 5 3 3 6

Re: [R] Help -normal distribution

2010-08-01 Thread n.a.s
Hi, But i didn't understand why you did it like this qnorm(40/200)?? I already found the answer qnorm(.20,181,7.3) and qnorm(.80,181,7.3) Thanks. On Mon, Aug 2, 2010 at 12:33 AM, Arun.stat wrote: > > try > qnorm(40/200) > -- > View this message in context: > http://r.789695.n4.nabble.com/He

[R] R2HTML giving "NULL" in output

2010-08-01 Thread Nick_F
Dear List, I am using R 2.11.1 and R2HTML 2.1. I am able to write output to an HTML file but after every line of output I get a line saying NULL. R2HTML seems to be including NULL after each entry. Here is an example of my R code and the source of the HTML... HTMLStart(outdir=OutPath, file="M

[R] How to let Rterm be vi style under windows?

2010-08-01 Thread Yue Wu
Hi list, As title, under windows, the methord of ~/.inputrc won't work, dunno how to let Rterm can be vi style? -- Regards, Yue Wu Key Laboratory of Modern Chinese Medicines Department of Traditional Chinese Medicine China Pharmaceutical University No.24, Tongjia Xiang Street, Nanjing 210009

Re: [R] logos and goodies

2010-08-01 Thread Steve Taylor
Would this be suitable? http://en.wikipedia.org/wiki/File:Rlogo.png [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-projec

Re: [R] Help -normal distribution

2010-08-01 Thread Joshua Wiley
Also note that you can 'switch' tails via the argument lower.tail. By default, it is TRUE. > qnorm(p = .20, mean = 181, sd = 7.3, lower.tail = TRUE) [1] 174.8562 > qnorm(p = .20, mean = 181, sd = 7.3, lower.tail = FALSE) [1] 187.1438 Cheers, Josh On Sun, Aug 1, 2010 at 4:04 PM, Arun Kumar Saha

Re: [R] aggregating a daily zoo object to a weekly zoo object

2010-08-01 Thread Gabor Grothendieck
On Sun, Aug 1, 2010 at 6:06 PM, Erin Hodgess wrote: > Dear R People: > > I'm trying to convert a daily zoo object to a weekly zoo object: > > >  xdate <- seq(as.Date("2002-01-01"),as.Date("2010-07-10"),by="day") >  library(zoo) >  length(xdate) > xt <- zoo(rnorm(3113),order=xdate) > xdat2 <- seq(i

[R] CRAN (and crantastic) updates this week

2010-08-01 Thread Crantastic
CRAN (and crantastic) updates this week New packages * alabama (2010.7-1) Ravi Varadhan http://crantastic.org/packages/alabama Augmented Lagrangian Adaptive Barrier Minimization Algorithm for optimizing smooth nonlinear objective functions with constraints. Linear or nonli

Re: [R] Help -normal distribution

2010-08-01 Thread Arun Kumar Saha
I gave you hint only, however whatever you done is correct. On Mon, Aug 2, 2010 at 4:30 AM, n.a.s wrote: > Hi, > > But i didn't understand why you did it like this qnorm(40/200)?? > > I already found the answer  qnorm(.20,181,7.3) and qnorm(.80,181,7.3) > > > Thanks. > > > On Mon, Aug 2, 2010 a

Re: [R] how to get higher derivatives with "deriv"

2010-08-01 Thread mhofert
Dear all, many thanks, great work. Here is the feature which Peter suggested (it also includes a string containing the variable name): DD <- function(f, var.string="x", order=1){ res <- f body.res <- body(f) i <- 1 while(i <= order){ body.res <- D(

[R] aggregating a daily zoo object to a weekly zoo object

2010-08-01 Thread Erin Hodgess
Dear R People: I'm trying to convert a daily zoo object to a weekly zoo object: xdate <- seq(as.Date("2002-01-01"),as.Date("2010-07-10"),by="day") library(zoo) length(xdate) xt <- zoo(rnorm(3113),order=xdate) xdat2 <- seq(index(xt)[1],index(xt)[3113],by="week") xt.w <- aggregate(xt,by=xdat2,

Re: [R] How to deal with more than 6GB dataset using R?

2010-08-01 Thread Jing Li
I tried several ways: 1. I used the scan() function, it can read the 6GB file into the memory without difficulty, just took some time. But just read into the memory was definitely not enough, when I did the next step, which was to plot() and then tried to build the nonlinear regression model, it

Re: [R] Help -normal distribution

2010-08-01 Thread Ben Bolker
n.a.s gmail.com> writes: > > Hi , can any one help in this problem > > According to some study, the height for Northern European adult males is > normally distributed with an average of 181 centimeter and a standard > deviation of 7.3 centimeter. Suppose such an adult male is randomly chosen. >

Re: [R] Help -normal distribution

2010-08-01 Thread Arun.stat
try qnorm(40/200) -- View this message in context: http://r.789695.n4.nabble.com/Help-normal-distribution-tp2309730p2309735.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] Help -normal distribution

2010-08-01 Thread n.a.s
Hi , can any one help in this problem According to some study, the height for Northern European adult males is normally distributed with an average of 181 centimeter and a standard deviation of 7.3 centimeter. Suppose such an adult male is randomly chosen. Let X be height of that person. The nex

[R] How to connect R with SAP/ERP

2010-08-01 Thread Jim Callahan
> > Anyone knows if there is a way to connect R with the ERP SAP? Very big question. An ERP is an accounting system typically for a large business or governmental entity (ERP = "Enterprise Resource Planning" system). Modern ERPs are typically built on top of (multi-user) relational data base mana

Re: [R] Problem with "par" and "bubble plot"

2010-08-01 Thread Filoche
Hhi there. Here's the example. pdf(file="C:/Users/Modelisation/Desktop/BubblePlot.pdf", width = 15, height = 15, family = "Times", pointsize = 25); par(mfcol = c(3,3), mar = c(3,3,3,3), oma = c(0,0,0,0)); for (i in 5:33) { print(bubble(temp,i, col = "cornflowerblue"));

[R] How to understand whether a class is a S3 class?

2010-08-01 Thread Megh Dal
Hi, is there any way to say: "this class 'x' is a S3 class?" For example what is the type of class "data.frame"? Is it a S3 class or S4? How can I get a complete list of all S3 classes currently available? Thanks, __ R-help@r-project.org mailing list

Re: [R] Can saved R object .RData files be loaded by more than one R sessions for read only purpose?

2010-08-01 Thread jim holtman
Yes, they are just a file that as many processes as you want to access them; just be careful if you do update the file unless you are somehow locking it. On Sun, Aug 1, 2010 at 10:00 AM, 顾小波 wrote: > Especially for large ff objects. > > > > > > Xiaobo.Gu > > > > >        [[alternative HTML versio

[R] ScrapeR Unanticipated XML objects

2010-08-01 Thread Sparks, John James
Dear All, I have come across a very surprising result as I have started to learn how to use R to pull data from the web for analysis. I am trying to isolate that table headers for the quarterly income statement (qtrinc) that I pulled from Google finance. I executed the following commands after i

Re: [R] Meaning of following function

2010-08-01 Thread Matt Shotwell
Ron, In arithmetic, '-' and '+' are binary _and_ unary operators. That is, both -1 and 1-1 are valid arithmetic expressions, the former negates its argument, and the latter subtracts the second from the first. Since much of R is designed do arithmetic, R honors the unary _and_ binary versions of '

Re: [R] Meaning of following function

2010-08-01 Thread Joshua Wiley
On Sun, Aug 1, 2010 at 7:56 AM, Ron Michael wrote: > Hi friends, I am aware of the function "-"() which acts as minus in ordinary > computations. For example: > >> "-"(3, 1) > [1] 2 > > However what is the meaning of >> "-"(3) > [1] -3 This seems quite functionally useful; consider the behavior

Re: [R] Meaning of following function

2010-08-01 Thread Nikhil Kaza
well "*"(3,2) works but "*"(3,2,3) does not. You should now be able to figure out the logic. It is related to the number of arguments that make sense. Nikhil Kaza Asst. Professor, City and Regional Planning University of North Carolina nikhil.l...@gmail.com On Aug 1, 2010, at 10:56 AM, R

Re: [R] Permutation of a sequence to without changing local distribution

2010-08-01 Thread Wu Gong
It would be helpful if you give a sample data to illustrate the problem. I really can't understand what you want:) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/Permutation-of-a-sequence-to-without-changing-local-distribution-tp2309283p2309616.html Sent from

Re: [R] Lognormal distribution - Range Factor

2010-08-01 Thread Charles C. Berry
On Sun, 1 Aug 2010, ted.hard...@manchester.ac.uk wrote: On 01-Aug-10 10:59:03, Tims Corbett wrote: Hi, What does it mean to say Lognormal distribution with a mean of 1.03E-6 with a range factor of 100 ? How can I find the lognormal distribution paramters from this information? Thanks, Tims I

[R] some questions about rattle.

2010-08-01 Thread 顾小波
Hi, Can rattle utilize parallel processing mechanisms such as foreach? Can rattle analyze ff objects ? Xiaobo.Gu [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

[R] Can saved R object .RData files be loaded by more than one R sessions for read only purpose?

2010-08-01 Thread 顾小波
Especially for large ff objects. Xiaobo.Gu [[alternative HTML version deleted]] __ 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.

[R] Meaning of following function

2010-08-01 Thread Ron Michael
Hi friends, I am aware of the function "-"() which acts as minus in ordinary computations. For example:   > "-"(3, 1) [1] 2 However what is the meaning of > "-"(3) [1] -3 I was expecting R to generate some error as it does for "*"(3). What is the logic for that calculation?   Thanks,

[R] ff objects and ordinary analytical functions.

2010-08-01 Thread 顾小波
Hi, Can the plenty of analytical functions provided by base R and contributed packages be called with ff objects as parameters directly, or do we have to write special version of the functions for ff objects? If it is the latter case, is there a list of functions which support ff objec

[R] Package ff and parallel processing

2010-08-01 Thread 顾小波
Hi, After reading the slices from ff project site I know ff can be used with snowfall to achieve parallel processing, I want to know is it the only way, can we combine package foreach and ff, especially in a SMP server, with doMC and multicore behind foreach. Xiaobo.Gu [[altern

[R] BCa-intervals not defined in boot.ci() for tsboot() -> package: boot

2010-08-01 Thread Andreas Klein
Hello everybody, when I create an object of class boot with the function tsboot() from the package boot and try to compute several types of confidence intervals with boot.ci("object of class boot created with tsboot") I obtain the warning message, that "BCa-intervals are not defined for time-se

Re: [R] Modifying glm.fit() / execution path

2010-08-01 Thread Benjamin Ridenhour
Thanks for confirming my suspicions! And yes, I (clearly) don't understand how namespaces work in R. I've only been able to find bits and pieces on the web (and the Intro to R). Most of these have been confused and don't tell you much. The Intro to R states: "Namespaces prevent the user's definitio

[R] Fwd: Using R for Multiple Regression

2010-08-01 Thread Ambikesh Jayal
-- Forwarded message -- From: Ambikesh Jayal Date: Sun, Aug 1, 2010 at 2:24 PM Subject: Re: [R] Using R for Multiple Regression To: ted.hard...@manchester.ac.uk Hi Ted, Thanks to all those who have replied. It was very helpful. As there can be multiple solutions, is there a way

[R] How to create ff objects from database connection

2010-08-01 Thread 顾小波
Hi Does anybody know how to create ff objects with data reading from stream objects, such as data reading from PostgreSQL database through RPostgreSQL. For this purpose although we can save the data to a csv file through external tools and then read it through csv readers, but it requires one m

Re: [R] Constructing arguments for plotmath

2010-08-01 Thread Wu Gong
I failed many times until Gabor gave his solution. The magic tick! PART1 <- 'TEXT' PART2 <- '^' PART3 <- '`\u00ae`' ARG <- paste(PART1, PART2, PART3) text(2,8, parse(text=str)) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/Constructing-arguments-for-plotmat

Re: [R] Constructing arguments for plotmath

2010-08-01 Thread Gabor Grothendieck
On Sun, Aug 1, 2010 at 11:03 AM, Dennis Fisher wrote: > Colleagues, > > I am encountering difficulty adding formatted text to a graphic.   > Specifically, I want to add a superscript in the middle of a text string but > I would like to format the text string on the fly.  The commands: >        pl

Re: [R] Constructing arguments for plotmath

2010-08-01 Thread David Winsemius
On Aug 1, 2010, at 11:03 AM, Dennis Fisher wrote: Colleagues, I am encountering difficulty adding formatted text to a graphic. Specifically, I want to add a superscript in the middle of a text string but I would like to format the text string on the fly. The commands: plot(1,1

Re: [R] Lognormal distribution - Range Factor

2010-08-01 Thread Tims
Thanks Ted, > I came across this "range factor" in the context of Bayesian analysis: > > The range factor of the lognormal distribution was fixed to 100 which > provides a very broad distribution and might be regarded as slightly > informative prior. > > This is all I have about the jargon. > Tims

[R] Constructing arguments for plotmath

2010-08-01 Thread Dennis Fisher
Colleagues, I am encountering difficulty adding formatted text to a graphic. Specifically, I want to add a superscript in the middle of a text string but I would like to format the text string on the fly. The commands: plot(1,1) ARG <- bquote('TEXT'^'\u00ae') mtext(

Re: [R] Is profile.mle flexible enough?

2010-08-01 Thread Ben Bolker
Peter Dalgaard gmail.com> writes: > Issue #2 is stickier. I think I must say that the idelology of mle() is > that the user passes a likelihood function. If the likelihood function > depends on global data, and the user changes the global data, the user > deserves what he or she gets... It is pre

Re: [R] question!!

2010-08-01 Thread Nikhil Kaza
?replicate ?apply ?sapply Nikhil Kaza Asst. Professor, City and Regional Planning University of North Carolina nikhil.l...@gmail.com On Aug 1, 2010, at 2:42 AM, leepama wrote: hi!! imade many codes during these days.. I study Statistics please one more question!! ex1<-function(n,p,rho){

Re: [R] finding max value in a row and reporting colum name

2010-08-01 Thread Ilaria Prosdocimi
pdb philbrierley.com> writes: > > > Hi, > > Here is what I need to generate... > > 1 x > 2 z > 3 z > 4 y > > Any pointers would be appreciated. > > Regards, > this should work, probably other options are possible a <- data.frame(x = rnorm(4), y = rnorm(4), z = rnorm(4)) z<-apply(a,

Re: [R] finding max value in a row and reporting colum name

2010-08-01 Thread Dennis Murphy
a <- data.frame(x = rnorm(4), y = rnorm(4), z = rnorm(4)) > names(a)[apply(a, 1, which.max)] [1] "y" "z" "z" "y" > a x y z 1 -0.8839957 -0.8824065 -0.9343157 2 0.3918695 1.4246880 1.6401349 3 -0.4020719 0.1342691 0.8041808 4 0.1500775 0.8966310 -0.2204660 HTH, D

[R] lable switching problem

2010-08-01 Thread Na.Ebrahimi
Hi, I want to know if there is any package in R to do relableing algorithm for solving lable switching problem in bayesian inferences I would be so glad if you help me thank you in anticipation [[alternative HTML version deleted]] __ R-help@r-p

Re: [R] Lognormal distribution - Range Factor

2010-08-01 Thread Ted Harding
On 01-Aug-10 10:59:03, Tims Corbett wrote: > Hi, What does it mean to say Lognormal distribution with a mean of > 1.03E-6 with a range factor of 100 ? How can I find the lognormal > distribution paramters from this information? > > Thanks, Tims If you can, please say what is meant by "range facto

[R] Lognormal distribution - Range Factor

2010-08-01 Thread Tims Corbett
Hi, What does it mean to say Lognormal distribution with a mean of 1.03E-6 with a range factor of 100 ? How can I find the lognormal distribution paramters from this information? Thanks, Tims [[alternative HTML version deleted]] __ R-help@r-pro

[R] finding max value in a row and reporting colum name

2010-08-01 Thread pdb
Hi, Hopefully someone can point me in the right direction on how I would go about solving the following. I have some data and need to find the column name of the maximum value in each row. This could be the data... > a <- data.frame(x = rnorm(4), y = rnorm(4), z = rnorm(4)) > a x

Re: [R] Please help with getting started

2010-08-01 Thread Jim Lemon
On 08/01/2010 05:27 PM, MELOSHINI NAICKER wrote: Please help. I have installed R commander. I am currently running Windows 7. Everytime I type library(Rcmdr), it reads "Error in library(Rcmdr) : there is no package called 'Rcmdr what can I do to rectify this problem. I am currently a student at

[R] Please help with getting started

2010-08-01 Thread MELOSHINI NAICKER
Please help. I have installed R commander. I am currently running Windows 7. Everytime I type library(Rcmdr), it reads "Error in library(Rcmdr) : there is no package called 'Rcmdr what can I do to rectify this problem. I am currently a student at UQ in Australia and followed their instructions for

Re: [R] Is profile.mle flexible enough?

2010-08-01 Thread Peter Dalgaard
Arnaud Le Rouzic wrote: > Hi the list, > > I am experiencing several issues with profile.mle (and consequently with > confint.mle) (stat4 version 2.9.2), and I have to spend a lot of time to > find workarounds to what looks like interface bugs. I would be glad to > get feedback from experienced

[R] question!!

2010-08-01 Thread leepama
hi!! imade many codes during these days.. I study Statistics please one more question!! ex1<-function(n,p,rho){ muvec1=zeros(1,p) A=eye(p) for(i in 1:p){ for(j in 1:p){ A[i,j]=rho^(abs(i-j)) X=mvrnorm(n,muvec1,A)}} return(X) } this code generates design matrix in linare regr

[R] Permutation of a sequence to without changing local distribution

2010-08-01 Thread thmsfuller...@gmail.com
Hello All, Suppose that I have a sequence of letters (e.g., A..Z). I want to permute the sequence to generate random sequences, such that the local density of any letter with a window (say of length L) doesn't change much before and after permutation. One way that I can thing of is to require tha

[R] Picking Part of Large R Object

2010-08-01 Thread Sparks, John James
Dear All, I have imported an HTML document to R (called tables) and wish to select certain pieces of it for processing. The first few lines of the object appear as follows: > tables [[1]] In Millions of USD (except for per share items) 3 months ending 2010-06-30 3 months ending 2010