Re: [R] Code Help

2013-12-01 Thread Rolf Turner
problems of the world (or something like that) and maybe one or two other things. Your post should receive some sort of prize for consummate obtuseness. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Find the prediction or the fitted values for an lm model

2013-11-28 Thread Rolf Turner
ue with a relatively large x dataset. How can I do it? BTW, I thought the model "prodfn" should pass by (0,0), but I just wonder why the const is unequal to zero Because poly() produces orthonormalized polynomials, Look at poly(x1,4). It is not much like cbind(x1,x1^2,x1^3,x1^4),

Re: [R] Should there be an R-beginners list?

2013-11-27 Thread Rolf Turner
lists push messages to subscribers while web fora require one to use a browser, log in, then pull messages. Not nearly as convenient. Well expressed Rich. I agree with you completely. cheers, Rolf Turner __ R-help@r-project.org mailing list

Re: [R] use of bquote

2013-11-21 Thread Rolf Turner
On 11/22/13 18:47, William Dunlap wrote: a <- 2; b <- 3; xyplot(1:10 ~ a*(1:10), sub = c(bquote(a == .(a) ~ b==.(b the subtitle contains three copies of the "a = 2 b = 3" phrase. Why does it do that? How do I tell it to give me only one copy? To avoid it don't wrap bquote() with c(). The

Re: [R] Regression model

2013-11-21 Thread Rolf Turner
ok "Regression Modelling Strategies" (Springer, 2001). cheers, Rolf Turner On 11/22/13 12:52, srecko joksimovic wrote: Hi, I'm trying to fit regression model, but there is something wrong with it. The dataset contains 85 observations for 85 students.Those observations are

Re: [R] about the integrate

2013-11-21 Thread Rolf Turner
are going to use R you should learn its syntax and know about things like the re-cycling of vectors. cheers, Rolf Turner On 11/22/13 04:46, dan wang wrote: Hi all, I tried below two methods to calculate the integrate of a same function. Two different results are given. The first

Re: [R] quotation marks and scan

2013-11-17 Thread Rolf Turner
(1) The backslashes are not really there; they are an artefact of the R print() function. Try cat(u,"\n"). I think this might be an FAQ. (2) Is not your problem the fact that your are setting "replacement" equal to the thing you are trying to get rid of? I.e. don't you want v <- gsub(

Re: [R] optimization

2013-11-16 Thread Rolf Turner
! cheers, Rolf Turner __ 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] Bug in predict.lm?

2013-11-15 Thread Rolf Turner
I *do* see the same phenomenon that Bert describes and the code of predict.lm() *does* appear to contain a bug. There is a line: XRinv <- if (missing(newdata) && is.null(w)) But "w" gets assigned (as object$weights) only if (is.null(scale)). If that assignment is moved outside of the appl

Re: [R] Different output from lm() and lmPerm lmp() if categorical variables are included in the analysis

2013-11-13 Thread Rolf Turner
RTFM!!! :-) The help explicitly says "The default contrasts are set internally to (contr.sum, contr.poly) ". Set options(contrasts=c("contr.sum","contr.poly")) before your call to lm() and "atest" will agree with "aptest" all down

Re: [R] r package to solve for Nash equilibrium

2013-11-13 Thread Rolf Turner
ve to pick it out. cheers, Rolf Turner __ 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] Plotting multiple weibull distributions in one graph

2013-11-12 Thread Rolf Turner
nt to set from=0 and to=100 or thereabouts. You will probably want to plot each trace in a different colour; plot.function() takes a "col" argument. cheers, Rolf Turner On 11/13/13 18:44, kmmoon100 wrote: Hello, I am trying to plot multiple weibull distributions in one graph. Do

Re: [R] S4 vs S3. New Package

2013-11-09 Thread Rolf Turner
For my take on the issue see fortune("strait jacket"). cheers, Rolf Turner P. S. I said that quite some time ago and I have seen nothing in the intervening years to change my views. R. T. On 11/10/13 04:22, daniel schnaider wrote: Hi, I am working on a new credit

Re: [R] Crime hotspot maps (kernel density)

2013-11-08 Thread Rolf Turner
It is not clear to me what you want/need to do, but it is possible that the "spatstat" package (in particular the function density.ppp()) might help you. cheers, Rolf Turner On 11/08/13 23:10, David Studer wrote: Hi everybody, does anyone of you know how to create a (crim

Re: [R] prod and F90 product

2013-11-07 Thread Rolf Turner
tween 0 and 1.069678e-307 then you probably shouldn't be using computers. cheers, Rolf Turner __ 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.o

Re: [R] New fortune nomination ... was Re: R help-classification accuracy of DFA and RF using caret

2013-11-06 Thread Rolf Turner
On 11/07/13 13:19, David Winsemius wrote: Seen on StackOverflow. Any seconds? "I would heed the warnings and diagnostics. They are there for a reason. The Ostrich algorithm does not help you." -- Dirk Eddelbuettel commenting on StackOverflow when a questioner said he had not run R CMD che

Re: [R] R help-classification accuracy of DFA and RF using caret

2013-11-06 Thread Rolf Turner
On 11/07/13 10:57, David Winsemius wrote: I think you need to add a statistician to your committee. The difficulties you are facing (of which you appear to be unaware) are not just related to being new to R. Fortune? cheers, Rolf __

Re: [R] Efficient way to convert covariance to Euclidian distance matrix

2013-10-31 Thread Rolf Turner
(CM),"+") - 2*CM where "CM" is the covariance matrix. And then you might want to do DM <- sqrt(DM) to get back to the original units (as S. Ellison indicated). cheers, Rolf Turner __ R-help@r-project.org mailing list ht

Re: [R] Optimization failed in fitdistr (Weibull distribution)

2013-10-29 Thread Rolf Turner
On 10/29/13 19:44, peter dalgaard wrote: There really is no substitute for knowledge and understanding! Did it not occur to you that the Windspeed column needs to enter into your analysis? Fortune! cheers, Rolf Turner __ R

Re: [R] Revo R for Arima Implementation

2013-10-28 Thread Rolf Turner
Please get your act together or stop cluttering up the r-help list. cheers, Rolf Turner On 10/29/13 02:26, Anindita Chattopadhyay wrote: Hi Rolf, Thanks for the response. I have re-phrased the problem. Hope this will help. We're working on a project where our model tries to predi

Re: [R] Optimize function in R: unable to find maximum of logistic function

2013-10-28 Thread Rolf Turner
mum [1] 4.192436e-11 $objective [1] 1 I guess there's a problem with finding a gradient that is effectively (numerically) zero when "k" is equal to 5. cheers, Rolf Turner On 10/29/13 06:00, Shantanu MULLICK wrote: Hello Everyone, I want to perform a 1-D optimiz

Re: [R] nls function error

2013-10-27 Thread Rolf Turner
optim(c(1,1,-1),foo,x=x,y=y,method="BFGS") The estimates given by optim() are the same as those given by nls() with the 0.5, 0.5, -0.5 starting values. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/lis

Re: [R] Adding up normally distributed numbers seems to not create a t-distribution

2013-10-26 Thread Rolf Turner
-books. cheers, Rolf Turner > > Cheers, > > Tsjerk > > > On Sat, Oct 26, 2013 at 10:14 AM, Rolf Turner <mailto:r.tur...@auckland.ac.nz>> wrote: > > > > Absolutely nothing to do with the CLT. If X_1, ..., X_n are > i.i.d. N(mu, sigma^2

Re: [R] OT: The topic of reproducibility in the media

2013-10-26 Thread Rolf Turner
their own sense of inadequacy. cheers, Rolf Turner On 10/26/13 21:06, Liviu Andronic wrote: Dear all, I know that reproducibility is a big concern for the R community, so it may be interesting to some of the readers on this list that The Economist recently ran a series of articles deno

Re: [R] Adding up normally distributed numbers seems to not create a t-distribution

2013-10-26 Thread Rolf Turner
Absolutely nothing to do with the CLT. If X_1, ..., X_n are i.i.d. N(mu, sigma^2) then Xbar is N(mu,sigma^2/n). Exactly. No asymptotics, no approximations, no CLT. cheers, Rolf Turner On 10/26/13 20:17, Tsjerk Wassenaar wrote: > Hi :) > > Try this with other distribu

Re: [R] bug in dummy.coef?

2013-10-25 Thread Rolf Turner
On 10/25/13 19:24, Alexandra Kuznetsova wrote: Thank you for the reply! I need to use it in the package for constructing the contrast matrices. Really? Renaming a variable like y2 <- y^2 will not be a solution for me... With sufficient effort and diligence (and programming skill) I

Re: [R] Revo R for Arima Implementation

2013-10-25 Thread Rolf Turner
the arima() function. cheers, Rolf Turner On 10/26/13 01:19, Anindita Chattopadhyay wrote: Hello There, We have used ARIMA(multiplicative MA and additive AR) model in SAS to come to our results. Please let me know how could that be implemented in R. Like, In SAS we can pass the varia

Re: [R] bug in dummy.coef?

2013-10-24 Thread Rolf Turner
ight. As a workaround, you can do: x2 <- x^2 lm.D9 <- lm(weight ~ group + x + x2) dummy.coef(lm.D9) This worked for me, at least. cheers, Rolf Turner On 10/24/13 21:51, Alexandra Kuznetsova wrote: > Dear all, > &g

Re: [R] Small p from binomial probability function.

2013-10-16 Thread Rolf Turner
ation of the form f(p) = p0 for p. * the uniroot() function solves equations of the form g(p) = 0 for p * therefore define g(p) = f(p) - p0 and apply uniroot() to the function g(.). HTH. cheers, Rolf T

Re: [R] x12 doesn't work any longer

2013-10-14 Thread Rolf Turner
saying that the path to the executables should be set using the function x12path(). I would suggest that you try that. And then figure out how the other arguments that you supply should really be handled. Perhaps try contacting the package maintainer. Good luck. cheers, Rolf Tu

Re: [R] singularity problem

2013-10-14 Thread Rolf Turner
ain columns of your matrix the resulting matrix will no longer be square and inverting it is meaningless. If you have a (numerically) non-singular matrix, then it can, by definition be inverted. (And solve() will invert it for you.) What are you actually trying to accomplish? cheers,

Re: [R] How do you add the x-bar (mean of x) symbol and show a calculated mean in the title of a histogram?

2013-10-11 Thread Rolf Turner
, i.e. "Heart Attack" onto the mathematical bit. E.g.: set.seed(42) xxx <- rnorm(300,10,2) hist(xxx,main=bquote(paste("Heart Attack ", bar(x) == .(mean(xxx) There are probably better ways. And don't ask me for an explanation; i

Re: [R] Small p from binomial probability function.

2013-10-10 Thread Rolf Turner
r(U <= p) = p0, i.e Pr(h(X) <= p) = p0, so if we take p = h(x) we have Pr(h(X) <= h(x)) = p0, whence Pr(X <= x) = p0 as desired. Still twists my head, but. cheers, Rolf Turner __ R-help@r-project.org mailing list https

Re: [R] Small p from binomial probability function.

2013-10-10 Thread Rolf Turner
obvious why the procedure using uniroot() works. I would suggest that you stick with the uniroot() procedure in that it is readily comprehensible. cheers, Rolf Turner On 10/11/13 03:56, Benjamin Ward (ENV) wrote: Hi, Thank you for your answers, I'm not completely sure if it's t

[R] Testing.

2013-10-09 Thread Rolf Turner
Please ignore. My apologies for the noise. cheers, Rolf Turner __ 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

Re: [R] quote a column of a dataframe by its name

2013-10-04 Thread Rolf Turner
On 10/05/13 05:15, John Kane wrote: X[,names(X)[4]] works fine for me. I had never thought of doing this. Neat idea. Perhaps I am being obtuse, but how would X[,names(X)[4]] differ from X[,4]? cheers, Rolf Turner __ R-help@r

Re: [R] YSI data in R

2013-10-02 Thread Rolf Turner
irrelevant. cheers, Rolf Turner __ 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] 'XML' package cannot be un-zipped or un-tar'd"

2013-10-01 Thread Rolf Turner
lib=) ??? When I tried that I got a whinge about a lack of "xml2-config". After sum yumming around (I use Fedora Linux) I found that sudo yum install libxml2.x86_64 libxml2-devel.x86_64 did the trick, and I was then able to install XML using install.packages(). cheers

Re: [R] min(NA,"bla") != min("bla", NA)

2013-09-26 Thread Rolf Turner
On 09/27/13 11:07, Duncan Murdoch wrote: On 13-09-26 5:32 PM, Rolf Turner wrote: Just to add to the confusion, on my system I get NA --- which I understand to be the correct value --- from all of min(NA,"bla"), min("bla",NA), min(c(NA,"bla")), and min(c("bla

Re: [R] min(NA,"bla") != min("bla", NA)

2013-09-26 Thread Rolf Turner
On 09/27/13 10:34, Duncan Murdoch wrote: On 13-09-26 5:32 PM, Rolf Turner wrote: Just to add to the confusion, on my system I get NA --- which I understand to be the correct value --- from all of min(NA,"bla"), min("bla",NA), min(c(NA,"bla")), and min(c("bla

Re: [R] min(NA,"bla") != min("bla", NA)

2013-09-26 Thread Rolf Turner
Just to add to the confusion, on my system I get NA --- which I understand to be the correct value --- from all of min(NA,"bla"), min("bla",NA), min(c(NA,"bla")), and min(c("bla",NA)). When I append the argument na.rm=TRUE to each of the calls, I get "bla" from each. So, no bug in my system

Re: [R] Why does sin(pi) not return 0?

2013-09-26 Thread Rolf Turner
stion, but it should provide the necessary insight). cheers, Rolf Turner __ 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 pr

Re: [R] Cosine window in r

2013-09-25 Thread Rolf Turner
I'm pretty sure that your answer has nothing to do with what the OP was asking about. OTOH it's up to the OP to make it clear what he ***is*** asking and he did not do that. cheers, Rolf Turner On 09/26/13 01:00, João Pedro Alves wrote: x<-seq(0,2*pi,by=0.01) y<

Re: [R] Checking a large data set for normality

2013-09-25 Thread Rolf Turner
On 09/25/13 16:10, David Winsemius wrote: There is quite a bit of misinformation about the "need for normality", some of it presented by Six Sigma "experts" or even by college professors who should know better. One might even say that if you don't know how to check for normality then there i

Re: [R] Creating rectangular plots with x and y coordinates and treatments from a matrix for a randomized block design

2013-09-22 Thread Rolf Turner
On 09/23/13 07:52, Laz wrote: I was wondering if we could draw some horizontal and vertical lines to separate the blocks. Is it possible using R? See fortune("Yoda"). :-) cheers, Rolf Turner __ R-help@r-project.org mailing

Re: [R] How do I ensure that the polygon in spatstat::owin(poly=) does not have “negative area”

2013-09-19 Thread Rolf Turner
MM! cheers, Rolf Turner P.S. It is inadvisable to use "T" when you mean "TRUE". Write out "TRUE" in full. (The name "T" can be over-written, leading to dangers. E.g. "T <- FALSE" !!! The name "TRUE" cannot be over-written.)

Re: [R] lowercase and uppercase greek letters

2013-09-17 Thread Rolf Turner
upper(phi) or lower(phi) ? Thanks for your help ! RTFM. From ?plotmath: alpha -- omega Greek symbols Alpha -- Omega uppercase Greek symbols cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

Re: [R] is it possible to install R packages without admin rights on a work station

2013-09-16 Thread Rolf Turner
/Rlib (if using csh) or R_LIBS = /home/rolf/Rlib export R_LIBS (if using bash). HTH cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-pro

Re: [R] assigning the class of an object

2013-09-10 Thread Rolf Turner
h your task without getting an off-putting error message, you proceed in two (three?) steps: obj_name <- load("Robject.RData") tempObj <- get(obj_name) class(tempObj) <- "myClass" assign(obj_name,tempObj) HTH cheers, R

Re: [R] assigning the class of an object

2013-09-10 Thread Rolf Turner
On 09/11/13 09:16, peter dalgaard wrote: On Sep 10, 2013, at 22:56 , Rolf Turner wrote: On 09/11/13 07:54, Davis, Brian wrote: I'm sure this has been answered before but alas my googlefoo is not that strong. I have several .Rdata files with a single object in them. I need to set the

Re: [R] Multivariate discrete HMMs

2013-09-03 Thread Rolf Turner
number of observations --- which seems to me to be unlikely --- then you could fit a discrete non-parametric family. (You could try using the package hmm.discnp.) cheers, Rolf Turner On 09/03/13 02:47, Claus O'Rourke wrote: Hi r-help, I have been using your RHmm package for some tim

Re: [R] optim evils

2013-09-03 Thread Rolf Turner
en very good. cheers, Rolf Turner On 09/04/13 01:08, Michael Meyer wrote: Greetings, I am in great anguish as the routine stats::optim shows unexplicable behaviour of various sorts. For one it is immune to the choice of optimization method and seems to always do the same. The following

Re: [R] Issue with R libraries

2013-09-02 Thread Rolf Turner
install is a ***package*** (not a library)!!! (A library is a collection of packages.) cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] why is this a factor?

2013-08-29 Thread Rolf Turner
On 29/08/13 12:10, Ista Zahn wrote: On Wed, Aug 28, 2013 at 7:44 PM, Steve Lianoglou wrote: Hi, On Wed, Aug 28, 2013 at 3:58 PM, Ista Zahn wrote: Or go all the way and put options(stringsAsFactors = FALSE) at the top your script or in your .Rprofile. This will prevent this kind of annoyanc

Re: [R] scale breaks

2013-08-28 Thread Rolf Turner
On 29/08/13 05:03, Sarah Goslee wrote: Yes. Using my rudimentary telepathic powers, I suppose that you also want to know how to do it, not just whether it has been done. In that case, perhaps you should look at axis.break() from the plotrix package. (In response to the question, from S

Re: [R] netlogo r-extension loadlibrary() failures

2013-08-28 Thread Rolf Turner
On 28/08/13 20:17, Prof Brian Ripley wrote: [That is Microsoft, whose messages are infamously accurate but maximally uninformative.] Fortune nomination. cheers, Rolf __ R-help@r-project.org mailing list https://stat.ethz.ch/mail

Re: [R] the inverse of assign()

2013-08-27 Thread Rolf Turner
Actually what's needed is "deparse(substitute(...))": file = paste(deparse(substitute(x)),"csv",sep=".")) I have no idea what "deparse" and "substitute" really mean; I just treat the forgoing as a black box/magic incantation. It

Re: [R] how to code y~x/(x+a) in lm() function

2013-08-22 Thread Rolf Turner
t the two fits are "visually indistinguishable". Both methods estimate "a" as 1.061. cheers, Rolf On 22/08/13 12:54, Ben Bolker wrote: On 13-08-21 05:17 PM, Rolf Turner wrote: Thott about this a bit more and have now decided that I don't understand after all.

Re: [R] how to code y~x/(x+a) in lm() function

2013-08-20 Thread Rolf Turner
see how to fit the model without > transformation. > > > On Tue, Aug 20, 2013 at 2:45 PM, Rolf Turner <mailto:rolf.tur...@xtra.co.nz>> wrote: > > > (1) It is not acceptable to use "wanna" in written English. You > should say >

Re: [R] how to code y~x/(x+a) in lm() function

2013-08-20 Thread Rolf Turner
-linear methods, e.g. by applying the function nls(). cheers, Rolf Turner On 21/08/13 09:39, Ye Lin wrote: Hey All, I wanna to fit a model y~x/(a+x) to my data, here is the code I use now: lm((1/y-1)~I(1/x)+0, data=b) and it will return the coefficient which is value of a however, if I use

Re: [R] Off-topic? Linux laptop for R

2013-08-11 Thread Rolf Turner
ds screwed on right, and answered my inquiry promptly, thoroughly and comprehensibly. I hope this is of some relevance to someone! cheers, Rolf Turner On 12/08/13 06:47, Hasan Diwan wrote: Any laptop that performs well with Linux will perform acceptably with R and vice versa. -- H

Re: [R] Extracting only multiple occurrences

2013-08-08 Thread Rolf Turner
On 08/08/13 20:27, Jim Lemon wrote: On 08/08/2013 04:23 PM, Kevin Parent wrote: Well that almost works, and I didn't know about duplicated() so thanks for that. However, it only gives me the duplicated values. I need the original ones too. So the result I want is: [g,g,m,m,s,s,t,t,u,u,u,v,v,x,

Re: [R] Internalization of help pages

2013-08-04 Thread Rolf Turner
On 05/08/13 03:15, John Kane wrote: (In a discussion on translating R help pages into other languages.) Personally I'd like to see the help tranlated into English too. Fortune nomination. cheers, Rolf Turner __ R-help@r-projec

Re: [R] Windows 7 (Swedish): 'Rcmd INSTALL' fails (SOLVED)

2013-07-21 Thread Rolf Turner
ery minor problem, since I never do anything useful on Windows machines. Fortune candidate? cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Test if 2 samples differ if they have autocorrelation

2013-07-18 Thread Rolf Turner
en't got sufficient information to answer the question that you wish to answer. I hope that there is some value in the forgoing. cheers, Rolf Turner On 18/07/13 21:50, Eric Jaeger wrote: Dear all I have one question that I struggle to find an answer: Let`s assume I have 2 timeseries of da

Re: [R] R-squared and GLM

2013-07-17 Thread Rolf Turner
amma distribution, rather than doing least squares, what exactly is the relevance of R-squared anyway? cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Book recomendation: Repeated Measurements

2013-07-14 Thread Rolf Turner
On 15/07/13 08:57, Spencer Graves wrote: You may know that "mixed effects" is another term for "repeated measurements". I must of course preface this comment with an "I am no expert" disclaimer, but I do not believe that this assertion is correct. It would be more correct, I beli

Re: [R] Set window title for plot on any OS

2013-07-13 Thread Rolf Turner
I think you ought to take a look at fortune("Lewis Carroll") cheers, Rolf Turner On 14/07/13 01:45, Simon Zehnder wrote: Hi Duncan, thank you very much for your advice! That makes it all work. I check in addition for a "title" argument in the devic

Re: [R] syntactical meaning of fullstop in R functions

2013-07-12 Thread Rolf Turner
ning the name of an object with a full stop is to make that object "invisible" to ls(). I.e. if you do an ls() of the environment in which that object "lives" then you will *not* see the name of that object unless you do ls(.,all.names=TRUE) See help(ls). che

Re: [R] Help with installing a .tar.gz package on windows

2013-07-11 Thread Rolf Turner
On 11/07/13 17:57, Prof Brian Ripley wrote: > On 11/07/2013 01:22, David Winsemius wrote: >> >> On Jul 10, 2013, at 4:37 PM, Lucy Leigh wrote: >> >>> Hi, >>> I have had a look at the manual but it makes no sense to me. I have >>> downloaded RTools, and the InnoSetup, >>> but I don't understand how

Re: [R] find a function for a random curve

2013-07-10 Thread Rolf Turner
It is possible that splinefun() is what you are looking for. cheers, Rolf Turner On 10/07/13 22:29, Xiaoyu Lu wrote: Hi, I want to find a functional form for my data. I have tried smoothing and obtained a kinda perfect fit. However, I can only draw it but cannot call it.

Re: [R] spatstat output

2013-07-07 Thread Rolf Turner
es --- you should easily be able to see how to extract the items that you desire. (6) In respect of changing the margins, see the help for plot.fasp. Does the argument mar.panel do what you want? cheers, Rolf Turner __ R-help@r-proj

Re: [R] The logistf() function from the logistf package. (Was: "Data Package Query")

2013-07-06 Thread Rolf Turner
logistf package. If you don't know, do some study and find out. You could also try to contact the package maintainer. (4) Your subject line is misleading. You are simply replying to replies to a previous query (which has really nothing to do with

Re: [R] Help

2013-07-04 Thread Rolf Turner
Please (for crying out loud!) use a meaningful subject line!!! This list is called "r-help"!!! Using a subject line of "Help" is completely vacuous. cheers, Rolf Turner On 04/07/13 20:33, Aboagye-sarfo, Patrick wrote: I am trying to download packages and the

Re: [R] acf question...

2013-07-02 Thread Rolf Turner
t;) # Yields 1. So I am mystified by the output of ccf(). Perhaps someone would care to explain . Or perhaps not. :-) cheers, Rolf Turner [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.et

Re: [R] similarity and dissimilarity index

2013-07-01 Thread Rolf Turner
to calculate or give me some advise about my problem? Another nominee for the "Obtuse Question of the Month" award. cheers, Rolf Turner P.S. I.e. read the posting guide. R. T. __ R-help@r-project.org mailing list htt

Re: [R] functions and matrices

2013-07-01 Thread Rolf Turner
t; has some capabilities in this regard, but I have no experience with it and cannot advise. cheers, Rolf Turner On 02/07/13 05:37, Naser Jamil wrote: Dear R-user, May I seek your help, please. I have two matrices, u and v, elements of which are some functions of x. I just want to mu

Re: [R] Lexical scoping is not what I expect

2013-06-30 Thread Rolf Turner
On 30/06/13 15:58, Greg Snow wrote: If you want to write really confusing code it is possible to do: `1` <- 2 `1` + 1 and things like that, but it is probably a good idea not to. Fortune? cheers, Rolf __ R-help@r-project.org mailing

Re: [R] Lexical scoping is not what I expect

2013-06-28 Thread Rolf Turner
served symbols, like TRUE, Inf, etc.? I rather enjoy being able to set pi <- 3 :-) cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-pr

Re: [R] Data Package Query

2013-06-27 Thread Rolf Turner
y and avoiding confusion, to give a data set set the same name as a function (either built in, or one of your own). fortune("dog") is relevant. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz

Re: [R] Lexical scoping is not what I expect

2013-06-24 Thread Rolf Turner
I hope that Robert Gentleman is currently getting a thrill. :-) [See fortune("lexical scoping").] cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the pos

Re: [R] Apply a Seasonal ARMA process

2013-06-21 Thread Rolf Turner
= ..." syntax (of which you quite understandably say you are "unsure") anyhow? The arima() function has no such argument. cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinf

Re: [R] how to get growth rate of a (time series) data?

2013-06-19 Thread Rolf Turner
On 19/06/13 23:24, R. Michael Weylandt wrote: On Wed, Jun 19, 2013 at 12:04 PM, Yanyuan Zhu wrote: Hello all, now I'm trying to switch from Excel to R to deal with the data, and as a newbie i got the problem as follows. suppose I have a data named "test" test<- data.frame(year=c(1996:2011), Y=

Re: [R] Optimization of a function using optim

2013-06-15 Thread Rolf Turner
The r-help list should institute a prize for "Most Obtuse Question of the Month". This one should be a shoe-in for the June 2013 prize. cheers, Rolf Turner On 16/06/13 12:08, Graham McDannel wrote: I am attempting to optimize a function I have developed using op

Re: [R] Proper way to implement package internal functions

2013-06-12 Thread Rolf Turner
re added to the package.) The *.Rd file can be called anything you like (as long as it ends in ".Rd" and doesn't conflict with other *.Rd filled. However a fairly common convention is to name the file "melvin-internal.Rd" where "melvin" is the name

Re: [R] How to expand.grid with string elements (the half!)

2013-06-10 Thread Rolf Turner
Your question makes no sense at all. The grid expansion has 9 rows. In case you hadn't noticed, 9 is an odd number (i.e. not divisible by 2). There are no "halves". Do not expect the list to read your mind. Instead, ask a meaningful question. cheers, Rolf Turn

Re: [R] colour coded dotchart

2013-06-08 Thread Rolf Turner
should interpret the exhortation "RTFM" when it is inflicted upon one. After a few millennia it gets easier! :-) cheers, Rolf Turner __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] estimation of covariance matrix of a bivariate normal distribution using maximization of the log-likelihood

2013-06-07 Thread Rolf Turner
more sense in terms of your simulated data to use: mu <- c(2.4,1.3) I haven't looked at your code below any further. Too much of a mess. cheers, Rolf Turner L <- function(par,x,y) { return (-sum(log(par[4]*dmvnorm(XY, mean=c(1,1), sigma= matrix(c(par[1], par[1]*par[2]*par[3],par[1]*

Re: [R] SPlus script

2013-06-07 Thread Rolf Turner
luated in same frame S+> .Last.value [1] 240 Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Rolf Turner Sent: Friday, June 07, 2013 4:17 PM To: Duncan Murdoch Cc: r-h

Re: [R] SPlus script

2013-06-07 Thread Rolf Turner
On 07/06/13 23:05, Duncan Murdoch wrote: > On 13-06-06 6:22 PM, Rolf Turner wrote: >> On 07/06/13 03:19, Scott Raynaud wrote: >>> I actually had tried placing arguments in the call but it didn't >>> work. However, I did >>> not think about writing i

Re: [R] SPlus script

2013-06-06 Thread Rolf Turner
you will see [1] -0.9165215 In Splus, IIRC, the print() call is unnecessary. I.e. you would get the same result by sourcing "melvin" and "clyde". Current Splus users may correct me if I am wrong about this. cheers, Rolf Turner _

Re: [R] Error: contrasts can be applied only to factors with 2 or more levels

2013-05-16 Thread Rolf Turner
see in line below. cheers, Rolf Turner On 17/05/13 03:05, Belair, Ethan D wrote: I have a dataframe that I am attempting to analyze using the lmList() function in package lme4. I'm using this funciton to select which parameters in this model wqarrant random effects. I have a subset of the d

Re: [R] Using Rscript in version 3.0.0

2013-05-06 Thread Rolf Turner
uns as expected. Any thoughts? My main thought is that you should supply a reproducible example (as the footer at the bottom of every r-help message reminds you) and explain where TF the function makePSOCKcluster() comes from. cheers, Rolf

Re: [R] Function for Data Frame

2013-04-29 Thread Rolf Turner
On 30/04/13 08:34, MacQueen, Don wrote: Just to add a little, don't get distracted by the return() function. Functions return the value of their final expression, provided it isn't an assignment. Note that functions still return the value of their final expression even if it is an assignment.

Re: [R] Trouble Computing Type III SS in a Cox Regression

2013-04-25 Thread Rolf Turner
On 26/04/13 03:40, Terry Therneau wrote: (In response to a question about computing "type III sums of squares in a Cox regression): If you have customers who think that the earth is flat, global warming is a conspiracy, or that type III has special meaning this is a re-education issue,

Re: [R] Regarding Modeling - Please! QUICK HELP

2013-04-24 Thread Rolf Turner
Sorry, this list has a "No homework" policy. Please ask your lecturer or tutor about this. cheers, Rolf Turner On 25/04/13 14:18, Andrew Cochrane wrote: I'm a student currently working with the *sleepstudy* dataset in matrix.pkg. It deals with the reaction times of

Re: [R] Scatterplot and Causality

2013-04-22 Thread Rolf Turner
Fortune nomination. cheers, Rolf On 23/04/13 08:31, Bert Gunter wrote: (In response to a question about inferring causality from observational data.) As others have said: (Short answer) No. (Long Answer) Don't be ridiculous. _

Re: [R] Pls help to prevent my post from being indexed on google

2013-04-21 Thread Rolf Turner
See also: fortune("celebrity") cheers, Rolf Turner On 22/04/13 07:32, Joshua Wiley wrote: Hi, No that is not really possible for several reasons. One is that these posts are not archived on just one web server. There are multiple archives managed by differ

Re: [R] creating dummy variables

2013-04-20 Thread Rolf Turner
t arise, R creates the dummy variables that it uses automagically , behind the scenes, from the *factors* whose levels correspond to the dummy variables. Summary: Learn about and understand *factors*; forget about dummy variables. cheers, R

Re: [R] HMM Package parameter estimation

2013-04-16 Thread Rolf Turner
53666 which look to be in "reasonable" agreement with the "true" values. Note though that states 2 and 3 have been swapped. This happens. cheers, Rolf Turner On 16/04/13 13:13, Richard Philip wrote: Hi, I am having difficulties estimating the parameters of a HMM

<    4   5   6   7   8   9   10   11   12   13   >