Re: [R] Summary Statistics for data.frame

2006-07-08 Thread Duncan Murdoch
). Whether that makes sense depends on the context of your problem. Duncan Murdoch When I use: by(data.logistic,data.logistic$Ydrafted,summary) I receive no errors. I cut and pasted your mysummary function directly into my r console. Should I have made any adjustments to the code? jdr

Re: [R] Comparing two matrices

2006-07-06 Thread Duncan Murdoch
Duncan Murdoch tmat Apple Orange Mango Grape Star A 1 1 1 00 O 1 1 0 00 M 0 0 1 00 G 0 0 0 00 S 1 1 1 00 Thanks. __ R-help

Re: [R] package download numbers

2006-07-06 Thread Duncan Murdoch
to be cited, or a default format if the author hasn't specified. Duncan Murdoch __ R-help@stat.math.ethz.ch 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] IMPORTING FILE FROM EXCEL

2006-07-04 Thread Duncan Murdoch
easier just to use forward slashes, i.e. c:/Documents..., and easiest of all is to use the function file.choose() which pops up a file selection dialog. Duncan Murdoch Warning message: file.show(): file 'C:Documents and SettingsstatsDesktopSUMIplasma2.txt' does not exist I have

Re: [R] macro facility in R

2006-07-03 Thread Duncan Murdoch
one puts that in place of the dep variable. Duncan Murdoch __ R-help@stat.math.ethz.ch 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] Way to convert data frame to matrix

2006-06-30 Thread Duncan Murdoch
as if they were just lists. So if your columns are named A, B, and C, and the dataframe is dataf, you get them as vectors using dataf$A, dataf$B, and dataf$C Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] numerical integration problem

2006-06-29 Thread Duncan Murdoch
description refers to)? Just put a for-loop in your function to iterate over t. Or use Vectorize(). vlambdat - Vectorize(lambdat) should give a function that can be passed to integrate(), assuming that lambdat works when given a length 1 vector as input. Duncan Murdoch n - length(t) hg

Re: [R] read file with readBin (the file was saved with a C-routine)

2006-06-28 Thread Duncan Murdoch
for help. Jörn Schulz. I would also worry about the alignment of the fields within the struct, though it is probably okay given that everything is a multiple of 4 bytes long. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

Re: [R] y-axis label location relative to tick label width?

2006-06-28 Thread Duncan Murdoch
. That is, draw the plot with axes=FALSE, then draw the axes using the axis() function, using pretty() to calculate the tick locations. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] questions on local customized R distribution CD

2006-06-27 Thread Duncan Murdoch
On 6/27/2006 8:05 AM, Liaw, Andy wrote: From: Duncan Murdoch On 6/26/2006 3:14 PM, Dongseok Choi wrote: Hello all! I hope this is the right place to post this question. The Oregon Chapter of ASA is working with local high school teachers as one of its outreaching

Re: [R] Puzzled with contour()

2006-06-27 Thread Duncan Murdoch
in akima is not licensed freely enough to be included in R (no commercial use). The one in lattice is GPL'd, so it should be fine. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] RMySQL...Can't initialize driver???

2006-06-27 Thread Duncan Murdoch
RODBC. Because it uses the more general ODBC interface, it may be slower than a package that is tuned to a particular database, but it works, which is a substantial advantage. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

Re: [R] Possible to get a definition of a function from a package to use without invoking the package?

2006-06-27 Thread Duncan Murdoch
(-5, 2) [1] -1 so be careful about your definitions. I don't know a simple substitute for instring(). Duncan Murdoch I'm pretty sure that mod() and instring() are very basic and don't have any exotic dependencies. I did find an alternative mod() in the new matlab package, and that's fine

Re: [R] Patch for rgl with gcc 4.0 in R 2.3.0 on OS X

2006-06-26 Thread Duncan Murdoch
. Duncan Murdoch On 6/26/2006 9:08 AM, Balaji S. Srinivasan wrote: Hi, I recently had a problem installing the rgl package on OS X and put together a simple patch. The patched package is available here: http://jinome.stanford.edu/files/rgl_0.66-patched_for_gcc4.tar.gz It can be installed

Re: [R] Puzzled with contour()

2006-06-26 Thread Duncan Murdoch
this: zmat - matrix(NA, 3, 19) zmat[cbind(20*x + 1, y/10 - 1)] - z x - (0:2)/20 y - (2:20)*10 contour(x,y,zmat) Duncan Murdoch x y z [1,] 0.00 20 1.000 [2,] 0.00 30 1.000 [3,] 0.00 40 1.000 [4,] 0.00 50 1.000 [5,] 0.00 60 1.000 [6

Re: [R] Puzzled with contour()

2006-06-26 Thread Duncan Murdoch
On 6/26/2006 10:39 AM, Gabor Grothendieck wrote: I think it would be helpful if this were added to the contour help file. You mean an example of building up the z matrix from points, or just a general discussion of the issue? Duncan Murdoch On 6/26/06, Duncan Murdoch [EMAIL PROTECTED] wrote

Re: [R] Problem running one of the rgl demo scripts...

2006-06-26 Thread Duncan Murdoch
video driver (9/20/2000), you might be able to update it and fix a bug there. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting

Re: [R] questions on local customized R distribution CD

2006-06-26 Thread Duncan Murdoch
help/advice from the core group members if any one is interested. See the R Installation and Administration manual first. It tells how to build R installers with non-standard included packages. Hopefully for 2.4.0 more customizations will be possible. Duncan Murdoch

Re: [R] Basic package structure question

2006-06-23 Thread Duncan Murdoch
. You might be able to achieve this by doing your builds on Windows, rather than on Linux or MacOS, but as far as I know it is not possible to build .chm files on those OSs. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

Re: [R] rank(x,y)?

2006-06-22 Thread Duncan Murdoch
Gabor Grothendieck wrote: On 6/21/06, Duncan Murdoch [EMAIL PROTECTED] wrote: Peter Dalgaard wrote: Duncan Murdoch [EMAIL PROTECTED] writes: Suppose I have two columns, x,y. I can use order(x,y) to calculate a permutation that puts them into increasing order of x

[R] rank(x,y)?

2006-06-21 Thread Duncan Murdoch
. Is there a simple way to get what I want? E.g. x - c(1,2,3,4,1,2,3,4) y - c(1,2,3,1,2,3,1,2) rank(x+y/10) [1] 1 3 6 7 2 4 5 8 gives me the answer I want, but only because I know the range of y and the size of gaps in the x values. What do I do in general? Duncan Murdoch

Re: [R] rank(x,y)?

2006-06-21 Thread Duncan Murdoch
Peter Dalgaard wrote: Duncan Murdoch [EMAIL PROTECTED] writes: Suppose I have two columns, x,y. I can use order(x,y) to calculate a permutation that puts them into increasing order of x, with ties broken by y. I'd like instead to calculate the rank of each pair under the same

Re: [R] multi-dimension array of raw

2006-06-20 Thread Duncan Murdoch
reasonable to add. Duncan Murdoch __ R-help@stat.math.ethz.ch 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] multi-dimension array of raw

2006-06-20 Thread Duncan Murdoch
06 b[1,1,] - raw(3) Error: incompatible types (from raw to raw) in array subset assignment I can work around this with computed indices, but I wonder if this is expected behaviour. This is now fixed in r-devel and r-patched. Duncan Murdoch

Re: [R] can I call user-created functions without source() ?

2006-06-19 Thread Duncan Murdoch
. So you could put your source(blahblah.R) into .Rprofile if you want these functions to always be available. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http

Re: [R] can I call user-created functions without source() ?

2006-06-19 Thread Duncan Murdoch
directory if that fails. Duncan Murdoch Again, one of the conveniences of the matlab/octave approach is that you can have a different sub-directory for each project, so if you start work in a particular one then you have access to any special definitions for that project, and not to others

Re: [R] can I call user-created functions without source() ?

2006-06-19 Thread Duncan Murdoch
source(~/.Rprofile) into it, so both the local changes and the general ones get loaded. Duncan Murdoch joerg __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R

Re: [R] can I call user-created functions without source() ?

2006-06-19 Thread Duncan Murdoch
On 6/19/2006 10:19 AM, Joerg van den Hoff wrote: Duncan Murdoch wrote: Just a few comments below on alternative ways to do the same things: On 6/19/2006 8:19 AM, Joerg van den Hoff wrote: for short term usage of some specialized functions I have added some lines to the `.Rprofile' in my

Re: [R] can I call user-created functions without source() ?

2006-06-19 Thread Duncan Murdoch
else. Duncan Murdoch I find that procedure simpler than learning the package mechanism. It is easy to add new functions periodically. Not long ago, I posted the R code I used to automate the process. As the archive seems unreachable right now (from here, anyway) and the code

Re: [R] Function hints

2006-06-19 Thread Duncan Murdoch
not be half as useful as it is, right?) and there is no sorting by relevance in the `help.search' output, I think. how this sorting could be achieved is a different question, of course. You probably want RSiteSearch(keyword, restrict=functions) (or even without the restrict part). Duncan

Re: [R] Standard Deviation Distribution

2006-06-18 Thread Duncan Murdoch
/(2*sig2)) * s^(n-2) } Your initial factor looks a lot different from theirs. I think you believed your variable name (i.e. sig2 is sigma^2), but didn't define it that way. Duncan Murdoch Version 2.3.1 (2006-06-01) on Windows XP SP2 Thanks for any help. David L. Reiner Rho Trading

Re: [R] Saving R graphics with version 2.3.1

2006-06-15 Thread Duncan Murdoch
. You can type the extension when you save it, if you're typing the filename. The default names generally include the extension. Previous R versions work without problems. Could you give a detailed description to reproduce the problem? Duncan Murdoch Has everyone had a similar problem

Re: [R] NA values

2006-06-12 Thread Duncan Murdoch
through the list, using one of the apply functions (or even a for loop): apply(x, 2, function(col) {col[is.na(col)] - 1000; col} ) which is essentially a short form for for (i in 1:ncol(x)) { col - x[,i] col[is.na(col)] - 1000 x[,i] - col } Duncan Murdoch Thanks and Regards

Re: [R] Re-binning histogram data

2006-06-09 Thread Duncan Murdoch
simulation of a stone-age tool on a modern computer, I might agree. Duncan Murdoch -- Bert Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Petr Pikal Sent: Thursday, June 08, 2006 6:17 AM To: Justin Ashmall; r-help@stat.math.ethz.ch

Re: [R] sqlSave() and rownames=TRUE makes my Rgui crash

2006-06-09 Thread Duncan Murdoch
around May 20, though it was talking about updates rather than insertions. Duncan Murdoch __ R-help@stat.math.ethz.ch 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] sqlSave() and rownames=TRUE makes my Rgui crash

2006-06-09 Thread Duncan Murdoch
probably not legal syntax on other databases. For those you could put together multiple INSERT statements.) Duncan Murdoch [1] [RODBC] ERROR: Could not SQLExecDirect [2] S1T00 1136 [MySQL][ODBC 3.51 Driver][mysqld-5.0.21-community-nt]Column count doesn't match value count at row 1 You might

Re: [R] apologies if you aready received this ?

2006-06-08 Thread Duncan Murdoch
=TRUE) to get R to pause the script whenever it is about to erase the graphics window. Duncan Murdoch and this worked nicely because I then did source(program name) at the Splus prompt and a plot was created on the screen and then the wait() function was right under the plotting code

Re: [R] Using data=x or subset=y in user-defined functions

2006-06-08 Thread Duncan Murdoch
The substitute says to give back the unevaluated expression used for the argument. Duncan Murdoch Manuel Thanks! Just to be sure, the following will do what I want? eg.function - function(x, data=NULL, subset=NULL, ...) { with(if(is.null(subset)) data else subset(data,subset

Re: [R] Formatting numbers for printing

2006-06-08 Thread Duncan Murdoch
: sprintf(%03d-%03d, Number %/% 1000, Number %% 1000) Duncan Murdoch __ R-help@stat.math.ethz.ch 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] Editor/environment problem

2006-06-05 Thread Duncan Murdoch
This has been fixed in 2.3.1. See http://finzi.psych.upenn.edu/R/Rhelp02a/archive/76657.html or http://finzi.psych.upenn.edu/R/Rhelp02a/archive/76953.html Duncan Murdoch On 6/5/2006 3:19 PM, Richard Valliant wrote: I have encountered an odd problem in editing a function. I found

Re: [R] HTML masked (due to Rpad?)

2006-06-03 Thread Duncan Murdoch
?pkgname or just ?pkgname). Duncan Murdoch Loading required package: R2HTML Attaching package: 'Rpad' The following object(s) are masked from package:R2HTML : HTML ?HTML Help on topic 'HTML' was found in the following packages: Package Library

Re: [R] Help on plotting a 3 dimensional surface

2006-06-03 Thread Duncan Murdoch
the scatterplot3d package, or the cloud function in the lattice package. You can also convert them to a surface using interp from the akima package, and then they'll work with persp. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https

Re: [R] warnings messages from R when returning nothing

2006-06-03 Thread Duncan Murdoch
]) Duncan Murdoch __ R-help@stat.math.ethz.ch 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] Random number generation

2006-06-01 Thread Duncan Murdoch
(so you save a different seed every time). My advice would be not to save the workspace; I save individual objects sometimes, but I like a nice clean workspace each time I start. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https

Re: [R] Compiling R to run natively on Windows x64

2006-05-30 Thread Duncan Murdoch
it in Win64. I'm sure lots of people would appreciate their work. Duncan Murdoch __ R-help@stat.math.ethz.ch 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] Is there a way to draw 3d plot?

2006-05-26 Thread Duncan Murdoch
On 5/26/2006 3:39 AM, Antonio, Fabio Di Narzo wrote: 2006/5/26, Michael [EMAIL PROTECTED]: On 5/26/06, Uwe Ligges [EMAIL PROTECTED] wrote: Michael wrote: Hi all, I have a 2D matrix, which has 100 rows, and 100 columns, I have a 2D matrix, with 100 rows and 100 columns, I want to display

Re: [R] Try to debbug R script

2006-05-26 Thread Duncan Murdoch
the values of (((i*step)-step)+j) and k just before this line (or using the debugger to examine them). They probably aren't in the range you were expecting. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] converting hexadecimal

2006-05-24 Thread Duncan Murdoch
prefix, e.g. as.numeric(0x0A) [1] 10 You can use paste() or gsub() to put the prefix on existing strings. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http

Re: [R] after identify labels dissapear XP

2006-05-23 Thread Duncan Murdoch
a recipe that *always* loses the identifiers? Duncan Murdoch Thanks, Mihai Nica, ABD Jackson State University ITT Tech Instructor 170 East Griffith Street G5 Jackson, MS 39201 601 914 0361 The least of learning is done in the classrooms. - Thomas Merton

Re: [R] shapes in rgl

2006-05-23 Thread Duncan Murdoch
this way. Take a look at the qmesh3d man page, and demo(shapes3d) for more ideas. The nice thing about the qmesh stuff is that you can define a shape once, then transform it to display it in different locations, or at different sizes, etc. Duncan Murdoch Duncan Greg Snow wrote: Try

Re: [R] odd feature

2006-05-22 Thread Duncan Murdoch
to read. It's suboptimal in speed and memory use because of creating the temp variable, but in most cases I think that would be such a small difference that the small increase in readability is worthwhile. Duncan Murdoch Martin Maechler, ETH Zurich. Gabor Here is another approach

Re: [R] How can you buy R?

2006-05-22 Thread Duncan Murdoch
copy. You don't need the GPL to give you permission to do this. That's certainly true in the US and Canada. Your country may vary. Duncan Murdoch Thus, the last sentence of mine that you quoted: My understanding was that in that moment a product was created

Re: [R] normality testing with nortest

2006-05-22 Thread Duncan Murdoch
of counterexamples were a research methods page at a department of psychology, and another at a medical school. I'll send a copy of this note to people there. Duncan Murdoch There is no mechanism to give you fewer significant or more stable p-values, and a p-value close to one is no better

Re: [R] odd feature

2006-05-22 Thread Duncan Murdoch
On 5/22/2006 9:38 AM, Frank E Harrell Jr wrote: Duncan Murdoch wrote: On 5/22/2006 3:26 AM, Martin Maechler wrote: Gabor == Gabor Grothendieck [EMAIL PROTECTED] on Sun, 21 May 2006 09:47:07 -0400 writes: Gabor If you know that test is a scalar Gabor result - if (test) a else b

Re: [R] writing 100 files

2006-05-22 Thread Duncan Murdoch
[2,]) write.table(bb8, quote = F, sep = '\t', row.names = F, col.names = F, file = 'whatever?.txt') } so all the files are called whatever1: whatever1000 Any idea? Use the paste() function to construct the name, e.g. file = paste(whatever,i,.txt, sep=) Duncan Murdoch

Re: [R] odd feature

2006-05-22 Thread Duncan Murdoch
such things. Duncan Murdoch __ R-help@stat.math.ethz.ch 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] Fast update of a lot of records in a database?

2006-05-21 Thread Duncan Murdoch
, this is good enough. Thanks to everyone for their help and suggestions. Duncan Murdoch Steve Miller -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of hadley wickham Sent: Friday, May 19, 2006 2:20 PM To: Duncan Murdoch Cc: [EMAIL PROTECTED]; r-help

Re: [R] Converting character strings to numeric

2006-05-19 Thread Duncan Murdoch
What do I have to do to get x3 to be the same as x2. They should be, and are on my system in 2.2.1 and 2.3.0. Which version/platform are you using? Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] iraq statistics - OT

2006-05-19 Thread Duncan Murdoch
14000 civilians violently killed in 2005. This probably doesn't include police or members of the armed forces. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http

Re: [R] Precision in estimating log

2006-05-19 Thread Duncan Murdoch
-0.95),digit=22) [1] -2.99573227355399 Any possible explanation ? R uses finite precision arithmetic, usually giving around 15-16 digit accuracy. Your results agree in the first 15 digits. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list

[R] Fast update of a lot of records in a database?

2006-05-19 Thread Duncan Murdoch
of times for different ids) COMMIT and this takes hours to complete. Surely there must be a quicker way? Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R

Re: [R] Fast update of a lot of records in a database?

2006-05-19 Thread Duncan Murdoch
On 5/19/2006 11:17 AM, Duncan Murdoch wrote: We have a PostgreSQL table with about 40 records in it. Using either RODBC or RdbiPgSQL, what is the fastest way to update one (or a few) column(s) in a large collection of records? Currently we're sending sql like BEGIN UPDATE table

Re: [R] Fast update of a lot of records in a database?

2006-05-19 Thread Duncan Murdoch
On 5/19/2006 3:19 PM, hadley wickham wrote: put the updates into a temporary table called updates UPDATE bigtable AS a FROM updates AS b WHERE a.id = b.id SET a.col1 = b.col1 I don't think this will be any faster - why would creating a new table be faster than updating existing

Re: [R] edit/environment bug??

2006-05-18 Thread Duncan Murdoch
was that when you use edit(), make an error, and then open and fix the file, the original environment of the function gets lost. edit() was defaulting to the base environment instead of the global environment as it usually should. Duncan Murdoch __ R-help

Re: [R] Writing to a file with fixed precision

2006-05-18 Thread Duncan Murdoch
what you want, but you could do it by splitting x into 3 parts to pass to sprintf and using do.call, e.g. x.fmt - apply(x, 1, function(x) do.call(sprintf, c(%.14f %.10f %2.5f, as.list(x Duncan Murdoch Thank you Yihsu Chen The Johns Hopkins University On Mon, 10 Oct 2005

Re: [R] Can't there be a cd command?

2006-05-16 Thread Duncan Murdoch
is probably giving you wrong answers half the time, or is extremely limited in scope. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting

Re: [R] What does it mean to be masked from data when attaching? (Newbie question)

2006-05-13 Thread Duncan Murdoch
frames chapter. Duncan Murdoch And by the way, one of the analyses I have to perform is simply to tabulate the days of the week that occur in variable Day by using table(Day) which gives, for example, Day Fri Mon Sat Sun Thur Tue Wed 173 191 111 92 188 218 187

Re: [R] Legend titles in log plots broken? (ver. 2.2.1)

2006-05-11 Thread Duncan Murdoch
- ymax, labels = title, adj = c(0.5, 0), cex = cex, col = text.col) text2(xt, yt, labels = legend, adj = adj, cex = cex, col = text.col) Duncan Murdoch Rob Steele wrote: Legend titles work in linear plots: curve(1/x, xlim = c(0, 1)) legend(x

Re: [R] Can't there be a cd command?

2006-05-10 Thread Duncan Murdoch
), so beginners there could be told mydf - read.table() and they'd get something useful. Martin Maechler has disagreed with me about this in the past, but hasn't convinced me that he's right, he's just convinced me that doing nothing is easier than arguing about it. Duncan Murdoch

Re: [R] Can't there be a cd command?

2006-05-10 Thread Duncan Murdoch
=)) + return(TRUE)}, name=pwdprompt) [1] pwdprompt C:/home setwd(projects) C:/home/projects That doesn't quite work in the current Rgui, because the menu function to change directories (File | Change dir...) doesn't trigger the callback. Not sure if that's a bug or not... Duncan Murdoch

Re: [R] Can't there be a cd command?

2006-05-10 Thread Duncan Murdoch
On 5/10/2006 10:45 AM, Gabor Grothendieck wrote: On 5/10/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 5/10/2006 9:29 AM, Paul Johnson wrote: It is a FAQ in our Linux lab. People start emacs and fire up R via ess, and then they have no idea 'where they are. For computer experts

Re: [R] Can't there be a cd command?

2006-05-10 Thread Duncan Murdoch
On 5/10/2006 11:10 AM, Gabor Grothendieck wrote: On 5/10/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 5/10/2006 10:45 AM, Gabor Grothendieck wrote: On 5/10/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 5/10/2006 9:29 AM, Paul Johnson wrote: It is a FAQ in our Linux lab. People start

Re: [R] Can't there be a cd command?

2006-05-10 Thread Duncan Murdoch
On 5/10/2006 12:15 PM, Jan T. Kim wrote: On Wed, May 10, 2006 at 11:26:55AM -0400, Duncan Murdoch wrote: On 5/10/2006 11:10 AM, Gabor Grothendieck wrote: On 5/10/06, Duncan Murdoch [EMAIL PROTECTED] wrote: What is it that you find objectionable about having a default for the file

Re: [R] attach() warning message

2006-05-10 Thread Duncan Murdoch
to keep backwards compatibility, but it's not always possible. Duncan Murdoch __ R-help@stat.math.ethz.ch 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] command completion?

2006-05-10 Thread Duncan Murdoch
to the console versions; some of them use readline's filename completion which would almost certainly be broken by this. Others need to run under ESS. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] integer vector to a string

2006-05-10 Thread Duncan Murdoch
of width with a max of 500) paste(1:500, collapse=,) Duncan Murdoch __ R-help@stat.math.ethz.ch 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] Legend titles in log plots broken? (ver. 2.2.1)

2006-05-10 Thread Duncan Murdoch
, title = 'Legend Title') I don't think this is the problem. It's simply a little bug in legend() that puts the title in the wrong place when a log scale is used. I'll fix it. Duncan Murdoch l $rect $rect$w [1] 0.2349272 $rect$h [1] 0.2727899 $rect$left [1] 0.7618728

Re: [R] perspective

2006-05-09 Thread Duncan Murdoch
), or put together your own using rgl.surface in the current version. Duncan Murdoch __ R-help@stat.math.ethz.ch 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] performing functions on variables of different length

2006-05-08 Thread Duncan Murdoch
from there, e.g. mydf - data.frame(subject, grp, time, outcome) tapply(mydf$outcome,na.rm=T,mydf$grp,mean) # OR with(mydf, tapply(outcome,na.rm=T,grp,mean)) anova(lme(outcome ~ grp * time, random = ~ 1 | subject, data=mydf)) I haven't tested these suggestions, so there may be typos. Duncan

Re: [R] Calling C++ code fom R --How to export C++ unsigned integer to R?

2006-05-08 Thread Duncan Murdoch
bits, you're in trouble, because there is no way to represent all unsigned 64 bit integers in R.) By the way, generally more technical questions like interfacing to C++ are better in the R-devel list. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing

Re: [R] persp or wireframe 3D plot: how can I independently adjust linewidth of the 'surface' and framebox?

2006-05-08 Thread Duncan Murdoch
restrictions. Duncan Murdoch __ R-help@stat.math.ethz.ch 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] sprintf question

2006-05-03 Thread Duncan Murdoch
. Another possibility is to name the elements of v, then you can do things like v[foo], v[bar], etc. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R

[R] Duration labels on plot axes

2006-04-30 Thread Duncan Murdoch
. Is there a class with an axis.* method defined that has behaviour something like this? Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting

Re: [R] Building RGL for R-2.3 for Tiger 10.4.6 on PPC

2006-04-28 Thread Duncan Murdoch
libraries, and it looks as though you need to use them. If you have experience working with configure scripts and notice something missing from RGL's which is causing this, let me or Daniel Adler know, and we'll fix it for the next release. Duncan Murdoch

Re: [R] Error in readChar(): invalid UTF-8 input

2006-04-27 Thread Duncan Murdoch
about on other platforms? Duncan Murdoch __ R-help@stat.math.ethz.ch 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] as.numeric question

2006-04-27 Thread Duncan Murdoch
On 4/27/2006 5:24 PM, Paulo Brando wrote: Dear all, Is there a way of keeping the actual information in a factor when converting it to numeric? Example: What I want: as.numeric(factor(5:10)) 5, 6, 7, 8, 9, 10 How R works: as.numeric(factor(5:10)) #R example on

Re: [R] Running R on Windows 2000 Terminal Services

2006-04-26 Thread Duncan Murdoch
Barry Rowlingson wrote: Gavin Simpson wrote: Dear list, My employer uses a Windows 2000 Terminal Server-based system for its college-wide managed computer service - computers connect directly to the WTS servers for their sessions, using a Citrix ICA client. When I asked them to install R

Re: [R] www.r-project.org

2006-04-26 Thread Duncan Murdoch
a stable, standard, simple setup is extremely desirable. That means simple HTML to be edited in a text editor, no special CMS. These requirements are quite hard to meet, so expect changes to the web sites to be very time consuming, and possibly rejected en masse in the end. Duncan Murdoch

Re: [R] persp plot increasing 'x' and 'y' values expected

2006-04-25 Thread Duncan Murdoch
before posting them. Yours wouldn't work, because x, y and z *must not* be the same length in persp. Duncan Murdoch Am Tuesday 25 April 2006 12:24 schrieb [EMAIL PROTECTED]: hi peter, thank you for your advice. ok, i see the problem, but if i do x-unique(data$x) y-unique(data$y) z

Re: [R] GUI font size

2006-04-24 Thread Duncan Murdoch
this bug has been around for at least 7 years, I'm going to check the fix for it fairly carefully before I commit it, but I expect it to be fixed in the next release. I may increase the list of sizes in the dropdown box at the same time. Duncan Murdoch

Re: [R] programming advice?

2006-04-21 Thread Duncan Murdoch
environment of their enclosing function. There are other reasons for nested functions (e.g. to create functions with static storage), but they are less common than doing it just to make the code clear. Duncan Murdoch __ R-help@stat.math.ethz.ch

Re: [R] Creat new column based on condition

2006-04-21 Thread Duncan Murdoch
is to handle any unexpected case where V1 isn't 10, 20 or 30). My preference would be to use just one assignment, and if I was sure 10, 20 and 30 were the only possibilities, would use V2 - ifelse( V1 == 10, 4, ifelse( V1 == 20, 6, 10 )) Duncan Murdoch So the O/P looks like

Re: [R] Minor documentation issue

2006-04-21 Thread Duncan Murdoch
the documentation is correct, even if the usage in this case is the reverse of English usage. (You'll quickly want undebug(seq.default) if you don't want to spend a lot of time in the debugger; seq() is a pretty commonly used function!) Duncan Murdoch

Re: [R] the difference between x1 and x1

2006-04-20 Thread Duncan Murdoch
. floor(data[,model.list]) Duncan Murdoch Here is a simplified example that would solve my problem. Imagine I have my data stored in a data frame. x1 - x2 - x3 - x4 - x5 - rnorm(20,0,1); data - as.data.frame(cbind(x1,x2,x3,x4,x5)); I have a vector containing the variables of interest

Re: [R] R debugging options

2006-04-17 Thread Duncan Murdoch
oriented material on my web page, http://www.stats.uwo.ca/faculty/murdoch/software/debuggingR/. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org

Re: [R] Creating an environment for a function.

2006-04-13 Thread Duncan Murdoch
direction. Maybe this helped? Duncan Murdoch __ R-help@stat.math.ethz.ch 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] Variable Scope

2006-04-12 Thread Duncan Murdoch
.) are functions stored in some environment outside your function. Duncan Murdoch __ R-help@stat.math.ethz.ch 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] unable to open connection

2006-04-12 Thread Duncan Murdoch
' Does /home/fred/R/data/pathtofile/041006 exist, and do you have read permission on it? It doesn't look like it, from the ls above. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] unable to open connection

2006-04-12 Thread Duncan Murdoch
directory lies below your home directory, but your working directory is /home/fred/R so it is looking for it in the wrong place. Duncan Murdoch Duncan Murdoch [EMAIL PROTECTED] wrote: On 4/12/2006 12:40 PM, Fred J. wrote: Dear R users I am having a problem unable to open connection

Re: [R] Newbie question: setting rgl.surface plot attributes

2006-04-12 Thread Duncan Murdoch
to rgl, so there's now a persp3d() function in the unreleased version. I'm not sure when the release date will be, but hopefully not too far in the future. If you want to test an unreleased version, contact me off-list. Duncan Murdoch __ R-help

<    1   2   3   4   5   6   7   8   9   10   >