Re: [R] System of logistics Equations

2009-02-23 Thread Paul Johnson
On Fri, Feb 20, 2009 at 4:19 AM, Bernardo Rangel Tura wrote: > Hi R-masters > > I need yours help about a problema in one of may ongoing researchers. > > In my research the subjects (20 in total) answer 60 questions (20 type > G, 20 type S and 20 type P). > > Which questions is classified about 3

[R] lmer, estimation of p-values and mcmcsamp

2009-02-23 Thread Maureen Ryan
(To the list moderator: I just subscribed to the list. Apologies for not having done so longer before trying to post.) Hi all, I am currently using lmer to analyze data from an experiment with a single fixed factor (treatment, 6 levels) and a single random factor (block). I've been trying to

Re: [R] re ad.table prn file

2009-02-23 Thread canadiangirl19
It works thanks a lot Philipp Pagel-5 wrote: > > On Mon, Feb 23, 2009 at 06:24:33AM -0800, canadiangirl19 wrote: >> write.fwf(test,file="E:/test.prn",widths=6), >> but get the error: >> Fehler in write.table(t(as.matrix(colnamesMy)), file = file, append = >> append, : >> unbenutzt

Re: [R] question about loading date file in R

2009-02-23 Thread Yihui Xie
The interface is so self-explaining... Data --> Import data --> text files... # pls don't mind :) library(fortunes) fortune(15) Regards, Yihui -- Yihui Xie Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage: http://www.yihui.name School of Statistics, Room 1037, M

[R] Games-Howell function for post-hoc multiple comparisons

2009-02-23 Thread Stropharia
Dear R users, I am conducting multiple comparisons among 12 groups (after a significant F-test) that are heteroscedastic (as judged by a significant Levene's test). It seems from the literature that the Games-Howell post-hoc test is the most appropriate for these data - but, I can't seem to locat

Re: [R] array manipulation simple questions

2009-02-23 Thread andrew
On Feb 24, 3:57 pm, jdeisenberg wrote: > Λεωνίδας Μπαντής wrote: > > > 1.   Suppose I have a<-c(1:10)  (or a<-array(c(1:10),dim=c(1,10))) > > > and I want to end up with vector b=[0 0 0 0 0 1 1 1 1 1]. i.e. I want to > > substitute alla elements that are <5 with 0 and >5 with 1. > > I think you

Re: [R] array manipulation simple questions

2009-02-23 Thread Gabor Grothendieck
2009/2/23 Λεωνίδας Μπαντής : > > Hi there, > > I am pretty new to R. Actually I started using it yesterday. I have two > questions: > > 1.   Suppose I have a<-c(1:10)  (or a<-array(c(1:10),dim=c(1,10))) > > and I want to end up with vector b=[0 0 0 0 0 1 1 1 1 1]. i.e. I want to > substitute alla

[R] Help How to use a loop to do pair comparison

2009-02-23 Thread Chunhao Tu
Hi R users, I have a question. How can I use for loop to do pair comparisons. For example, > x<-c(1,2,3) > result<-matrix(data=NA, nrow=choose(3,2), ncol=1) > for(i in 1: length(x)) +{ result[i,]<-ifelse(x[i] > x[i+1], yes="Big", no="Small") + result} > result [,1] [1,] "Sm

Re: [R] array manipulation simple questions

2009-02-23 Thread jdeisenberg
Λεωνίδας Μπαντής wrote: > > 1. Suppose I have a<-c(1:10) (or a<-array(c(1:10),dim=c(1,10))) > > and I want to end up with vector b=[0 0 0 0 0 1 1 1 1 1]. i.e. I want to > substitute alla elements that are <5 with 0 and >5 with 1. > I think you mean >=5, not > 5. In that case, try this:

Re: [R] Help with R and MySQL

2009-02-23 Thread Aaron Barzilai
Thanks Jeff, that was exactly the problem. When I unzipped the version at the page below for my version of MySQL (5.1), it worked fine. The version I downloaded through install.packages() must have been for 5.0. Thanks so much for the help and quick response, Aaron ___

[R] help: calculations for causespecific hazard ratios in a competing risks analysis with timedependent covariates

2009-02-23 Thread sdzhangping
Dear R users: Analysis of the impact of a time-dependent covariate (GVHD or use of steroid after bone marrow transplantation) on two competing endpoints (invasive fungal infection and death) is frequently encountered in the setting of BMT data. Coxph package can be used as the following:

Re: [R] Welcome to the "R-help" mailing list

2009-02-23 Thread sdzhangping
Dear R users: Analysis of the impact of a time-dependent covariate (GVHD or use of steroid after bone marrow transplantation) on two competing endpoints (invasive fungal infection and death) is frequently encountered in the setting of BMT data. Coxph package can be used as the following:

[R] All the products of common factors

2009-02-23 Thread Fox, Gordon
This is a seemingly simple problem - hopefully someone can help. Problem: we have two integers. We want (1) all the common factors, and (2) all the possible products of these factors. We know how to get (1), but can't figure out a general way to get (2). Example: 40 and 80 have these factors: c

[R] multinom() and multinomial() interpretation

2009-02-23 Thread Grant Gillis
Hello and thanks in advance for any advice. I am not clear how, in practice, the multinom() function in nnet and the multinomial() function in VGAM differ in terms of interpretation. I understand that they are fit differently. Are there certain scenarios where one is more appropriate than the ot

Re: [R] Semantics of sequences in R

2009-02-23 Thread Raubertas, Richard
> From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Duncan Murdoch > Sent: Sunday, February 22, 2009 4:13 PM > > I think this was posted to the wrong list, so my followup is going to > R-devel. > > On 22/02/2009 3:42 PM, Stavros Macrakis wrote: > > Inspi

Re: [R] Simple seq() boolean equality problem

2009-02-23 Thread Rolf Turner
On 24/02/2009, at 2:29 PM, Daniel G Polhamus wrote: Hi all, thanks in advance for the help. Can someone explain to me the following result, and what I'm doing wrong in the second case? seq(-43.7,-43.69,.001)[3]==-43.698 [1] TRUE seq(-43.7,-43.69,.001)[2]==-43.699 [1] FALSE seq(-43.7,-

Re: [R] equivalent function to MatLab 'step' ?

2009-02-23 Thread Carl Witthoft
Well, I found out part of the confusion: The modern versions of MatLab renamed their function from 'step' to 'stepz' . Stepz(num,den) provides a calculation of the time-response to a step function based on the system state equation defined by the num and den coefficients. So, is there some

[R] Simple seq() boolean equality problem

2009-02-23 Thread Daniel G Polhamus
Hi all, thanks in advance for the help. Can someone explain to me the following result, and what I'm doing wrong in the second case? > seq(-43.7,-43.69,.001)[3]==-43.698 [1] TRUE > seq(-43.7,-43.69,.001)[2]==-43.699 [1] FALSE > seq(-43.7,-43.69,.001)[1]==-43.7 [1] TRUE Dan __

[R] question about loading date file in R

2009-02-23 Thread 850426
I am trying to load a .csv file in the R commander, but the output window always showed that "Error: bad restore file magic number(file may be corrupted)--no data loaded". Did any one know why does this happen? btw, I can open this file in commander by "open script file". Many thanks! -- View th

[R] [S] ASA Southern California Chapter Applied Statistics Workshop

2009-02-23 Thread Madeline Bauer
The workshop organizing committee of the Southern California Chapter of the American Statistical Association announces the 28th Annual Workshop in Applied Statistics. Professor Colin Cameron from the department of Economics at UC Davis will give a one-day workshop titled "Advances in Count Data

[R] array manipulation simple questions

2009-02-23 Thread Λεωνίδας Μπαντής
  Hi there,   I am pretty new to R. Actually I started using it yesterday. I have two questions:   1.   Suppose I have a<-c(1:10)  (or a<-array(c(1:10),dim=c(1,10)))   and I want to end up with vector b=[0 0 0 0 0 1 1 1 1 1]. i.e. I want to substitute alla elements that are <5 with 0 and >5 with

Re: [R] Formula that includes previous row values

2009-02-23 Thread Pele
Hi Greg - this is perfect - Thank You! Also, thanks to everyone for the other suggestions Greg Snow-2 wrote: > > How about: > > x3 <- cumsum( x2* 0.24^(5:0) ) / 0.24^(5:0) > > with the 5 replaced by the length -1 for the more general case. > > -- > Gregory (Greg) L. Snow Ph.D. > Statistic

Re: [R] why results from regression tree (rpart) are totallyinconsistent with ordinary regression

2009-02-23 Thread Weidong Gu
Hi Bert, Thanks for your prompt response. Yeah, summary() shows the correct answer, seemingly, plot() and text() reverse the direction of >= sign, a bit confusion. Weidong Gu -Original Message- From: Bert Gunter [mailto:gunter.ber...@gene.com] Sent: Monday, February 23, 2009 5:14 PM T

[R] predicting cumulative hazard for coxph using predict

2009-02-23 Thread Zainab Jamal
Hi I am estimating the following coxph function with stratification and frailty where each person had multiple events. m<-coxph(Surv(dtime1,status1)~gender+cage+uplf+strata(enum)+frailty(id),xmodel)   > head(xmodel) id enumdtime status gender cage uplf 1 10086661 2259.14120

Re: [R] why results from regression tree (rpart) are totallyinconsistent with ordinary regression

2009-02-23 Thread Bert Gunter
You did not read the tree graph correctly. Mortality is **not** "positively related" to incidence. You're reading the tree backwards. Read the output of summary() on your rpart fit object for clarity. -- Bert Gunter Genentech -Original Message- From: r-help-boun...@r-project.org [mailt

[R] why results from regression tree (rpart) are totally inconsistent with ordinary regression

2009-02-23 Thread Weidong Gu
Hi, In my analysis of impacts of insecticide-treated bednets on malaria, I look at the relationship between malaria incidence and mosquito behaviors. The condensed data set is copied here. Ordinary regression (lm) shows that Incidence was negatively related to Mortality. This makes sense because t

Re: [R] Formula that includes previous row values

2009-02-23 Thread Greg Snow
How about: x3 <- cumsum( x2* 0.24^(5:0) ) / 0.24^(5:0) with the 5 replaced by the length -1 for the more general case. -- 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-projec

Re: [R] Slow indexing access for Matrix

2009-02-23 Thread Peter Dalgaard
Niels Richard Hansen wrote: Consider the following little "benchmark" > require(Matrix) > tmp <- Matrix(c(rep(1,1000),rep(0,9000)),ncol=1) > ind <- sample(1:1,1) > system.time(tmp[ind,]) user system elapsed 0.004 0.001 0.005 > ind <- sample(1:1000,1,replace=TRUE) > s

Re: [R] Formula that includes previous row values

2009-02-23 Thread Christos Hatzis
Here's a way without a loop: x <- read.table(textConnection("ID X2 1.001.00 2.000.00 3.001.00 4.003058 5.000.00 6.006.00"),header=TRUE) closeAllConnections() x$X3 <- append(x$X2, 0, 0)[-nrow(x)] x$X4 <- as.matrix(x[,2:3]) %*% c(1, 0.24) > x ID X2 X3 X4 1

Re: [R] Formula that includes previous row values

2009-02-23 Thread Pele
Hi Jorge - many thanks for you suggestion, but I am looking for a way where I don't have to use a loop. I meant to include that in my description. Thanks again! Jorge Ivan Velez wrote: > > Dear Pele, > Probably not the best way to proceed but it works: > > X<-read.table(textConnection("ID

Re: [R] Formula that includes previous row values

2009-02-23 Thread Jorge Ivan Velez
Dear Pele, Probably not the best way to proceed but it works: X<-read.table(textConnection("ID X2 1.001.00 2.000.00 3.001.00 4.003058 5.000.00 6.006.00"),header=TRUE) closeAllConnections() X x3<-0 for(i in 2:(nrow(X)+1)) x3<-c(x3, X$X2[i-1]+0.24*x3[i-1]) X$x3<-x3[-1]

Re: [R] Obtaining Least Square Means with lme (mixed models)

2009-02-23 Thread Bert Gunter
?predict.lme, probably with level =0. -- Bert Gunter Genentech -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Claudia Ceballos Sent: Monday, February 23, 2009 9:50 AM To: r-h...@stat.math.ethz.ch Subject: [R] Obtaining Least Squa

[R] Slow indexing access for Matrix

2009-02-23 Thread Niels Richard Hansen
Consider the following little "benchmark" > require(Matrix) > tmp <- Matrix(c(rep(1,1000),rep(0,9000)),ncol=1) > ind <- sample(1:1,1) > system.time(tmp[ind,]) user system elapsed 0.004 0.001 0.005 > ind <- sample(1:1000,1,replace=TRUE) > system.time(tmp[ind,]) user syst

[R] Formula that includes previous row values

2009-02-23 Thread Pele
Hi R users, Is there an easy way in R to generate the results table below using table 1 and the formula (simplified version of the real problem)? It would be easy if I knew the R equivalent of SAS's retain function, but could not find one. Thanks in Advance for any help! table1: ID X2

Re: [R] ARIMA question

2009-02-23 Thread Giovanni Petris
> Date: Mon, 23 Feb 2009 14:03:07 -0500 (EST) > From: otu...@clemson.edu > Sender: r-help-boun...@r-project.org > Importance: Normal > Precedence: list > User-Agent: SquirrelMail/1.4.13 > > Hello - > > How do I simulate multivariate ARIMA data? > You can use package dlm. There is a function --

Re: [R] simple graphing question

2009-02-23 Thread David M Smith
If I understand your example correctly, I think you're looking for a dot-chart like this one from the R Graph Gallery: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=150 You'd just need to replace the green/blue circles with X's and O's, respectively. Provided you reorganize your d

[R] simple graphing question

2009-02-23 Thread William Deese
I have what should be a simple question but I've been unable to solve it in a reasonable length of time. For example with data like > ge product response scenario 1wine5 base 2 steel 10 base 3 sugar4 base 4wine -10 policy 5 steel1 p

Re: [R] Listbox in R

2009-02-23 Thread Greg Snow
Look at the tkwait.window function as one possibility. -- 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-boun...@r- > project.org] On Behalf Of RUSER2

[R] Listbox in R

2009-02-23 Thread RUSER2009
I am trying to display a set of listboxes in a systematic manner. For instance, I display Listbox 1, let the user pick the parameters of interest then destroy it. Now I display Listbox 2 and so on. So in essence I would like to create listboxes in a "for -loop". When I try to loop - all the

Re: [R] System of logistics Equations

2009-02-23 Thread Arne Henningsen
Hi Bernardo, the systemfit package cannot be used to estimate a system of logistic equations. Arne On Friday, 20. February 2009 05:19:40, Bernardo Rangel Tura wrote: > Hi R-masters > > I need yours help about a problema in one of may ongoing researchers. > > In my research the subjects (20 in t

[R] ARIMA question

2009-02-23 Thread otunno
Hello - How do I simulate multivariate ARIMA data? I am familiar with the "arima.sim" function, which I have used several times to generate univariate data, but when I type "help(arima.sim)", the information I get back reveals nothing about possible multivariate options. Please reply when you ge

Re: [R] Help in writing my own function

2009-02-23 Thread Chun-Hao Tu
Hi Ted, I strongly recommend a book: S programming by W.N Venables and B.D Ripley ISBN: 0387-989668 It is easy to read. I love this book so much. Maybe someone has better idea. Super Chunhao > Date: Mon, 23 Feb 2009 04:56:18 -0800 > From: zengzhenx...@gmail.com > To: r-help@r-projec

[R] Obtaining Least Square Means with lme (mixed models)

2009-02-23 Thread Claudia Ceballos
Hi Dear Alex, A few years ago you sent this email to R list: Hello, I was wondering how one could obtain LSM for fixed factors in a mixed-effect model using lme. In other words, if I have model such as: model<-lme(yield~period+treatment+period*treatment, data=data,random=~1|cow) how can I get LSM

Re: [R] are arithmetic comparison operators binary?

2009-02-23 Thread Wacek Kusnierczyk
Martin Maechler wrote: >> "WK" == Wacek Kusnierczyk >> on Mon, 23 Feb 2009 12:06:32 +0100 writes: >> > > Thank you, Wacek, > though .. "wrong mailing list" > apologies. i was actually asking for explanation, assuming that it might be my misunderstanding, rather

Re: [R] trade-off between speed and storage in matrix multiplications

2009-02-23 Thread Christos Hatzis
You might want to compare the performance of your version to the kronecker method of Matrix (Matrix package) that has appropriate versions for sparse matrices etc. -Christos > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Cam

[R] trade-off between speed and storage in matrix multiplications

2009-02-23 Thread Camarda, Carlo Giovanni
Dear R-users, I coded two equivalent ways to perform (in a simplified version) some matrix multiplications I would like to use in a more general framework. In the first case I used Kronecker product and vectorization of a certain matrix. This approach takes less time, but, as you may guess

[R] Get top cluster for each item in a correlation matrix

2009-02-23 Thread Tan, Richard
Hi, I posted a question a few days ago and got extremely well response. https://stat.ethz.ch/pipermail/r-help/2009-February/188225.html. Now I have a somewhat related question: I have a correlation matrix of about 3000 items, with 1 on diagonal ( for example, cor.mat <- cor(matrix(rnorm(3000*1

Re: [R] Insurance data in library(MASS)

2009-02-23 Thread Prof Brian Ripley
You are asking about support software for a book, and the book contains the answers And it should be given due credit. On Mon, 23 Feb 2009, choonhong ang wrote: I have used the insurance data from R library and I have 2 questions: I use the following: library(MASS) data(Insurance) m1=gl

Re: [R] Insurance data in library(MASS)

2009-02-23 Thread Greg Snow
In the Insurance dataset both Age and Group are ordered factors so the default encoding for them is orthogonal polynomials (assuming that the user has not changed the default). In the output below the .L indicates that line is for the "Linear" piece of the encoding or the Linear contrast on the

Re: [R] if statement of a vector

2009-02-23 Thread Jorge Ivan Velez
Hi there, Try this: x<-your.vector x[x>10] HTH, Jorge On Mon, Feb 23, 2009 at 12:31 PM, bioinformatics_guy wrote: > > right now I have a vector of about 1000 points. I'd like to iterate through > each of these points and and test if it is greater than a certain value and > if not, throw it o

[R] if statement of a vector

2009-02-23 Thread bioinformatics_guy
right now I have a vector of about 1000 points. I'd like to iterate through each of these points and and test if it is greater than a certain value and if not, throw it out. x=vector y=empty vector j=0 for i (0..length[vector]) if x[i] > 10 y[j] = x[i] j++ Thats basical

Re: [R] line joining graphs

2009-02-23 Thread Greg Snow
You may want to look at the examples for the cnvrt.coords function in the TeachingDemos package for some ideas on how to draw lines between plots. However, it is better to use the grconvertX and grconvertY functions rather than the cnvrt.coords function (it will be deprecated one of these days)

[R] Insurance data in library(MASS)

2009-02-23 Thread choonhong ang
I have used the insurance data from R library and I have 2 questions: I use the following: >library(MASS) >data(Insurance) > m1=glm(Claims ~ District + Group + Age + offset(log(Holders)),data = Insurance, family = poisson) >summary(m1) Call: glm(formula = Claims ~ District + Group + Age + offset(l

Re: [R] Extracting xy from raster based on raster value

2009-02-23 Thread Michelle Greve
Dear Kingsford Thank you very much for your suggestion. It turns out I had downloaded an old version of raster. I also got a reply from the R-forge website with other suggestions. In case anybody using the R-help list is interested, here is the link: http://r-forge.r-project.org/forum/message.php

Re: [R] incomplete data analysis

2009-02-23 Thread Paul Heinrich Dietrich
I like the mi package, or when it's too large I use the Amelia package. evrim akar wrote: > > Dear R users, > > First of all, thank you for your help about goodness of fit tests. > > I have another set of data and i am sure it is incomplete. I searched for > incomplete data analysis with R bu

Re: [R] Support Vector Machine

2009-02-23 Thread Tony Breyal
There's loads of packages in the Machine Learning R Task View: http://cran.r-project.org/web/views/MachineLearning.html for example: package e1071 (http://cran.r-project.org/web/packages/ e1071/index.html) has a function called svm() On 23 Feb, 15:16, "Meir Preiszler" wrote: > Hi, > > I woul

[R] Follow-up to Reply: Overdispersion with binomial distribution

2009-02-23 Thread Jessica L Hite/hitejl/O/VCU
THANKS so very much for your help (previous and future!). I have a two follow-up questions. 1) You say that dispersion = 1 by definition dispersion changes from 1 to 13.5 when I go from binomial to quasibinomialdoes this suggest that I should use the binomial? i.e., is the dispersion fact

Re: [R] [R-pkgs] New package: exams - Automatic Generation of Standardized Exams

2009-02-23 Thread Adrian Dusa
Dear Bertina, This is an interesting solutions to generate unique tests for every student, and there are also some more possible approaches. We also faced this problem and our solution was to adopt the Moodle e-learning platform (http://www.moodle.org), create a large pool of exercises and each

Re: [R] Support Vector Machine

2009-02-23 Thread Prof Brian Ripley
The simplest to use is probably svm() in package e1071 or svmlight() in klaR, both interfaces to well respected SVM code (but e1071 includes the C++ code it uses). See also help.search("support vector") MAclinical::svm_x Classification based on support vector machines

[R] length 1 offset in glm

2009-02-23 Thread Kenneth Knoblauch
Hi, I'm trying to use an offset with glm. According to the glm man page offset ... This should be NULL or a numeric vector of length either one or equal to the number of cases. ... but with the following example, I get an error if the offset is of length 1 c1 <- structure(list(Contr = c(0.

Re: [R] Support Vector Machine

2009-02-23 Thread Crouch, Daniel
Hi, I use ksvm() in the kernlab package. If I recall correctly it's quite easy to implement, and has a choice of different kernals. Dan Daniel Crouch Research Student Department of Medical & Molecular Genetics King's College London 8th Floor, Tower Wing Guy's Hospital London SE1 9RT United Ki

Re: [R] "autonumber" for grouping variable

2009-02-23 Thread Dimitris Rizopoulos
say 'dat' is your data frame, then one way is the following: f <- factor(dat$Id, levels = unique(dat$Id)) dat$Number <- unclass(f) dat I hope it helps. Best, Dimitris clion wrote: Dear R users, my dataframe looks like this head(dat) Id sex byear age 1 300 m 2003 50 2 300 m 2003

[R] "autonumber" for grouping variable

2009-02-23 Thread clion
Dear R users, my dataframe looks like this head(dat) Id sex byear age 1 300 m 2003 50 2 300 m 2003 36 3 402f 2003 29 4 402f 2003 21 5 402f 2003 64 6 150 m 2005 43 ... ...(where Id is just the Identification number of Individual, sex (male or female), byear (=birth

[R] Support Vector Machine

2009-02-23 Thread Meir Preiszler
Hi, I would like to try using a Support Vector Machine on a classification problem that I'm dealing with. Does such a package exit in R? Thanks Meir Meir Preiszler - Research Engineer I t a m a r M e d i c a l Ltd. Caesarea, Israel: Tel: +(972) 4

Re: [R] Help with R and MySQL

2009-02-23 Thread Jeffrey Horner
Aaron Barzilai wrote: Hello, This forum has been very helpful to me in the past, and I've run out of ideas on how to solve my problem. I had been using R and MySQL (and Perl) together for quite some time successfully on my Windows XP machine. However, I recently had some problems with MySQL

Re: [R] r: intergrate behaviour

2009-02-23 Thread Ravi Varadhan
When the limits are infinite, it is not a good idea to use "large" but finite real numbers as approximate limits. It is best to use -Inf and/or +Inf. See the examples on the help page. Sometimes, setting a more stringent convergence criterion, i.e. decreasing rel.tol, helps, but it is best to us

Re: [R] Problem with library(RMySQL), registry pointer problem?

2009-02-23 Thread Jeffrey Horner
Yakub wrote: I have the following error: library(RMySQL) Error in fun(...) : A MySQL Registry key was found but the folder C:\Program Files\MySQL\MySQL Tools for 5.0\/. doesn't contain a bin or lib/opt folder. That's where we need to find libmySQL.dll. Error : .onLoad failed in 'loadNamespa

Re: [R] re ad.table prn file

2009-02-23 Thread Philipp Pagel
On Mon, Feb 23, 2009 at 06:24:33AM -0800, canadiangirl19 wrote: > write.fwf(test,file="E:/test.prn",widths=6), > but get the error: > Fehler in write.table(t(as.matrix(colnamesMy)), file = file, append = > append, : > unbenutzte(s) Argument(e) (widths = 6) > My matrix hast only one colum

Re: [R] are arithmetic comparison operators binary?

2009-02-23 Thread Martin Maechler
> "WK" == Wacek Kusnierczyk > on Mon, 23 Feb 2009 12:06:32 +0100 writes: Thank you, Wacek, though .. "wrong mailing list" WK> the man page for relational operators (see, e.g., ?'<') says: WK> " WK> Binary operators which allow the comparison of values in atomic vectors.

Re: [R] re ad.table prn file

2009-02-23 Thread canadiangirl19
I´ve tried with: write.fwf(test,file="E:/test.prn",widths=6), but get the error: Fehler in write.table(t(as.matrix(colnamesMy)), file = file, append = append, : unbenutzte(s) Argument(e) (widths = 6) My matrix hast only one column (so it is a vector), and many rows, I want to seperate

[R] r: intergrate behaviour

2009-02-23 Thread Allan Clark
hello R users strange behavior of the integrate function! i assume this occurs because of the way in which the quadriture is set up! (any comments.) f=function(x){exp(-exp(-x)-5*x)/gamma(5)} xx=seq(from=-20, to=20, length.out=1000) plot(xx,f(xx),type="l") integrate(f, lower=-Inf, upper= 1)

[R] Help with t.test

2009-02-23 Thread Amit Patel
Hi I have managed to do a paired t-test with a data set i have 5 colums of data im dealing with GENE              SampA              SampB              SampC                   SampVehicle ctcc                   859  

Re: [R] Help in writing my own function

2009-02-23 Thread Chuck Cleland
On 2/23/2009 7:56 AM, tedzzx wrote: > Dear all > > I am very intersted in writing my own function to deal with some complicated > task, but I don't know how to start. I can't find detial material with > examples teaching me how to write my own functions. Can anyone help me and > recommend me some

Re: [R] Help in writing my own function

2009-02-23 Thread jim holtman
That is covered in chapter 10 of the Intro to R document included in the distribution. On Mon, Feb 23, 2009 at 7:56 AM, tedzzx wrote: > > Dear all > > I am very intersted in writing my own function to deal with some complicated > task, but I don't know how to start. I can't find detial material w

Re: [R] how todefine an variable/column in a dataframe as numeric mode

2009-02-23 Thread jim holtman
First of all when read in you can define the class of each column. It sounds like you have a non-numeric in that column. If you are not using factors, then putting 'as.is=TRUE' will make sure that they are read in as characters. If you want to convert a column to numeric, do the following: df$c

[R] how todefine an variable/column in a dataframe as numeric mode

2009-02-23 Thread Mao Jianfeng
Hello dear R-users, I have a tricky problem of data manipulation with R. Although it seems very easy, I can not solve it by myselves. The problem is a variable in my dataset is usually be readed as "factor" (variable mode), however I want it be a "numeric" one. I want to know how can I define

Re: [R] re ad.table prn file

2009-02-23 Thread Philipp Pagel
On Mon, Feb 23, 2009 at 05:18:28AM -0800, canadiangirl19 wrote: > My problem is now, that my file has a > complicated structure: It is not tabstop seperated, it looks like that: > > JEAR JAN FEB MAR APR > 1938154 912 > 19396 71014 > 19409 > >

[R] incomplete data analysis

2009-02-23 Thread evrim akar
Dear R users, First of all, thank you for your help about goodness of fit tests. I have another set of data and i am sure it is incomplete. I searched for incomplete data analysis with R but I could not find any suggestion, or method. Lets say (totally hypothetical situation) from a distribution

[R] re ad.table prn file

2009-02-23 Thread canadiangirl19
Dear Forum, I´ve imported a prn file with read.table (file("E:/test.prn"),sep="\t",skip=3). My problem is now, that my file has a complicated structure: It is not tabstop seperated, it looks like that: JEAR JAN FEB MAR APR 1938154 912 19396 71014 1940999

[R] Problem with library(RMySQL), registry pointer problem?

2009-02-23 Thread Yakub
I have the following error: > library(RMySQL) Error in fun(...) : A MySQL Registry key was found but the folder C:\Program Files\MySQL\MySQL Tools for 5.0\/. doesn't contain a bin or lib/opt folder. That's where we need to find libmySQL.dll. Error : .onLoad failed in 'loadNamespace' for 'RMyS

[R] Help in writing my own function

2009-02-23 Thread tedzzx
Dear all I am very intersted in writing my own function to deal with some complicated task, but I don't know how to start. I can't find detial material with examples teaching me how to write my own functions. Can anyone help me and recommend me some learning material? Many Thanks Ted -- View

Re: [R] line joining graphs

2009-02-23 Thread baptiste auguie
Paul Murrell's book provides such an example using Grid (figure 5.22). A short example is available on his website: http://www.stat.auckland.ac.nz/~paul/grid/doc/moveline.pdf It may be possible to use this in conjunction with gridBase. baptiste On 22 Feb 2009, at 20:43, Eik Vettorazzi wrot

Re: [R] Diagnostics for single-observation deletion in Cox models

2009-02-23 Thread Terry Therneau
> Storer and Crowley (JASA 1985) presented an approach for approximating the > changes in maximum partial-likelihood parameter estimates for the Cox model > when a single observation is deleted. Is there an R implementation of this > approach? I found that the approximation of Reid and Crepeau

[R] Segmentation Fault still exists

2009-02-23 Thread Moumita Das
Hi All, Sorry to bother everyone again.Ofcourse Prof Ripley ,Yihui and Uwe had replied to my email.But this segmentation fault error was not solved.I agree with Prof Ripley,as he said my R and all other configurations,are very old.But what i don't understand is ,i was able to run analysis till few

Re: [R] [Rd] Semantics of sequences in R

2009-02-23 Thread Wacek Kusnierczyk
Stefan Evert wrote: >>> can you please stop repeating this nonsense? I don't think anybody >>> ever claimed that vectors can be considered list. >> >> yes, it is nonsense. yes, there is one person who repeatedly made this >> claim. please read the archives; specifically, [1]. note this >> statem

Re: [R] [Rd] Semantics of sequences in R

2009-02-23 Thread Stefan Evert
can you please stop repeating this nonsense? I don't think anybody ever claimed that vectors can be considered list. yes, it is nonsense. yes, there is one person who repeatedly made this claim. please read the archives; specifically, [1]. note this statement: "Note that any vec

Re: [R] Dates and times from Excel

2009-02-23 Thread Erich Neuwirth
RExcel (the addin package for RExcel I wrote) tries very hard to transfer dates and times from Excel to R. David Scott wrote: > > I have used xlsReadWrite to read data from an Excel spreadsheet. > > I had a problem with converting times of the day so that I could create > POSIXct date-time obj

Re: [R] difference between assignment syntax <- vs =

2009-02-23 Thread Kenneth Knoblauch
It's easier to read. Better machine-human interaction. ergonomic: (esp. of workplace design) intended to provide optimum comfort and to avoid stress or injury. Quoting Wacek Kusnierczyk : Ken Knoblauch wrote: Wacek Kusnierczyk idi.ntnu.no> writes: Thomas Lumley wrote: Although it's

Re: [R] difference between assignment syntax <- vs =

2009-02-23 Thread Wacek Kusnierczyk
Ken Knoblauch wrote: > Wacek Kusnierczyk idi.ntnu.no> writes: > > >> Thomas Lumley wrote: >> >>> Although it's probably true that most long-time R users use <-, this >>> is at least in part because a long-time R user would initially have >>> had to use <-, since = wasn't available in the d

Re: [R] difference between assignment syntax <- vs =

2009-02-23 Thread Ken Knoblauch
Wacek Kusnierczyk idi.ntnu.no> writes: > > Thomas Lumley wrote: > > > > Although it's probably true that most long-time R users use <-, this > > is at least in part because a long-time R user would initially have > > had to use <-, since = wasn't available in the distant past. > > > > I would sa

Re: [R] Fourier Row and spectral analysis

2009-02-23 Thread Peterko
Dieter Menne wrote: > > Peterko gmail.com> writes: > >> Original serie have 225 observing, but program use only 224. >> the most domain frequencies are f1=1/224 f2=1/122 f3=1/74,66 f4=1/56 >> f5=1/24,88 >> When i know these frequencies a can do, new variable ,nubmers of variavle >> is >> 2*nu

Re: [R] [Rd] Semantics of sequences in R

2009-02-23 Thread Wacek Kusnierczyk
Stefan Evert wrote: > Dear vQ, > >> vectors (can-be-considered-lists), > > can you please stop repeating this nonsense? I don't think anybody > ever claimed that vectors can be considered list. yes, it is nonsense. yes, there is one person who repeatedly made this claim. please read the archi

Re: [R] Fourier Row and spectral analysis

2009-02-23 Thread Dieter Menne
Peterko gmail.com> writes: > Original serie have 225 observing, but program use only 224. > the most domain frequencies are f1=1/224 f2=1/122 f3=1/74,66 f4=1/56 > f5=1/24,88 > When i know these frequencies a can do, new variable ,nubmers of variavle is > 2*nubmer of frequencies: > t<-1:225 > c1<-

[R] [R-pkgs] New package: exams - Automatic Generation of Standardized Exams

2009-02-23 Thread Bettina Gruen
Dear useRs, the new R package exams provides Sweave-based automatic generation of exams with multiple-choice questions and arithmetic problems. The package is available from CRAN: http://CRAN.R-project.org/package=exams It includes a vignette giving an overview of the main design aims and princ

Re: [R] difference between assignment syntax <- vs =

2009-02-23 Thread Wacek Kusnierczyk
Thomas Lumley wrote: > > Although it's probably true that most long-time R users use <-, this > is at least in part because a long-time R user would initially have > had to use <-, since = wasn't available in the distant past. > > I would say that it's entirely a matter of taste -- the things that

[R] are arithmetic comparison operators binary?

2009-02-23 Thread Wacek Kusnierczyk
the man page for relational operators (see, e.g., ?'<') says: " Binary operators which allow the comparison of values in atomic vectors. Arguments: x, y: atomic vectors, symbols, calls, or other objects for which methods have been written. " it is somewhat surprizing that the foll

Re: [R] Filtering a data frame using a string for colum header

2009-02-23 Thread Tony Breyal
Cheers guys, yeah, I was using this bit of code as my work around: > filter.col <- which(names(my.df)!="DrHorrible") > my.df[filter.col] but you guys had better solutions :-) Is there an R wish list somewhere? I tried google but couldn't find a specific location, just various threads here and

Re: [R] difference between assignment syntax <- vs =

2009-02-23 Thread Thomas Lumley
On Mon, 23 Feb 2009, Patrick Burns wrote: Since this topic came up, I've been thinking that that sentence needs more work. The "standard" is not from me -- I'm a bit more agnostic than the statement although I personally always use '<-'. I'm thinking a revised version might be something along

[R] R/Finance 2009: Applied Finance with R -- Registration now open

2009-02-23 Thread Dirk Eddelbuettel
R/Finance 2009: Applied Finance with R April 24 & 25, Chicago, IL, US The first annual R/Finance conference for applied finance using R , the premier free software system for statistical computation and graphics, will be held this spring in Chicago, IL, USA on Friday April 24 and

Re: [R] Using R in Java?

2009-02-23 Thread Fan Shao
Hi nicro, There's a way that we use a lot in our projects which allows Java to call R and capture the text/table/image outputs. In Java We call 'Rscript exampleScript.R' via shell command. The R script should generate an XML file when it finishes, describing what output was generated, then java c

  1   2   >