Re: [R] best text editor for Linux?

2008-02-02 Thread Duncan Murdoch
On 01/02/2008 11:49 PM, 宋时歌 wrote: On Linux platform, nothing beats Emacs + ESS. This discussion may be relevant: http://xkcd.com/378/ Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] two densities with same stepsize

2008-02-05 Thread Duncan Murdoch
... There are a lot of measures of the difference between two distributions. Which one to use depends a lot on the intended purpose. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Compile Rd file

2008-02-05 Thread Duncan Murdoch
as the name of the package. You could hard code the name you want, or do more extensive edits and add this as an option to the Rdconv call. (Someone might volunteer to do it for you if you explain the need for this, and why using the standard package installation method isn't sufficient.) Duncan

Re: [R] help with oop in R - class structure and syntex

2008-02-05 Thread Duncan Murdoch
: sometimes calls S3 and S4 (because of the versions of S where they were introduced). You were reading about S3. Duncan Murdoch Also, in Java, inheritance is done like this: public class MountainBike extends Bicycle { // *the MountainBike subclass has one field* public int

Re: [R] How to set working directory to a fixed map?

2008-02-05 Thread Duncan Murdoch
. On any system, you could write a little script that changed directory, then started R. Duncan Murdoch __ 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

Re: [R] precision in seq

2008-02-05 Thread Duncan Murdoch
into inaccuracies when reading the numbers.) And of course, it's also true for character and logical values. Duncan Murdoch __ 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] how to plot an user-defined function

2008-02-05 Thread Duncan Murdoch
that will evaluate the function at each individual point and then plot it. Or use Vectorize, e.g. plot(Vectorize(ll), 0, 2) Duncan Murdoch On Feb 5, 2008 7:06 PM, John Smith [EMAIL PROTECTED] wrote: Dear R-users, Suppose I have defined a likelihood function as ll(tau), how can I plot this likelihood

Re: [R] Incomplete ouput with sink and split=TRUE

2008-02-06 Thread Duncan Murdoch
those bits. I'll change print.htest to use cat(), but it is probably a sign of a bigger problem in sink(), and it's too late in the schedule to touch that for 2.6.2. Duncan Murdoch sink(textout.txt, type=output, split=T) b=bartlett.test(runif(10),c(1,1,1,1,2,2,2,2,2,2)) class(b) [1

Re: [R] scatterplot3d + box lines

2008-02-06 Thread Duncan Murdoch
on the help page, but there are a lot of parameters there, and I can see how you might have missed it.) Duncan Murdoch __ 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] revision control software for managing R-code?

2008-02-07 Thread Duncan Murdoch
around the metadata for a few other version control systems: CVS (which R used to use, I like Subversion better), arch, git, and bzr. I've never tried any of the latter three. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Catching NaNs from pweibull()

2008-02-08 Thread Duncan Murdoch
for the input though. If you ever trigger the error again, try to figure out what happened. The hardest part of fixing bugs like this is making them reproducible. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] Reading data from a dataframe

2008-02-09 Thread Duncan Murdoch
error message: Error in lm(share.gnp) - lm(incmean ~ rgnpc) : object share.gnp not found That line doesn't make sense. You want something like share.gnp - with(po1572a1, lm(incmean ~ rgnpc)) Duncan Murdoch So what should I do to get R to read the dataframe in the ordinary way with the usual

Re: [R] Reading data from a dataframe

2008-02-09 Thread Duncan Murdoch
: share.gnp.mdl will be created in the local environment created by with(), and then discarded. You need to put it outside, i.e. share.gnp.mdl - with(pol572a1, lm(incmean~rgnpc) ) Duncan Murdoch (My practice is to label my models, but it is not necessary.) Then look at share.gnp.mdl with str

Re: [R] R is not reading(?) my data properly

2008-02-09 Thread Duncan Murdoch
plot(incmean ~ rgnpc, data = po1572a1) (The reason for this limitation is that plot needs to evaluate its first argument to know what method to call. It can evaluate the formula incmean ~ rgnpc, but can't evaluate the nonexistent rgnpc. Duncan Murdoch Model - lm(incmean ~ rgnpc, data

Re: [R] md5 hash is wrong for 2.6.2 (Windows)

2008-02-09 Thread Duncan Murdoch
be immediately visible. But I also changed the page to say Last change: 2008-02-09, so if you see that date, you should be getting the right download. I'll have to put some tests into the upload script. Duncan Murdoch __ R-help@r-project.org mailing

Re: [R] md5 hash is wrong for 2.6.2 (Windows)

2008-02-09 Thread Duncan Murdoch
, as well as the 2.6.2 entries. As far as I know it's perfectly safe to use. Duncan Murdoch __ 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

Re: [R] building packages for Linux vs. Windows

2008-02-10 Thread Duncan Murdoch
) Sys.info() to find out what kind of system you're running on. Remember that R doesn't just run on Linux and Windows: there's also MacOSX, and other Unix and Unix-like systems (Solaris, etc.). Duncan Murdoch __ R-help@r-project.org mailing list https

Re: [R] Questions about histograms

2008-02-10 Thread Duncan Murdoch
histogram, so the gaps you see in this jpg are bars with zero height. Duncan Murdoch http://go.sneakymustard.com/tmp/scott.jpg hist.FD(data[,1], prob = TRUE, xlim=c(0, 35)) http://go.sneakymustard.com/tmp/FD.jpg Is there anything I can do to fix these plots? My second question

Re: [R] conflict within packages

2008-02-12 Thread Duncan Murdoch
and suggest it. Duncan Murdoch Best, Elizabeth jim holtman wrote: you can use: package::getNames() to reference the one that you want. On Feb 12, 2008 3:45 PM, Elizabeth Purdom [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I am trying to use two contributed

Re: [R] Cox model

2008-02-13 Thread Duncan Murdoch
to catch most of them, and then you'll have 10 times as many false positives to wade through (but still 10 times fewer than you started with, so your main point still holds). Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] how to specify the location of tick mark on x axies

2008-02-16 Thread Duncan Murdoch
- attr(*, class)= chr histogram axis(1, at=h$mids) I'd say that graphically it's not the best idea, but it's not hard to do. If you want variations, see the manual pages ?hist, ?axis, etc. Duncan Murdoch __ R-help@r-project.org mailing list https

Re: [R] How to use a reserved word in italics in an expression

2008-02-16 Thread Duncan Murdoch
' to be treated as a reserved word but as a string in italics? Just put it in quotes. In fact, I think italic(attraction) looks better than italic(attraction), so you may want to do this more generally. For example, plot(1, main=expression(paste(italic(attraction function: ), slope))) Duncan Murdoch

Re: [R] filled.contour with log axis

2008-02-17 Thread Duncan Murdoch
, by = 10)))# maybe also asp=1 Duncan Murdoch __ 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

Re: [R] Error massage in attaching package 'rgl'

2008-02-17 Thread Duncan Murdoch
. Versions? Platform? Duncan Murdoch __ 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

Re: [R] question on function arguments

2008-02-19 Thread Duncan Murdoch
code, e.g. you'd need b$x[ (ii - 1) %% length(b$x) + 1 ] in place of b$x[ii] (and this solution is not general; it doesn't handle zero or negative indices properly). Duncan Murdoch Many thanks, baptiste _ Baptiste Auguié Physics Department University

Re: [R] simple usage of for

2008-02-19 Thread Duncan Murdoch
that plot() and abline() both have side effects (they do plotting), whereas table() doesn't. Duncan Murdoch And there is no output at all, just a new prompt. I added a print statement just to check the loop construct, and it seems to work. for (i in 2:length(meriter)) { print(i); table

Re: [R] Looping through a list of objects do something...

2008-02-19 Thread Duncan Murdoch
: dfarray - list(df1, df2, df3) lapply(dfarray, function(i) plot(i$x, i$y)) Duncan Murdoch __ 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

Re: [R] Referencing to an object within a function

2008-02-19 Thread Duncan Murdoch
could use traceback() to find the location of the error, but I would suspect it's a bug in segmented.glm. You should contact the maintainer of that package (Vito Muggeo) to work it out. (I've cc'd him.) Duncan Murdoch __ R-help@r-project.org mailing

Re: [R] Why does plot() ignore the data type for axis labels?

2008-02-19 Thread Duncan Murdoch
data type if you don't want things displayed as their real values (see for example barplot, stripchart, dotchart, etc.) Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] Rd to latex

2008-02-20 Thread Duncan Murdoch
On 2/20/2008 11:42 AM, Dani Valverde wrote: Hello, I would like to convert an Rd object to a latex file, so that I can put it in my thesis. How can I do it? I tryed latex(), but it only works for code... Best, See ?Rdconv and its references. Duncan Murdoch

Re: [R] R console closes on its own

2008-02-20 Thread Duncan Murdoch
- data.frame(a=1:10, b=1:10, c=1:10, d=1:10). If the bug requires TinnR, then you should probably send details to its maintainers. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Compilation error on installing rgl package

2008-02-21 Thread Duncan Murdoch
On 21/02/2008 3:13 PM, Kenneth Lo wrote: Thank you for your reply. Hope that it will be available soon. It won't happen unless someone does it. What you should be asking is how to learn to do it, or how to encourage someone else to do it. Duncan Murdoch Kenneth --- Duncan Murdoch

Re: [R] Biomechanics

2008-02-22 Thread Duncan Murdoch
find it useful if you're dealing with orientation data, but that's a pretty small part of biomechanics. Duncan Murdoch __ 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] Hiding a function

2008-02-23 Thread Duncan Murdoch
] 14 b(2) # Error Is it possible ? Yes, as long as you're using a package with a NAMESPACE, just don't export b and d. There are other ways too, but they don't improve readability. Duncan Murdoch __ R-help@r-project.org mailing

Re: [R] Hiding a function

2008-02-23 Thread Duncan Murdoch
On 23/02/2008 5:58 AM, Christophe Genolini wrote: Duncan Murdoch a écrit : On 23/02/2008 5:15 AM, Christophe Genolini wrote: Hi the list Is it possible to 'hide' a function from the user ? I cut a big fonction in sub function and I would like to hide the sub function, just like if I

Re: [R] Hiding a function

2008-02-23 Thread Duncan Murdoch
of a package with a NAMESPACE includes all other functions in the package, and in the case of my example below, includes everything else defined in the same local() environment (e.g. d()). Duncan Murdoch Just to clarify, what Duncan was referring to as the alternative was nesting the definition

Re: [R] How to include the documentation of a function in a Sweave document?

2008-02-26 Thread Duncan Murdoch
the title. You'd get a better display if you read the latex version instead. I think you need to construct the path to it yourself (using system.file() etc.) Duncan Murdoch Cheers, Thibaut. sessionInfo() R version 2.6.2 (2008-02-08) i686-pc-linux-gnu locale: LC_CTYPE=en_US.UTF-8

Re: [R] How to include the documentation of a function in a Sweave document?

2008-02-26 Thread Duncan Murdoch
Thibaut Jombart wrote: Duncan Murdoch wrote: Maybe a clue: we can use cat(readLines(as.character(?plot)),sep=\n) to display the help (here, of plot) directly to the screen. So we could use something like: echo=TRUE,print=FALSE,eval=FALSE= ?plot @ echo=FALSE,print

Re: [R] Adding LaTeX cross-references into Sweave plots

2008-02-26 Thread Duncan Murdoch
references). I'd say a better approach is just not to use a main title, use the figure caption to include the equation number. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] standard errors

2008-02-28 Thread Duncan Murdoch
. Duncan Murdoch __ 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] Getting Keypressed State in rgl

2008-02-29 Thread Duncan Murdoch
), includes = #include windows.h, body = result[0] = getKeyState(VK_SHIFT), convention = .C) Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Getting Keypressed State in rgl

2008-02-29 Thread Duncan Murdoch
On 2/29/2008 7:16 AM, Duncan Murdoch wrote: Dieter Menne wrote: Dear Rglers, when using a callback in rgl (Windows, if it matters) http://finzi.psych.upenn.edu/R/library/rgl/html/callbacks.html I would like to get the Asynchronous keyboard status (as least Shift/Control, but preferably

Re: [R] How to chain user mouse handlers in rgl

2008-03-01 Thread Duncan Murdoch
that. What you would have to do is to replicate the trackball handler in yours. (You can see what it does in the src/rglview.cpp in the rgl source.) If you want to write the R code (and docs for it) to fix this, I'll put it into rgl. Duncan Murdoch How do I say in a custom mouse handler after having

Re: [R] Fatal error: you must specify '--save', '--no-save' or '--vanilla'

2008-03-03 Thread Duncan Murdoch
in the following: Error: syntax error in: ironment - function () .Internal(environment(NULL)) mkenv - function() .Internal(new.env(TRUE, baseenv(), 29L That's because you're using an obsolete version of R, that doesn't support the integer constant 29L. Duncan Murdoch

Re: [R] [OT] normal (as in Guassian)

2008-03-03 Thread Duncan Murdoch
of Stigler's Law. Duncan Murdoch --Jim Rogers On Mar 2, 2008, at 7:33 AM, (Ted Harding) wrote: Hi Folks, Apologies to anyone who'd prefer not to see this query on this list; but I'm asking because it is probably the forum where I'm most likely to get a good answer! I'm interested

Re: [R] R console closes on its own

2008-03-04 Thread Duncan Murdoch
error: for (i in 1:100) { windows() plot(1:100) dev.off() } Duncan Murdoch __ 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] R console closes on its own

2008-03-04 Thread Duncan Murdoch
On 3/4/2008 12:21 PM, Duncan Murdoch wrote: On 2/20/2008 7:44 PM, Judith Flores wrote: Dear R-experts, I am running a script that has the following structure: windows(height=5.5,width=8) dat-read.csv(myfile.csv) names(dat)-c('a','b','c','d') dat-dat[,1:4] xyplot(dat$a~dat$b

Re: [R] Error in Arules

2008-03-04 Thread Duncan Murdoch
you called?) called the image.default function with just one argument basket2, and it's not a matrix. Duncan Murdoch __ 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] Error in Arules

2008-03-04 Thread Duncan Murdoch
it unless you know how to rebuild them. Duncan Murdoch Thanks again, Brock -Original Message- From: Duncan Murdoch [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 04, 2008 4:51 PM To: Tibert, Brock Cc: r-help@r-project.org Subject: Re: [R] Error in Arules

Re: [R] vector manipulations

2008-03-04 Thread Duncan Murdoch
, but the results are not always entirely satisfactory in my experience. What problems have you seen? Duncan Murdoch __ 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

Re: [R] colored 3d scatter plot

2008-03-04 Thread Duncan Murdoch
something, but I don't know what. Perhaps the content of data is relevant, or the content of his/her workspace, or whatever. Duncan Murdoch That is, if data contains 100 x, y and z components, try: scatterplot3d(data,color=rep(c(red,blue),50),pch=16) My guess is that you are generating NAs

Re: [R] matrix inversion using solve() and matrices containing large/small values

2008-03-05 Thread Duncan Murdoch
multiplying the parameters by numbers on the order of the square roots of these entries (e.g. 10^c(-1, 1, 4, 6, 9, 12, 14, 17)), and redoing the rest of the calculations on that scale, should work. Duncan Murdoch code: * macht=0.8698965 coeff=1.106836*10^(-8

Re: [R] Changing code within a package

2008-03-06 Thread Duncan Murdoch
to install it. It would also be polite to mention your changes to the package author and/or maintainer; they might incorporate them into the next release of it. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

Re: [R] Sweave and extra line

2008-03-06 Thread Duncan Murdoch
and output chunks in Sweave, % but keeps the spacing around the whole block. \fvset{listparameters={\setlength{\topsep}{0pt}}} \renewenvironment{Schunk}{\vspace{\topsep}}{\vspace{\topsep}} Put this somewhere in your code before the first Sweave chunk. Duncan Murdoch 2+2 [1] 4 Thanks

Re: [R] Sweave and the prompt

2008-03-06 Thread Duncan Murdoch
. But I'd say this is a bad idea: the prompt is there to make the code look familiar to the reader. You should be solving the cut and paste problem by using a better cutter and/or paster (e.g. the Paste commands only option in the Windows GUI). Duncan Murdoch

Re: [R] Installing package from source in windows

2008-03-06 Thread Duncan Murdoch
which should be easier to install. Would anyone mind doing this for me if I send you the tar.gz file? See http://win-builder.r-project.org. Duncan Murdoch Thanks, Ryan Shewcraft The Blackstone Group, L.P. 345 Park Avenue, 28th Floor New York, NY 10154 P: 212-583-5147 F: 646-253-7633

Re: [R] dictionary lookup

2008-03-06 Thread Duncan Murdoch
, and replaces the rest with two more: new_names - old_names m - match(old_names, dict$V3) change - !is.na(m) new_names[change] - dict$V2[m[change]] Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] R error: Not able to launch R 2.6.2

2008-03-09 Thread Duncan Murdoch
-deleted the R folder and have a fresh re-install but still same issue. I am not sure what else i can do. any advice? The problem is with your .RData file, not with R. You should delete it. Duncan Murdoch __ R-help@r-project.org mailing list

[R] source(echo=TRUE) bug (was: source() behavior I don't understand)

2008-03-09 Thread Duncan Murdoch
nothing but blanks and tabs, and I think the regular expression that is supposed to match tabs is matching t instead. Thanks for the report, I'll fix it. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] source(echo=TRUE) bug (was: source() behavior I don't understand)

2008-03-09 Thread Duncan Murdoch
On 09/03/2008 10:40 PM, Richard M. Heiberger wrote: Thanks Duncan, While there, can you give a new optional argument that will permit the echo of blanks and comments? Comments are already echoed, leading blank lines are not (but blanks in comments are). For example: temp.ttt - ttt -

Re: [R] source(echo=TRUE) bug (was: source() behavior I don't understand)

2008-03-09 Thread Duncan Murdoch
are in complete control of the input and don't want to offer options on the output. A version that does what you need to do is probably just 10 or 20 lines. Duncan Murdoch ## comment 1 123 ## comment 4 456 ## comment 7 What I would also like, but I believe would be much harder for you

Re: [R] (no subject)

2008-03-10 Thread Duncan Murdoch
? How you deal with missing values really depends on what you want to do with the data. There's no general answer. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] persp question

2008-03-12 Thread Duncan Murdoch
.) Duncan Murdoch __ 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] recover masked functions?

2008-03-13 Thread Duncan Murdoch
and I see there is a lot to learn about how to manage the pieces. You can specify the package in which to find the function in by using pkgname::recode. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] alias for a class

2008-03-14 Thread Duncan Murdoch
. As far as I know ESS can do the same, and there are probably others too. If you're not using one of those, you should be. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] changing the quote

2008-03-15 Thread Duncan Murdoch
,list(e=factor)) [1] E new(E) An object of class “E” options(useFancyQuotes=FALSE) should turn those off. See ?sQuote for a discussion of how R chooses the defaults for this option. Duncan Murdoch __ R-help@r-project.org mailing list https

Re: [R] rgl build warnings and loading error on Linux

2008-03-16 Thread Duncan Murdoch
? It sounds as though it is not finding the OpenGL libs when it configures. That function should be in libGL.so. Duncan Murdoch __ 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] invalid \uxxxx sequence while trying to create a package

2008-03-18 Thread Duncan Murdoch
of everything you're using. You didn't mention that yet. And if they are all currrent versions (R 2.6.2, Rtools 2.7) then I guess you'll just have to divide and conquer: cut out half the source code and see if you still get the error. If so, cut it again, if not, look in the other half. Duncan

Re: [R] Sweave does not parse \Sexpr{}

2008-03-19 Thread Duncan Murdoch
is \Sexpr{3*3}? \end{document} Can anybody give me a hint what's wrong? No. That file works for me, and you've given no details about how you ran Sweave, what version you were using, etc. Duncan Murdoch __ R-help@r-project.org mailing list https

Re: [R] UNSOLITED E_MAILS: Integrate R data-analysis projects wi

2008-03-19 Thread Duncan Murdoch
. Duncan Murdoch __ 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] Cygwin and Rtools

2008-03-19 Thread Duncan Murdoch
and Cygwin installed is that they both have copies of the Cygwin dlls. You want the latest versions. Rtools has fairly recent ones, but Cygwin's may be newer. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

Re: [R] invalid \uxxxx sequence while trying to create a package

2008-03-21 Thread Duncan Murdoch
post error messages without the code that causes them, there might be one person on the list who can diagnose the problem, but he's awfully busy. Post complete instructions for reproducing it. Duncan Murdoch __ R-help@r-project.org mailing list https

Re: [R] Great difference for piecewise linear function between R and SAS

2008-03-24 Thread Duncan Murdoch
the bases that R uses, do this: matplot(distance, bs(distance,degree=1,knots=c(16.13,24))) matplot(y, bs(y,degree=1,knots=c(-0.4357,-0.3202))) Duncan Murdoch #R code--Knots for distance are 16.13 and 24, respectively, and Knots for y are -0.4357 and -0.3202 m.glm-glm(mark~x+poly(elevation,2)+bs

Re: [R] How to assign multiple return values

2008-03-24 Thread Duncan Murdoch
a long function. I'd be neutral about it if it said not to bother with return() in a very short function. In intermediate cases, I think using return() is good practice. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Great difference for piecewise linear function between R and SAS

2008-03-24 Thread Duncan Murdoch
is sometimes called the truncated power basis, but maybe not commonly in the linear context. I don't know if it has a name here. Duncan Murdoch Thanks a lot. On 3/24/08, Duncan Murdoch [EMAIL PROTECTED] wrote: On 24/03/2008 5:23 AM, zhijie zhang wrote: Dear Rusers, I am now using R

Re: [R] Great difference for piecewise linear function between R and SAS

2008-03-24 Thread Duncan Murdoch
() instead. What you have there doesn't look as though it uses the B-spline basis. The reference given in the ?bs help page is a reasonable starting point, but just about any book that covers splines should handle the B-spline basis and the linear case. Duncan Murdoch #R code and the estimate

Re: [R] Passing (Optional) Arguments

2008-03-25 Thread Duncan Murdoch
of the above in the base packages. Duncan Murdoch To get a better feel for things I've been playing with examples such as: b-c(0.25,0.25); fun-function(a=1,...){a*b}; fun() returns 0.25 0.25 as expected. fun(a=2) returns 0.5 0.5 as expected. However, fun(b=1) returns 0.25 0.25

Re: [R] Newbie help with Sweave

2008-03-25 Thread Duncan Murdoch
using. This is really a LaTeX problem, rather than an R problem: different LaTeX distributions keep changing the rules for how to specify include directories. Duncan Murdoch Best, Jim Zembower, Kevin wrote: Kevin, thanks for writing. Yes, sorry, I forgot to mention

Re: [R] R objects layout

2008-03-26 Thread Duncan Murdoch
-d arrays. Data frames are lists of vectors. This is in various places in the Intro and Language Reference manuals. For example, from the latter: Matrices and arrays are simply vectors with the attribute dim and optionally dimnames attached to the vector. Duncan Murdoch The R Internals

Re: [R] Quick question: Does this graph have a name?

2008-03-28 Thread Duncan Murdoch
a stacked bar plot. It's also somewhat similar to a mosaic plot, since the stacks all add up to 1, but in a mosaic plot, the rectangles typically have gaps between them, and don't necessarily have equal widths. For example, mosaicplot(~ Class + Survived, data = Titanic, color = TRUE) Duncan Murdoch

Re: [R] Second subsequent calls to function fails. Please help debug.

2008-03-29 Thread Duncan Murdoch
. If that doesn't make it obvious, put together a minimal reproducible version that others can try, and see if anyone else can spot the problem. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Clash between alr3 and AlgDesign. (Was: Re: Second subsequent calls to function fails. Please help debug.)

2008-03-30 Thread Duncan Murdoch
like to create a default one if the author doesn't. (The default would be: import what is listed in the Depends clause, export everything.) I don't think this will happen for 2.7.0, though package.skeleton might start creating one. Duncan Murdoch

Re: [R] Clash between alr3 and AlgDesign. (Was: Re: Second subsequent calls to function fails. Please help debug.)

2008-03-30 Thread Duncan Murdoch
On 30/03/2008 11:31 AM, Gabor Grothendieck wrote: On Sun, Mar 30, 2008 at 9:43 AM, Duncan Murdoch [EMAIL PROTECTED] wrote: In my opinion, all packages should have namespaces, and I'd like to create a default one if the author doesn't. (The default would be: import what is listed

Re: [R] Clash between alr3 and AlgDesign. (Was: Re: Second subsequent calls to function fails. Please help debug.)

2008-03-30 Thread Duncan Murdoch
)) detach(pos=p) require(alr3) I've also changed your ifelse() to if (), and not just because I don't need an else clause: ifelse() is designed to do computations on vectors, if() is designed for flow control. I think we want flow control here. Duncan Murdoch require(alr3) My first two

Re: [R] tests Rin Rout

2008-03-30 Thread Duncan Murdoch
/myPack.Rout.save with the known correct versions of the output. Duncan Murdoch Thanks for your help. Christophe __ 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

Re: [R] tests Rin Rout

2008-03-30 Thread Duncan Murdoch
the Rout.save looks like ? I mean, what is the syntax of this file ? It should just be a copy of the Rout file produced from a previous trusted run. R CMD check will ignore certain differences (like changes to the date or R version at the top of the file), but will report on others. Duncan

Re: [R] plot 3dimensional points with log axes

2008-03-31 Thread Duncan Murdoch
). Does anyone has some suggestions? Thanks a lot A general way to do this sort of thing is to take the logs yourself, and get the general purpose function to draw without axes. You can then add ticks, etc. after the fact. Duncan Murdoch __ R-help

Re: [R] unexpected GAM result - at least for me!

2008-03-31 Thread Duncan Murdoch
in the data?) Duncan Murdoch __ 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] unexpected GAM result - at least for me!

2008-03-31 Thread Duncan Murdoch
, then it's a valid fit. (The tests and approximations used in the reported p-values may not be at all valid. I don't know what the requirements are for those in a GAM, but if you're getting a perfect fit, then they probably aren't being met.) Duncan Murdoch Thanks again, Monica Date: Mon

Re: [R] New line operator in mtext

2009-06-22 Thread Duncan Murdoch
to split, it's not a separate element of the label. Duncan Murdoch __ 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] What has happened to the R-Help Google Groups Archive? Alternative?

2009-06-22 Thread Duncan Murdoch
/gmane.comp.lang.r.general, but I don't know if it is similar enough for you. You might want to contact Google to ask what terms of service were violated. Duncan Murdoch Thank you kindly, Tony Breyal __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] New line operator in mtext

2009-06-22 Thread Duncan Murdoch
in relation to the upper line, rather than being centralised. How do I go about centralising the lower line in relation to the upper line, whilst keeping it central to the axis? I think two calls to mtext, one for each line, should do it. Duncan Murdoch __ R

Re: [R] Roxygen vs Sweave for S4 documentation

2009-06-22 Thread Duncan Murdoch
. Duncan Murdoch __ 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] easiest way to extend and recompile a package?

2009-06-22 Thread Duncan Murdoch
be to switch to a different compiler; you'll need to ask Microsoft for support on that. Duncan Murdoch Please give me some guidance. Thank you! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] easiest way to extend and recompile a package?

2009-06-23 Thread Duncan Murdoch
On 22/06/2009 9:21 PM, Michael wrote: Thanks a lot! There is no MSVC project for R on Windows? I don't know of one. Duncan Murdoch On Mon, Jun 22, 2009 at 5:32 PM, Duncan Murdochmurd...@stats.uwo.ca wrote: On 22/06/2009 6:52 PM, Michael wrote: Hi all, I am thinking of extending

Re: [R] list.files(getwd()) and list.files(getwd(), full.names=TRUE) appear to return directory names

2009-06-23 Thread Duncan Murdoch
- everything[ !file.info(everything)$isdir ] Duncan Murdoch __ 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

Re: [R] Rainbow Colored Scatter Plot

2009-06-23 Thread Duncan Murdoch
- cbind(rnorm(6500), rnorm(6500), 1:6500) plot3d(xyz, col=rainbow(6500)) Duncan Murdoch __ 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

Re: [R] Reading 4-byte float into R from binary file

2009-06-24 Thread Duncan Murdoch
, size=4). It will read a single, then convert it to double to store in R. You may need to set the endian value too, if the byte order is wrong. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] How to recursively build a binary tree with R script?

2009-06-24 Thread Duncan Murdoch
- function() { if (runif(1) 0.4) list(makeTree(), makeTree()) else leaf } Duncan Murdoch __ 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

Re: [R] RODBC: Trying to read an Excel file

2009-06-25 Thread Duncan Murdoch
. The ?odbcConnectExcel page links to http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q195951 which describes how to specify one. Duncan Murdoch mo [1] -1 I have tried to set up the connection string using odbcConnectExcel and then have tried to read the file using sqlGetResults. Can

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