Re: [R] srt --- slope text with function?

2006-02-05 Thread Duncan Murdoch
. I believe this is best done through lists, but I am not sure. I'd guess most people learn about functions from the Intro to R manual rather than the function man page, but this is a good suggestion. Duncan Murdoch I find myself programming more and more in R, so I am beginning to see

Re: [R] R command line: need intelligent command history recall?

2006-02-04 Thread Duncan Murdoch
myself. Duncan Murdoch I've used Tinn-R. Frankly it is quite creative. It solved the line-by-line execution problem by copying the line and pasted it to R-console automatically. But a lot of times clipboard generates error. And often times the copy and paste within Tinn editor itself

Re: [R] srt --- slope text with function?

2006-02-04 Thread Duncan Murdoch
to ask. Using strsplit and strwidth you should be able to do it, but it will probably look quite ugly. 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] srt --- slope text with function?

2006-02-04 Thread Duncan Murdoch
to make them.) Duncan Murdoch On 2/4/2006 5:19 PM, ivo welch wrote: Thank you, Duncan. This led me to the info I needed. Here is a simple utility function that does what I needed---maybe it will come in helpful for others

Re: [R] rgl install problem on Solaris 10 X86

2006-02-03 Thread Duncan Murdoch
the latest Subversion checkout. Duncan Murdoch I tried and got the following error messages. When I compiled my R as 64bit, I used the SUN ProW compilers. However, gcc seems to being used below as well as missing some information. Thank you in advance, Dongseok install.packages(rgl

Re: [R] is there a way to visualize 3D normal distributions?

2006-02-02 Thread Duncan Murdoch
good. 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] How to get the namespace of a function?

2006-02-02 Thread Duncan Murdoch
(and you'll get an error in 2.3.0). But why would you want to do that? What are you trying to achieve? Duncan Murdoch Later on I called that myfun and got an error message because the function index() in the zoo package was called inside myfun and was not visible: Error in myfun(args

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Duncan Murdoch
Tierney in one of R News 3/1 that explains the search order when namespaces are involved. Duncan Murdoch FS On 2/2/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 2/2/2006 10:56 AM, Fernando Saldanha wrote: I declared the environment of the function myfun to be NULL as follows: environment

Re: [R] is there a way to visualize 3D normal distributions?

2006-02-02 Thread Duncan Murdoch
matrix; it may not be obvious that this is allowed, but it is.) Duncan Murdoch On 2/2/06, Ben Bolker [EMAIL PROTECTED] wrote: Duncan Murdoch murdoch at stats.uwo.ca writes: On 2/2/2006 3:39 AM, Michael wrote: Hi all, How do I visualize a contour of a tri-variate normal distribution? I

Re: [R] How to get the namespace of a function?

2006-02-02 Thread Duncan Murdoch
object system, which predates namespaces by a long time, but it's been a while since I've thought about this.) Duncan Murdoch Of course, one can simulate anything with a Turing machine, but I consider Fernando's criticisms somewhat unfair because he is expecting R to behave like something he

Re: [R] beginner Q: hashtable or dictionary?

2006-01-30 Thread Duncan Murdoch
is used in lists. You can avoid the parent problem in R 2.2.x+ by setting the parent explicitly to emptyenv(). 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] Integer bit size and the modulus operator

2006-01-30 Thread Duncan Murdoch
arithmetic. I can't remember the name of it right now, but Google should be able to find it for you... Duncan Murdoch Thank you, any help would be greatly appreciated. Ionut Florescu __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman

Re: [R] Integer bit size and the modulus operator

2006-01-30 Thread Duncan Murdoch
it. But that's not the cause of the crash. Duncan Murdoch This checks if element x is a generator of the group Z_p. If you try this function for p = 41 and x various increasing values eventually it will crash R. That is what I meant by random, at first I started x=2,3 so on, when I got to 8, R

Re: [R] help with read.table() function

2006-01-29 Thread Duncan Murdoch
read.table call. Duncan Murdoch thanks. --- Duncan Murdoch [EMAIL PROTECTED] wrote: On 1/29/2006 10:26 AM, oliver wee wrote: hello, I have just started using R for doing a project in time series... unfortunately, I am having trouble using the read.table function for use in reading my

Re: [R] Creating 3D Gaussian Plot

2006-01-28 Thread Duncan Murdoch
don't get a response this time, you should describe what you want in basic terms, and/or point to examples of it on the web. Duncan Murdoch Can anyone offer any pointers at all? Laura Quinn Institute of Atmospheric Science School of Earth and Environment University of Leeds Leeds LS2

Re: [R] Creating 3D Gaussian Plot

2006-01-28 Thread Duncan Murdoch
something like bg3d(white) surface3d(x,y,z*6,col=green) which gives a surface like the one above, but you can rotate it using the mouse. Duncan Murdoch Laura Quinn Institute of Atmospheric Science School of Earth and Environment University of Leeds Leeds LS2 9JT tel: +44 113 343 1596 fax

Re: [R] substituting an object not found

2006-01-27 Thread Duncan Murdoch
in the workspace: a - 1:10 ifelse(exists(b), b, a) [1] 1 if (exists(b)) b else a [1] 1 2 3 4 5 6 7 8 9 10 Duncan Murdoch Gabor On Fri, Jan 27, 2006 at 04:38:39AM -0800, Mikkel Grum wrote: Is there any function in R like is.not.found(x, y) meaning if you can't find

Re: [R] Nesting Functions

2006-01-27 Thread Duncan Murdoch
On 1/27/2006 9:07 PM, Manuel Morales wrote: On Thu, 2006-01-26 at 21:55 -0500, Duncan Murdoch wrote: On 1/26/2006 9:45 PM, Manuel Morales wrote: Dear list members, I'm looking for a way to write nested functions similar to the function Nest or NestList in Mathematica. E.g., f-function(x

Re: [R] Nesting Functions

2006-01-26 Thread Duncan Murdoch
times with 2 as the initial value. It's easy enough using a for loop: nest - function(f, initial, reps) { result - initial for (i in seq(len=reps)) result - f(result) result } Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https

Re: [R] is.integer() function

2006-01-25 Thread Duncan Murdoch
for the language. :-) Duncan Murdoch This seems to be an endless source of confusion to anyone who didn't start their programming days in Fortran, C, or assembly language (or other strongly-typed language, I guess). Barry __ R-help

Re: [R] Data frame index?

2006-01-18 Thread Duncan Murdoch
a If your columns are all numeric, you won't get the warning I got. 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] Windows package upates

2006-01-18 Thread Duncan Murdoch
you think it tried to update those, but failed because of problems with the mirror? 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] how can i locate the source code of a module quickly?

2006-01-17 Thread Duncan Murdoch
30514 airmiles isn't a function, it's a dataset, and it is located in src/library/datasets/data/airmiles.R. I hope this helps. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] LaTeX slide show (Was: Re: Taking code from packages)

2006-01-14 Thread Duncan Murdoch
On 1/14/2006 2:39 AM, Henrik Bengtsson wrote: Duncan Murdoch wrote: On 1/13/2006 2:04 AM, Ales Ziberna wrote: Hello! [snip] (I'm a little sensitive about dependencies now, since the LaTeX seminar template I've used a few times no longer works. It depends on too many LaTeX packages

Re: [R] Can I call a R function from within C/C++ directly?

2006-01-14 Thread Duncan Murdoch
On 1/14/2006 4:48 PM, Shaozhong Zhao wrote: Dear all R users£¬ Can I call a R function from within C/C++ directly? I mean don't run R. Thank you! Yes. See the R Extensions manual, in particular chapter 7, Linking GUIs and other front ends to R. Duncan Murdoch

Re: [R] Taking code from packages

2006-01-13 Thread Duncan Murdoch
in them. Seems like I'll be forced to use Powerpoint or Impress.) Duncan Murdoch What about regarding code that was sent to the list, usually as a response to one of my problems. I assume that in this case it is best to consult the author? Any comments and opinions are very welcomed

Re: [R] Wikis etc.

2006-01-07 Thread Duncan Murdoch
, either as someone who wanted the answer, or someone who wanted to provide it. Duncan Murdoch Frank E Harrell Jr wrote: I feel that as long as people continue to provide help on r-help wikis will not be successful. I think we need to move to a central wiki or discussion board and to move

Re: [R] Question about graphics in R

2006-01-07 Thread Duncan Murdoch
),add=T) Duncan Murdoch Is this possible? I would be grateful for any hints. Thanks, Martin __ 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] Wikis etc.

2006-01-06 Thread Duncan Murdoch
to be prepared for changes in the organization of the documentation with new R releases (and changes in function names, and changes in the examples...). Duncan Murdoch In principle, another possibility is to do something like the PHP manual at http://www.php.net/manual/en/, which is not a wiki but more

Re: [R] Setting the working directory on Windows

2006-01-05 Thread Duncan Murdoch
directories as strings if you need them. See also ?basename . Brian Ripley added a function choose.dir() to R-devel, which will give you access to the code in the File|Change dir... menu item in R code. Won't be out for a few more months, though. Duncan Murdoch

Re: [R] Unlink a directory with leading and trailing space

2006-01-04 Thread Duncan Murdoch
this directory would be appreciated. What name did you end up with? I don't have any problem removing the directory test just by right-clicking and choosing Delete. You can also open a command window, and put the name in quotes, e.g. rmdir test I do see the problem in unlink(). Duncan

Re: [R] Putting an object in to a function that calls the current function

2006-01-04 Thread Duncan Murdoch
, rather than going through integer indexing the way you (used to?) have to do in S-PLUS. Did I mention that messing with the environment of your caller is a bad idea? It's not yours, don't touch it. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing

Re: [R] Unlink a directory with leading and trailing space

2006-01-04 Thread Duncan Murdoch
testdir worked. Duncan Murdoch Mike - Original Message - From: Prof Brian Ripley [EMAIL PROTECTED] To: Duncan Murdoch [EMAIL PROTECTED] Cc: Mike White [EMAIL PROTECTED]; R-help@stat.math.ethz.ch Sent: Wednesday, January 04, 2006 1:49 PM Subject: Re: [R] Unlink a directory

Re: [R] Putting an object in to a function that calls the current function

2006-01-04 Thread Duncan Murdoch
On 1/4/2006 10:32 AM, Ales Ziberna wrote: Thank you both (Duncan Murdoch and Gabor Grotehendieck) for your answers. Both work and my problem is solved. I do aggree with Duncan Murdoch that usually messing with the environment of your caller is a bad idea. The reason why I still want to do

Re: [R] Putting an object in to a function that calls the current function

2006-01-04 Thread Duncan Murdoch
to use it including s(), and do something like the lexical scoping solution below. Duncan Murdoch Ales Ziberna -Original Message- From: Duncan Murdoch [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 04, 2006 5:05 PM To: Ales Ziberna Cc: 'R-help' Subject: Re: [R] Putting

Re: [R] How to produce this graphic

2006-01-04 Thread Duncan Murdoch
(x,y) does a nice job. See ?dotchart for a lot of optional arguments to change the look of it. 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] Using 'polygon' in a 3d plot

2006-01-04 Thread Duncan Murdoch
plot functions, so the axes are harder to draw. 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] How to set the size of a rgl window, par3d() ?

2006-01-03 Thread Duncan Murdoch
, OSX). 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] Ordering a matrix by another variable

2006-01-02 Thread Duncan Murdoch
4 2 7 2 4 6 1 5 4 3 8 5 How do I do this? This is not a standard ascending or descending sort. I think M[V,] is all you need. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

Re: [R] Bookmarking a page inside r-project.org

2006-01-02 Thread Duncan Murdoch
the output HTML would need to be mirrored. Care to put together such a thing, and import all the existing pages into it? Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Bookmarking a page inside r-project.org

2006-01-02 Thread Duncan Murdoch
used) You can check out from https://svn.r-project.org/R-project-web/branches/DJM/ a version I started to put together using this approach. It isn't hard to edit, but it did place unacceptable requirements on the server. Duncan Murdoch __ R-help

Re: [R] loop

2005-12-29 Thread Duncan Murdoch
like this is to simulate the loop by hand: write down what is in each of the variables, and walk through the loop. I suspect your problem is in initializing count improperly, or in putting the test in the wrong place. Duncan Murdoch as a result qw is [1] 0.9643836 1.000 2.000

Re: [R] How to fit all points into plot?

2005-12-29 Thread Duncan Murdoch
On 12/29/2005 5:33 PM, Sean Davis wrote: On 12/29/05 5:19 PM, Martin Lam [EMAIL PROTECTED] wrote: Hi, I have a problem when I want to add new points (or a new line) to the graph. Some points (or parts of the line) are not shown on the graph because they lie beyond the scale of the axis.

Re: [R] convolution of the double exponential distribution

2005-12-22 Thread Duncan Murdoch
need an incomplete gamma function, such as pgamma. Be careful to get the constant multiplier right. 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] Random numbers

2005-12-21 Thread Duncan Murdoch
got things exactly identical. The Writing R Extensions manual tells how to call the R generators from other programs. You can do it without going through interpreted R code, so there shouldn't be much in the way of a performance penalty. Duncan Murdoch

Re: [R] Status of PostgreSQL using DBI?

2005-12-09 Thread Duncan Murdoch
machines. The Windows ODBC driver is named psqlodbc-08_00_0101.zip, but I notice on Google there's a newer one now. Not sure what you need to install on Linux. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] R is GNU S, not C.... [was how to get or store .....]

2005-12-06 Thread Duncan Murdoch
of statements are rather bizarre and they should be different, but they aren't, and you shouldn't use a style of coding that suggests that they are. Duncan Murdoch Xiaofan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of McGehee, Robert Sent: 06

Re: [R] Broken links on CRAN

2005-12-05 Thread Duncan Murdoch
On 12/5/2005 10:14 AM, Doran, Harold wrote: Sorry, didn't think about that. The mirror I used was http://lib.stat.cmu.edu/R/CRAN/ I checked other mirrors and they did work fine. Which packages did you have trouble with? I just tried a couple, and they were fine. Duncan Murdoch

Re: [R] Broken links on CRAN

2005-12-05 Thread Duncan Murdoch
it to be damaged. I'll let Statlib know about this, but I expect their advice will be Use Firefox. Duncan Murdoch Harold -Original Message- From: Duncan Murdoch [mailto:[EMAIL PROTECTED] Sent: Monday, December 05, 2005 3:00 PM To: Doran, Harold Cc: Peter Dalgaard; r-help

Re: [R] suppress checking chm files in R CMD check on Windows

2005-12-01 Thread Duncan Murdoch
By default, all test sections are turned on. Email bug reports to [EMAIL PROTECTED]. 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] Solving Systems of Non-linear equations

2005-11-30 Thread Duncan Murdoch
*(variance+mean^2-mean)/variance, b = (variance+mean^2-mean)*(mean-1)/variance} from which you can write your own function pretty easily. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Corrupted workspace(?)

2005-11-30 Thread Duncan Murdoch
source code file; if you feel like some hacking, you might be able to write a recovery tool based on that. 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] Where ca I find the hcass2 Fortran code

2005-11-30 Thread Duncan Murdoch
a call to a Fortran program hcass2. This very last I was enable to found it in the sources... Does anyone can tell me where can I find it? Fortran is not case sensitive. This is HCASS2, in src/library/stats/src/hclust.f Duncan Murdoch __ R-help

[R] What made us so popular Nov 16-20?

2005-11-28 Thread Duncan Murdoch
-150K/day during that week. Did we get mentioned somewhere (e.g. Slashdot), or was someone just experimenting with some automated downloading? Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] 'For each file in folder F do....'

2005-11-27 Thread Duncan Murdoch
them in a list. 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] Using an editor with R

2005-11-26 Thread Duncan Murdoch
for a different way to integrate winedit with R. 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] Customizing the package build process

2005-11-23 Thread Duncan Murdoch
environment variables, then runs the command. So something like R CMD ls will run the ls command. On Windows, the search is limited to the R bin directory, which seems more reasonable to me. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https

Re: [R] Howto? plot legend with no line behind the points

2005-11-21 Thread Duncan Murdoch
= 'p'. 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] attributes of a data.frame

2005-11-21 Thread Duncan Murdoch
, varname) - label # to set one 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] attributes of a data.frame

2005-11-21 Thread Duncan Murdoch
On 11/21/2005 2:51 PM, Adrian DUSA wrote: On Monday 21 November 2005 22:41, Duncan Murdoch wrote: [...snip...] Not all dataframes have the variable.labels attribute. I'm guessing you've installed some contributed package to add them, or are importing an SPSS datafile using read.spss. So

Re: [R] use of the 'by' command converting SPSS ANOVA/GLM syntax into R syntax

2005-11-20 Thread Duncan Murdoch
help you with this one. Duncan Murdoch Any assistance with either of these enquiries is most appreciated. Bob __ 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] SWeave - can I see output in the source?

2005-11-19 Thread Duncan Murdoch
On 11/19/2005 6:13 AM, [EMAIL PROTECTED] wrote: On Fri, 18 Nov 2005 13:49:36 -0500, Duncan Murdoch (DM) wrote: I'm working on a Latex document with lots of R code in it, so naturally enough it would be a good idea to use SWeave. But then I don't get to see the output as I'm

Re: [R] help with apply, please

2005-11-19 Thread Duncan Murdoch
be guaranteed to find the global min. (By the way, I'm not sure if we have a function that can do this: i.e., given a partial ordering on the rows, sort the matrix so that the resulting order is consistent with it.) Duncan Murdoch ### possibles - NULL length.possibles

Re: [R] How to run R in batch mode

2005-11-18 Thread Duncan Murdoch
it. Please, please, please: if you need help with an error, show us the exact error message and tell us the context where you received it. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] How to run R in batch mode

2005-11-18 Thread Duncan Murdoch
. There is a way to do this from within R: run system(R CMD BATCH test.R,intern=TRUE) This still depends on your path being set correctly to find R. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] SWeave - can I see output in the source?

2005-11-18 Thread Duncan Murdoch
that is not used for producing the output .tex file, but which is updated each time I process the file)? 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] Difficulties with for() {while(){}}

2005-11-17 Thread Duncan Murdoch
-error)) break } Duncan Murdoch How I can make this? Abort the while, abort the for and run the function again? Thanks Ronaldo __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Warning message: package '...' was built under R version 2.3.0

2005-11-17 Thread Duncan Murdoch
is. 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] changing the value of a variable from inside a function

2005-11-17 Thread Duncan Murdoch
# blah can call itself; each invocation will see the same test test[i,] - expr # use super-assignment to modify it } return(test) } This makes one copy of the matrix and works on that. If you want to make zero copies, you need to get tricky. Duncan Murdoch Certainly, I

Re: [R] changing the value of a variable from inside a function

2005-11-17 Thread Duncan Murdoch
On 11/17/2005 9:39 AM, Duncan Murdoch wrote: On 11/15/2005 12:22 PM, Michael Wolosin wrote: All - I am trying to write R code to implement a recursive algorithm. I've solved the problem in a klunky way that works, but uses more memory and computing time than it should. A more elegant

Re: [R] a weighted average by group

2005-11-17 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] poker package -- comments?

2005-11-14 Thread Duncan Murdoch
On 11/14/2005 7:39 AM, Dan Bolser wrote: Duncan Murdoch wrote: Over the weekend I wrote a small package to evaluate poker hands and to do some small simulations with them. If anyone is interested in looking at it, I'd appreciate comments and/or contributions. How do I install

[R] poker package -- comments?

2005-11-13 Thread Duncan Murdoch
select.hand(players = list(card(Ah As), NULL, NULL)) Showing: AD 4H 7D 2C 8S Rank Name Cards Value 11 Self 6H 5HStraight 221 AH AS 3 of a kind 332 AC 3C Pair of As 443 9D 6D A high Would win 4 person game Required 7 hands. Duncan Murdoch

Re: [R] no package 'Matrix' at the repositories

2005-11-11 Thread Duncan Murdoch
such a thing, and I've added it to my debugging web page here: http://www.stats.uwo.ca/faculty/murdoch/software/debuggingR/#tryCatch Duncan Murdoch Andy From: Sean Davis On 11/11/05 8:38 AM, Spencer Graves [EMAIL PROTECTED] wrote: Yesterday, I installed R2.2.0 for Windows [Version 2.2.0

Re: [R] precision of double in R

2005-11-11 Thread Duncan Murdoch
to calculate these things. Or some other solution? Use logs. log(0.02^250) is easy to calculate as 250*log(0.02). There's also an lchoose() function; it gives lchoose( 1000, 500) [1] 689.4673 without complaining. Duncan Murdoch __ R-help

Re: [R] How to find statistics like that.

2005-11-10 Thread Duncan Murdoch
a p-value is not a statistic? Duncan Murdoch Regards, Adai On Wed, 2005-11-09 at 17:09 -0600, Mike Miller wrote: On Wed, 9 Nov 2005, Gao Fay wrote: Hi there, Suppose mu is constant, and error is normally distributed with mean 0 and fixed variance s. I need to find a statistics

Re: [R] How to find statistics like that.

2005-11-10 Thread Duncan Murdoch
of them. Duncan Murdoch On Thu, 2005-11-10 at 06:05 -0500, Duncan Murdoch wrote: On 11/9/2005 10:01 PM, Adaikalavan Ramasamy wrote: I think an alternative is to use a p-value from F distribution. Even tough it is not a statistics, it is much easier to explain and popular than 1/F. Better

Re: [R] How to find statistics like that.

2005-11-10 Thread Duncan Murdoch
, but its p-value is not uniformly distributed when mu is -1, even though the null is true. 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] read.table error with R 2.2.0

2005-11-09 Thread Duncan Murdoch
are likely to see where those functions came from. (I see getAnywhere(read.table)$where [1] package:base namespace:base getAnywhere(read.table.default)$where character(0) indicating that read.table comes from the base package, and read.table.default doesn't exist. Duncan Murdoch

Re: [R] Element-by-element multiplication operator?

2005-11-09 Thread Duncan Murdoch
matrix multiplication, you'd use %*%. 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] Order of terms in a model specification...

2005-11-09 Thread Duncan Murdoch
due to rounding in other situations, and they might be noticeable in the case of near-collinearity. 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] [Rd] bug in windows GUI/script editor (PR#8288)

2005-11-09 Thread Duncan Murdoch
for the inconvenience. Thanks, I can reproduce this. I'll track it down. Duncan Murdoch Cheers, Duncan version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major2

Re: [R] setting labels on axis

2005-11-08 Thread Duncan Murdoch
. If you want the axes to run from 0 to 100, then you call it as image.plot(x=(0:10)*10, y=(0:10)*10, z=a) 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] Quickest way to match two vectors besides %in%?

2005-11-08 Thread Duncan Murdoch
]) Z[changes,5] - Z[changes,2] but you are almost certainly better off (from a maintenance point of view) to use the names of the columns, rather than guessing at column numbers. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https

Re: [R] R seems to stall after several hours on a long series of analyses... where to start?

2005-11-07 Thread Duncan Murdoch
with debugging info will make the results a lot easier to interpret. 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] how to export density_function output?

2005-11-07 Thread Duncan Murdoch
from other objects). 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] Modifying Internal C Files

2005-11-07 Thread Duncan Murdoch
in the package DLL rather than R.dll to find it. Just make sure that the name in the .C call matches the declared name in the source. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] frequency() source code

2005-11-07 Thread Duncan Murdoch
to look at the other functions in that file anyway). Now if someone were running from a binary install in Windows, they wouldn't have a full copy of the source directories; they need to download that separately from the binary builds. Duncan Murdoch

Re: [R] How can I assign an argument to transfer whether by ref or by value?

2005-11-05 Thread Duncan Murdoch
Xiaofan Li wrote: Hello guys, I am wondering the default way of transferring arguments in R. Is it by value or by ref in default case, or could that be changed explicitly? R passes by value. It's worth reading the language definition manual to find out about the subtleties (e.g. lazy

Re: [R] question about precision, floor, and powers of two.

2005-11-04 Thread Duncan Murdoch
with the inaccurate answer have had some DLL or video driver set their precision to 53 bits instead of the default 64. Maybe we need to be even more defensive against such changes. Duncan Murdoch ) log2(2^2); floor(log2(2^2)) [1] 2 [1] 2 log2(2^3); floor(log2(2^3)) [1] 3 [1] 2

Re: [R] readline() and Rterm in Windows

2005-11-03 Thread Duncan Murdoch
you'd run it using the style of your batch file down below, but without changing the paths. Duncan Murdoch conout - file('CONOUT$','w') Error in file(CONOUT$, w) : unable to open connection In addition: Warning message: cannot open file 'CONOUT$', reason 'Permission denied' so I

Re: [R] Potential for R to conflict with other softwares

2005-11-03 Thread Duncan Murdoch
of another software? No, not really. Maybe users will become addicted to it? ;-) Duncan Murdoch *** Mat Soukup, Ph.D. Food and Drug Administration 10903 New Hampshire Ave. BLDG 22 RM 5329 Silver Spring, MD 20993-0002

Re: [R] Potential for R to conflict with other softwares

2005-11-03 Thread Duncan Murdoch
On 11/3/2005 10:46 AM, Peter Dalgaard wrote: Duncan Murdoch [EMAIL PROTECTED] writes: On 11/3/2005 9:11 AM, Soukup, Mat wrote: Hi. After some time, my collegues at the Food and Drug Adminstration have finally acknowledged R as a powerful statistical computing environment. However

Re: [R] fatal error unused tempdir

2005-11-03 Thread Duncan Murdoch
to track down what is producing files and not getting rid of them. What you need to do is to find the directory containing all these temporary files (print tempdir() on one of your successful attempts), and delete all the old ones. Duncan Murdoch __ R

Re: [R] readline() and Rterm in Windows

2005-11-02 Thread Duncan Murdoch
() in Rterm, it should do what you want. 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] [Rd] unvectorized option for outer()

2005-11-02 Thread Duncan Murdoch
I've now added a version of Vectorize to R-devel. Duncan __ 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] readline() and Rterm in Windows

2005-11-02 Thread Duncan Murdoch
('Please enter an ID:', file=conout) flush(conout) id - readLines(conin, 1) print(id) 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] Unexpected result from binary greater than operator

2005-11-01 Thread Duncan Murdoch
information, see e.g. David Goldberg (1991), “What Every Computer Scientist Should Know About Floating-Point Arithmetic”, ACM Computing Surveys, 23/1, 5–48, also available via http://docs.sun.com/source/806-3568/ncg_goldberg.html Duncan Murdoch __ R

Re: [R] Import help (neophyte)

2005-10-31 Thread Duncan Murdoch
it. Alternatively, just use a forward slash: read.table(F:/GEORGIA/species_richness/SR_use.csv, sep=,, header = TRUE, row.names = 1) Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Sum of logical vector

2005-10-31 Thread Duncan Murdoch
be able to sum a logical vector, because it will be coerced to numeric when needed. The crashes are being caused by something else. Get your users to tell you exact error messages and you should be able to diagnose it. Duncan Murdoch __ R-help

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