Re: [R] Binaries of R.12.0 for Windows: where are RGUI and Rterm ?

2010-10-16 Thread Duncan Murdoch
went wrong with that build. I've taken it offline locally, and eventually that will be mirrored to CRAN. I'm not sure if I can repair it today, but it should be fixed in a couple of days. Duncan Murdoch On Sat, 16 Oct 2010, Renaud Lancelot wrote: Dear all, I've just downloaded R.12.0 from

Re: [R] A subject related question

2010-10-16 Thread Duncan Murdoch
it depends on your definitions, but the following gives a bivariate normal with a singular covariance matrix: X1 ~ N(0,1) Y1 = X1 Then the pair (X1, Y1) is bivariate normal and singular. It has no density with respect to Lebesgue measure on R^2. Duncan Murdoch

Re: [R] Vector multiplication

2010-10-17 Thread Duncan Murdoch
are more useful without as.vector()). 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] R 2.12.0 - malware detect by antivirus software

2010-10-17 Thread Duncan Murdoch
may want to help out Avira by pointing out their error, but I won't. Duncan Murdoch Best wishes, Uwe Ligges On 17.10.2010 20:18, Paulo Barata wrote: Dear R-list members, I have just downloaded R 2.12.0 for Windows. When installing, my antivirus software detected some malware during

Re: [R] R 2.12.0 - malware detect by antivirus software

2010-10-17 Thread Duncan Murdoch
a stronger warranty, you could try looking at commercial software (or commercial builds of R), but I doubt you'll get one that's worth very much. Duncan Murdoch Best regards, Paulo Barata On 17/10/2010 17:10, Duncan Murdoch

Re: [R] help - RE: Download.file problem

2010-10-18 Thread Duncan Murdoch
quits. If you want to help, you could look through the internal code to figure out why the file isn't being closed, and submit a patch. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] help - RE: Download.file problem

2010-10-18 Thread Duncan Murdoch
On 18/10/2010 9:32 PM, Duncan Murdoch wrote: On 18/10/2010 8:34 PM, Santosh Srinivas wrote: Dear R-helpers ... any thoughts on the below issue ... will help me complete a small project! Strange problem with download.file . for non existent URL an empty file is created but I am not able

Re: [R] R 2.12.0 - malware detect by antivirus software

2010-10-19 Thread Duncan Murdoch
Paulo Barata wrote: Dr. Murdoch and Dr. Ligges, After my contacts with Avira, it seems that the issue caused by their antivirus software (a false positive alarm) has been solved. Now I have been able to install R 2.12.0 flawlessly. Thanks for following up on this. Duncan Murdoch Thank

Re: [R] head.matrix() unintelligent

2010-10-19 Thread Duncan Murdoch
cumbersome. Is there a simple way of viewing both the columnwise and rowwise heads of a matrix? i - 1:5 M[i,i] 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] DLL not found

2010-10-19 Thread Duncan Murdoch
you? If it contains anything other than your R home library, do you have a copy of lattice installed there? Duncan Murdoch Problem: require(sp) Loading required package: sp Error in library.dynam(lib, package, package.lib) : DLL 'lattice' not found: maybe not installed

Re: [R] ascii or regex code for alt-enter for Excel

2010-10-20 Thread Duncan Murdoch
, not /n, in R.) Duncan Murdoch Anybody know what character or ASCII code to use for this? Thanks, Mark Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry Indiana University School of Medicine 15032 Hunter Court, Westfield, IN 46074 (317) 490-5129 Work, Mobile VoiceMail (317) 399

Re: [R] rounding up (always)

2010-10-20 Thread Duncan Murdoch
one out there that matches them. 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] 3D-scatterplots - high quality rendering?

2010-10-21 Thread Duncan Murdoch
may find the bitmap output is better. In particular, shading is not always done correctly. Duncan Murdoch 2) if the answer is no, what would be the best package to produce good quality point-of-view customisable 3D scatter plots? I guess I cal always use 'rgl' to explore the data

Re: [R] 3D-scatterplots - high quality rendering?

2010-10-21 Thread Duncan Murdoch
just a 360-degree rotation. Is there a package geared towards that, or do I just simply create a collection of images that I animate elsewhere? See ?movie3d in rgl for doing the latter. Duncan Murdoch Thank you for your help! Jose __ R-help@r

Re: [R] 3D-scatterplots - high quality rendering?

2010-10-21 Thread Duncan Murdoch
in the RGL device as a high quality graphic? You can use rgl.postscript for various other formats, but you may find the bitmap output is better. In particular, shading is not always done correctly. Duncan Murdoch Hi Duncan, thanks for that. Stupidly I hadn't realised only part

Re: [R] trouble with \textless in Hmisc latex() on a drop1 object

2010-10-21 Thread Duncan Murdoch
charles.dup...@vanderbilt.edu, who is cc'd). Or, if you don't know how to do that, just write to the maintainer. Your example should be sufficient for him to find and fix it. But then you'll have to wait until he has time... Duncan Murdoch Running R 2.11.1, LaTeX on WinXP, via Sweave

Re: [R] If Statement with more than one condition

2010-10-22 Thread Duncan Murdoch
the result. Duncan Murdoch Cheers, Josh On Fri, Oct 22, 2010 at 12:51 AM, Santosh Srinivas santosh.srini...@gmail.com wrote: I'm unable to find the OR operator like other language .. any suggestions? I want to do If (condition1 OR condition 2){ do something } Thanks for answering

Re: [R] Unable to allocate arrays of size 2GB in 64 bit Windows 7 R

2010-10-25 Thread Duncan Murdoch
the total size of allocation can be much bigger than 2 GB, but the number of entries can't. 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] R-Fortran question (multiple subroutines)

2010-10-25 Thread Duncan Murdoch
the problem, please post a real example (simplified if possible, but not as much as the one above). Duncan Murdoch thanks, Remko - Remko Duursma Research Lecturer Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus

Re: [R] problem with setRepositories

2010-10-25 Thread Duncan Murdoch
(repos) give? 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] How to simulate from an estimated density

2010-10-25 Thread Duncan Murdoch
wangguojie2006 wrote: Thanks. I got it. Another question, why every time I posted something, it needs approval before it shows up? Any way I can speed up posting? Don't post from gmail.com. Duncan Murdoch (posting from gmail.com ...) __ R-help@r

Re: [R] stripping #s in a text file prior to reading into table or dataframe

2010-10-26 Thread Duncan Murdoch
On 26/10/2010 10:33 AM, Donald Braman wrote: I'm importing a lot of text tables of data (from Latent Gold) that includes hashes in some of the column names (Cluster#1, Cluster#2, etc.). Is there an easy way to strip the offending hashes out before pushing the text into a table or data frame? I

Re: [R] Zoom in in a plot

2010-10-26 Thread Duncan Murdoch
according to mouse movements. It works reasonably well in Windows or the device in the cairoDevice package, and is sometimes acceptable in X11. Other devices don't have the necessary support for it. Duncan Murdoch __ R-help@r-project.org mailing list

Re: [R] Which version control system to learn for managing R projects?

2010-10-26 Thread Duncan Murdoch
for a reason could be if it will make it easier for me to later work with R-forge or CRAN or any other platform for R code distribution. R mainly uses svn so that might be an advantage. On the other hand, git is newer and has some nice features. Duncan Murdoch

Re: [R] About the recursion in R

2010-10-26 Thread Duncan Murdoch
The statement a = a + 1 creates a new local variable named a, it doesn't modify the existing global one. To do that you need to use a - a + 1 Duncan Murdoch else{ } } -- I find that if the code '*f_recursion*(b)' in row B is invoked, that means

Re: [R] return NA instead zero when summing over an empty range?

2010-10-27 Thread Duncan Murdoch
colMeans(M, na.rm=TRUE)*colSums(!is.na(M)) # shows NAs Warning: I found a bug in this version. If there are zero rows in M, the dimension of the matrix gets lost in !is.na(M) and colSums will throw an error. Duncan Murdoch __ R-help@r-project.org

Re: [R] Best IDE for R

2010-10-27 Thread Duncan Murdoch
integration into R and unable to do debugging. Are you on Windows only, or other platforms too/instead? Two cross-platform GUIs to try are StatET in Eclipse and ESS in some version of Emacs. I don't use either, I just use an external text editor and Rgui, so I can't give a recommendation. Duncan

Re: [R] Increase R precision

2010-10-27 Thread Duncan Murdoch
for this operation returns 0.5830 With options(digits=20) R will print 0.5834 which looks to me to be slightly more accurate than the OO value. But the internal value is unaffected by the options(digits) setting, it only affects printing. Duncan Murdoch I I would

Re: [R] stripping #s in a text file prior to reading into table or dataframe

2010-10-27 Thread Duncan Murdoch
than column names Any other thoughts? You should post a few lines of your file, or a similarly structured one that leads to the same error if the data is confidential. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Install Error

2010-10-28 Thread Duncan Murdoch
package lives, try install.packages(MyPackage.tar.gz, repos=NULL, type=source) If that fails, then traceback() will tell you where the failure happened. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] R version 2-12.0 - running as 32 or as 64 bit?

2010-10-29 Thread Duncan Murdoch
it, then it probably thinks your machine can't run 64 bits. Any ideas why it might think that? Can you give details about what Windows says about itself in Help | About Windows (accessible from Explorer)? Duncan Murdoch __ R-help@r-project.org mailing list https

Re: [R] Memory use in R

2010-10-29 Thread Duncan Murdoch
the physical memory to whatever address it likes, and you'll have lots of big open ranges. On the other hand, with bigger pointers everything takes a bit more space, so you might run out sooner. Duncan Murdoch Best wishes David Max __ R-help@r

Re: [R] how to debug (mtrace) a function defined inside a function?

2010-10-29 Thread Duncan Murdoch
a breakpoint by line number, and presumably you could set the action to whatever will trigger mtrace. It will modify the source of mymodel so that every time it creates a new build(), it creates it with a breakpoint within. See ?setBreakpoint and ?trace. Duncan Murdoch

Re: [R] return value for grep

2010-10-31 Thread Duncan Murdoch
(which returns a vector of indices or matches). 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

Re: [R] transfer string to expression

2010-10-31 Thread Duncan Murdoch
-function(x){eval(parse(text=x), envir=parent.frame() )} Duncan Murdoch best regards Elong [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] complicated graphic -- persp+map

2010-10-31 Thread Duncan Murdoch
there.) 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] transfer string to expression

2010-10-31 Thread Duncan Murdoch
pass parent.frame() as an argument, it will be one level up: it's the parent of the function that calls eval. If you leave it at the default, it's the parent of eval, i.e. the function that calls it. Duncan Murdoch __ R-help@r-project.org mailing

Re: [R] File Downloading Problem

2010-11-01 Thread Duncan Murdoch
the download.file() call. You can make Internet2 the default by putting --internet2 on the command line when you start R. 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] File Downloading Problem

2010-11-01 Thread Duncan Murdoch
anything. Duncan Murdoch -Original Message- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: 01 November 2010 19:04 To: Santosh Srinivas Cc: 'Rhelp' Subject: Re: [R] File Downloading Problem On 01/11/2010 9:22 AM, Santosh Srinivas wrote: Dear Group, My code stopped working

Re: [R] 32-bit packages on 64-bit Windows

2010-11-01 Thread Duncan Murdoch
with a new version. 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] Function not working

2010-11-01 Thread Duncan Murdoch
. Generally functions that have such global side effects are a bad idea, but if you are sure you want to do it, use n - ..., mat - ..., etc. The - superassignment operator makes the assignment in a parent or global environment. Duncan Murdoch Thanks for your keen eyes Thomas

Re: [R] R script on linux?

2010-11-02 Thread Duncan Murdoch
should be in. Is there any converter for this situation- is it possible convert the R code in linux format or can you advice me a reference for overcoming this problem.. What is the problem? Duncan Murdoch __ R-help@r-project.org mailing list https

Re: [R] Line numbers in Sweave

2010-11-02 Thread Duncan Murdoch
be reported referencing their original location in the source file. Do we have any options to turn off this reporting? Thanks! Sure: just don't include any syntax errors. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] rgl.snapshot() : no longer works?

2010-11-02 Thread Duncan Murdoch
currently working with Uwe to fix this. Duncan Murdoch thanks, Remko sessionInfo() R version 2.12.0 (2010-10-15) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252 [3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C [5] LC_TIME

Re: [R] save() with 64 bit and 32 bit R

2010-11-03 Thread Duncan Murdoch
version of R (or a newer one), and may need to have the same packages installed in order to read 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-project.org

Re: [R] Line numbers in Sweave

2010-11-03 Thread Duncan Murdoch
at (or perhaps the highlight package), which performs just like the R terminal (keep the comments and report the errors without really stopping R, [3]). The error in [3] is a run-time error, not a syntax error. It should be unaffected by the line numbers. Duncan Murdoch Thanks! [1] https

Re: [R] programming questions

2010-11-03 Thread Duncan Murdoch
that is exists(). 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] Rd installation (not markup language) primer?

2010-11-03 Thread Duncan Murdoch
files for R, or does R parse the Rd files on demand? so, is there a primer on installing Rd files? Writing R Extensions is the main documentation. You put them in the man directory of a package, and R does the rest when you install the package. Duncan Murdoch /iaw Ivo Welch (ivo.we

Re: [R] removing indexing

2010-11-04 Thread Duncan Murdoch
.) If you really want the fancy spacing, something like cat(format(aVector), \n) 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] Sweave: option keep.source=TRUE and package cacheSweave

2010-11-07 Thread Duncan Murdoch
of this, and I think he's working on it. Duncan Murdoch \documentclass[12pt]{article} \usepackage[nogin]{Sweave} % Sweave options \SweaveOpts{keep.source=TRUE, strip.white=TRUE, eps=FALSE, pdf=TRUE} \begin{document} Blabla. optionsR, results=hide= setCacheDir(./cache) library(MASS

Re: [R] Rdindex truncating titles?

2010-11-07 Thread Duncan Murdoch
this way in the past --- and that in fact the ``old'' INDEX was built using the Rdindex() function. I think you need to give us the source to look at to see what's going on. Duncan Murdoch cheers, Rolf Turner P. S.: sessionInfo() R version 2.12.0 (2010-10-15) Platform

Re: [R] Rdindex truncating titles?

2010-11-07 Thread Duncan Murdoch
On 07/11/2010 6:55 PM, Rolf Turner wrote: On 8/11/2010, at 12:39 PM, Duncan Murdoch wrote: SNIP I think you need to give us the source to look at to see what's going on. Duncan Murdoch The same phenomenon can be observed for my Iso package which is available from CRAN. The diff

Re: [R] Extending the accuracy of exp(1) in R

2010-11-09 Thread Duncan Murdoch
probably want to re-think the computation you're doing to figure out how to do it with 15 digit arithmetic. Have you looked at the expm1() and related functions? Duncan Murdoch Can anyone help me out? Thanks. Shant [[alternative HTML version deleted

Re: [R] arrays of arrays

2010-11-10 Thread Duncan Murdoch
). Duncan Murdoch You can query vector length with double brackets... e.g. length( x[[2]] ) gives 3 Hope this helps, Michael On 10 November 2010 16:00,sachinthaka.abeyward...@allianz.com.au wrote: Hi Erik, Thanks for replying. Only problem with that is that each row has 5 elements (or 5

Re: [R] Decimal places in a function output

2010-11-10 Thread Duncan Murdoch
) . . . (SOME CALCULATIONS) . . . return(sprintf(%.5f,d[i-1])) } d is a vector with the numbers I need, specially the last one. how can I get the resulting number of the function with a certain amount of decimal places? What is wrong with the result from sprintf()? Duncan Murdoch

Re: [R] error on R CMD rtags

2010-11-10 Thread Duncan Murdoch
escapes, i.e. the shell takes \\ to mean \, so R sees \.[RrSs]$, which contains the unrecognized escape \. Duncan Murdoch Liviu sessionInfo() R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC_COLLATE

Re: [R] Installing Packages

2010-11-10 Thread Duncan Murdoch
in the package install command. Any help would be really appreciated. If you're on Windows: Start R with the --internet2 option, or run setInternet2() from within your R session. Then R will use whatever proxy you have configured into Internet Explorer. Duncan Murdoch Thanks Sue Susan Caskey

Re: [R] can't get/find or install R.dll?

2010-11-10 Thread Duncan Murdoch
R.dll within %s % R_HOME) RuntimeError: Unable to locate R.dll within C:\PROGRA~1\R\R-212~1.0 Sure 'nuff when I go the the R/R-212~1.0 directory there are no dll's It sounds as though Rpy needs to be updated. The R.dll will be installed in the bin/i386 subdirectory. Duncan Murdoch The GUI

Re: [R] can't get/find or install R.dll?

2010-11-11 Thread Duncan Murdoch
updated for R 2.12.0. You should contact the maintainer to see if there's a newer one. Duncan Murdoch On Nov 10, 6:51 pm, Duncan Murdochmurdoch.dun...@gmail.com wrote: On 10/11/2010 5:50 PM, dartdog wrote: Just installed a 1st time use of R on a win vista 64 box (4gigram) but asked for the 32

Re: [R] r-2.12.0 - Hmisc

2010-11-11 Thread Duncan Murdoch
() to find where. 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] Rdindex truncating titles?

2010-11-11 Thread Duncan Murdoch
On 07/11/2010 9:17 PM, Rolf Turner wrote: On 8/11/2010, at 1:24 PM, Duncan Murdoch wrote: SNIP ... The docs do say to limit the length of titles to 65 characters if possible; this is one place where it matters. SNIP The 65 character limit had not previously impinged

Re: [R] Troubleshooting sweave

2010-11-11 Thread Duncan Murdoch
multiple) Sweave inputs into .pdf or .dvi files. E.g. SweavePDF(Example.Rnw) Duncan Murdoch Thanks, Sachin p.s. sorry about the corporate notice. example-1.Rnw: from http://www.statistik.lmu.de/~leisch/Sweave/ \documentclass[a4paper]{article} \title{Sweave Example 1} \author{Friedrich Leisch

Re: [R] Troubleshooting sweave

2010-11-12 Thread Duncan Murdoch
use. The fact that texi2dvi is in tools means that it serves the purposes R needs, but might not serve every user: but if it does serve your purpose, feel free to use it.) Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Deploying code as exe

2010-11-12 Thread Duncan Murdoch
, and then you might as well send them scripts written in R, rather than writing a whole new front end. 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] User input after opening graphing device

2010-11-12 Thread Duncan Murdoch
, No = 2):). Sure it does, and then you type dummy - 1, and that satisfies it. Cutting and pasting is all interpreted as typing. (How else could it work???) If you want the interactivity, you can use source(clipboard). Duncan Murdoch __ R-help@r

Re: [R] How to set an argument such that a function treats it as missing?

2010-11-13 Thread Duncan Murdoch
both messages printed: g() [1] g: missing x [1] f: missing x Duncan Murdoch } f(x) # ... this call to f behaves like f() } g() # should print f: missing x (is this possible?) __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] how to store a vector of vectors

2010-11-13 Thread Duncan Murdoch
[1,] will give a plain vector that should be the same shape as x - c(1,2,3). 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] Sweave question

2010-11-14 Thread Duncan Murdoch
output from within R without the need to make external calls. See SweavePDF() in the patchDVI package on R-forge. Duncan Murdoch Ralf On Sat, Nov 13, 2010 at 4:29 PM, Johannes Huesingjohan...@huesing.name wrote: Ralf Bralf.bie...@gmail.com [Sat, Nov 13, 2010 at 10:03:49PM CET]: It seems

Re: [R] How to permanently remove [Previously saved workspace restored]

2010-11-14 Thread Duncan Murdoch
. Make sure this is *not* checked. If you're sane, you'll then click on the button Apply to all folders, but you might just want to click on OK to try it out on one folder first. Duncan Murdoch You can adjust this behavior in the folder options (if the idea of protected/hidden files

Re: [R] Sweave question

2010-11-15 Thread Duncan Murdoch
On 15/11/2010 6:22 AM, Dieter Menne wrote: Duncan Murdoch-2 wrote: See SweavePDF() in the patchDVI package on R-forge. In case googling patchDVI only show a few Japanese Pages, and search for patchDVI in R-Forge gives nothing: try https://r-forge.r-project.org/projects/sweavesearch

Re: [R] How to move an internal function to external keeping same environment?

2010-11-15 Thread Duncan Murdoch
define foo3 that also uses and modifies foo2. It's very easy for foo1 and foo3 to clash with conflicting use of the global foo2. Don't use globals unless you really have to. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Surprising behavior using seq()

2010-11-15 Thread Duncan Murdoch
, or most other numbers.) Duncan Murdoch Is there a convenient way to test set membership using all.equal()? In particular, can you do it (conveniently) when the lengths of the numeric lists are different? Thanks again for your reply! Vadim On Nov 13, 2010, at 5:46 AM, Patrick Burns wrote

Re: [R] Sweave question

2010-11-15 Thread Duncan Murdoch
to a previewer,and it will set up forward and reverse searching from the previewer. Duncan Murdoch Thanks again, Ralf On Mon, Nov 15, 2010 at 6:42 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 15/11/2010 6:22 AM, Dieter Menne wrote: Duncan Murdoch-2 wrote: See SweavePDF

Re: [R] Defining functions inside loops

2010-11-15 Thread Duncan Murdoch
that print properly. Duncan Murdoch Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Eduardo de Oliveira Horta Sent: Monday, November 15, 2010 12:50 PM To: r-help@r-project.org

Re: [R] Debugging segfault in foreach

2010-11-16 Thread Duncan Murdoch
for that.) Duncan Murdoch Segfault dump == result of evaluating expression: *** caught segfault *** address 0x30, cause 'memory not mapped' Traceback: 1: format(x[[i]], ..., justify = justify) 2: format.data.frame(x, digits = digits, na.encode = FALSE) 3: as.matrix

Re: [R] Problem with plotting diagnostics - Error in object$coefficients : $ operator is invalid for atomic vectors

2010-11-17 Thread Duncan Murdoch
, and the sessionInfo() to go with it, to help with this. 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] Drop non-integers

2010-11-17 Thread Duncan Murdoch
it to index: dat[!noninteger,] 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] rgl, multiple graphics ??

2010-11-18 Thread Duncan Murdoch
On 18/11/2010 5:55 AM, skan wrote: Hello I just get one plot How can I concoct several rgl plots? It's basically up to you to handle everything. demo(stereo) shows you one way. Duncan Murdoch __ R-help@r-project.org mailing list https

Re: [R] Updata Rdata File

2010-11-18 Thread Duncan Murdoch
On 18/11/2010 1:49 AM, Jason Kwok wrote: How do I add data to a .rdata file? In my case, I have a time series that needs to get updated every day. Load it, update the variables, save them. Duncan Murdoch __ R-help@r-project.org mailing list https

Re: [R] Looking up the directory a file is located in

2010-11-18 Thread Duncan Murdoch
to change directories and not restore the old one, but that's a matter of taste. I think the other solutions you were offered are better than this one. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] how exactly does 'identify' work?

2010-11-18 Thread Duncan Murdoch
- rnorm(100, mean=10, sd=2) qqnorm(x) repeat { pt - locator(1) if (!length(pt$x)) break text(pt, labels=which.min( abs(x - pt$y) ) ) } Duncan Murdoch 2 - i have tried using the stdres function in the MASS library, to extract the standardised residuals and plot them manully, ( using the plot

Re: [R] Option to Print with numbers formatted

2010-11-19 Thread Duncan Murdoch
and format.data.frame functions with new ones, but that's probably not advisable. 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] a rounding option for \Sexpr{}?

2010-11-19 Thread Duncan Murdoch
the current behaviour, but that change could break a lot of existing documents. Since you can easily wrap your Sexpr arguments in a call to whatever formatting function you want, why force all of those users to change their documents? Duncan Murdoch Regards, Yihui -- Yihui Xiexieyi...@gmail.com

Re: [R] Function call on every prompt

2010-11-19 Thread Duncan Murdoch
CST Fri Nov 19 09:30:53 2010 CST Fri Nov 19 09:30:53 2010 CST That one doesn't get updated with every prompt. 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] a rounding option for \Sexpr{}?

2010-11-19 Thread Duncan Murdoch
On 19/11/2010 10:38 AM, Dieter Menne wrote: Duncan Murdoch-2 wrote: On 19/11/2010 10:12 AM, Yihui Xie wrote: Maybe this should go to R-devel as a wishlist: val- format(eval(parse(text=cmd), envir=.GlobalEnv)) I don't like the current behaviour, but that change could break

Re: [R] simple loop problemo (Geo brownian motion)

2010-11-19 Thread Duncan Murdoch
by using cumsum() and vectorized calculations; then it will be reasonably fast. Another way to do this is to create the plot before the loop, then use lines() to add lines to it within the loop. Then you need to guess the scale ahead of time, or do a little experimentation. Duncan Murdoch

Re: [R] Setting a Red-Yellow-Green Color Transition in Image(...) with yellow corresponding with the Mean Value...

2010-11-20 Thread Duncan Murdoch
complicated involving colorRamp. It returns a function mapping the numbers 0 to 1 into the colours you specify; you'll need to write your own function that maps (min, mean, max) to (0, 0.5, 1) in some way. Duncan Murdoch I was able to figure something like out when using filled.contour

Re: [R] unexpected numeric constant while reading tab delimited csv file

2010-11-22 Thread Duncan Murdoch
said you typed. 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] Plotting a cloud/fog of variable density in rgl

2010-11-22 Thread Duncan Murdoch
really be easy to do them in rgl. I think you can come closest to what you want within rgl by using sprites rather than rendering transparent spheres. See examples(sprites3d). Duncan Murdoch I though about doing it this way: 1- interpolate to a fine grid 2- plot points at each grid

Re: [R] Possible to pretty-printing using str()?

2010-11-23 Thread Duncan Murdoch
by paste( capture.output(str(x)), collapse= ) Duncan Murdoch Thx, Janko ## SYSTEM INFO ## Windows XP SP3 R 2.12.0 (patched as of 2010-11-22) Eclipse 3.6.1 (Helios) StatET 0.9.x ### -Ursprüngliche Nachricht- Von: r-help-boun...@r

Re: [R] how to update my own function

2010-11-23 Thread Duncan Murdoch
an object with call component Change the result line to result- list(x=x, w=w, call=sys.call()) and the default update method should do what you want. If it doesn't, you can write an update.ego method to do something differently. Duncan Murdoch

Re: [R] Help in improving the style of R plots

2010-11-25 Thread Duncan Murdoch
are misunderstanding what's going on. R deletes temporary files when it closes, but you wouldn't normally create a plot in a temporary file. Duncan Murdoch Can you help me in getting what I wish? Any help is greatly appreciated. Thanks a lot Gaetano __ R

Re: [R] \Sweaveopts error

2010-11-25 Thread Duncan Murdoch
see what's going wrong. Duncan Murdoch \SweaveOpts{engine=R, keep.source=TRUE} \SweaveOpts{eps=FALSE, prefix.string=snArt/4lmetc} The attempt to process the file through Sweave generates the error: Sweave(4lmetc) Writing to file 4lmetc.tex Processing code chunks ... 1 : keep.source term

Re: [R] Go (back) from Rd to roxygen

2010-11-25 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] 3D-surface colour based on the values of X or Y data points

2010-11-26 Thread Duncan Murdoch
On 26/11/2010 5:21 AM, suresh wrote: Dear R-experts, Using persp3d(), I plotted a 3d surface. I would like to colour this surface based on the result values (dependent variable) grouped in, say, three to five different ranges. Later, I would also like to paint the same surface based on the

Re: [R] \Sweaveopts error

2010-11-27 Thread Duncan Murdoch
/ Thanks, I'll take a look. Duncan Murdoch Sweave(test1) ## includes SweaveOpts settings Sweave(test2, keep.source=TRUE) ## SweaveOpts settings have been removed. Comments do not appear in the LaTeX file that results, the code is reformatted and the graph from

Re: [R] \Sweaveopts error

2010-11-27 Thread Duncan Murdoch
one yet... Duncan Murdoch Sweave(test1) ## includes SweaveOpts settings Sweave(test2, keep.source=TRUE) ## SweaveOpts settings have been removed. Comments do not appear in the LaTeX file that results, the code is reformatted and the graph from test1 goes

Re: [R] \Sweaveopts error

2010-11-28 Thread Duncan Murdoch
it mentioned earlier in this thread. Duncan Murdoch John. John Maindonald email: john.maindon...@anu.edu.au phone : +61 2 (6125)3473fax : +61 2(6125)5549 Centre for Mathematics Its Applications, Room 1194, John Dedman Mathematical Sciences Building (Building 27) Australian

Re: [R] unexpected behavior using round to 2 digits on randomly generated numbers

2010-11-28 Thread Duncan Murdoch
in floating point, and the rounding error sometimes shows up when you multiply by 100. A simpler version of this is the following: y - 1:99 y[(y/100)*100 != y] [1] 7 14 28 29 55 56 57 58 Duncan Murdoch x-runif(100)#generate some random numbers y-round(x,digits

Re: [R] How to mean, min lists and numbers

2010-07-12 Thread Duncan Murdoch
is to apply functions componentwise to lists of vectors. One way to do that is to bind them into a matrix, and use apply. For example: M - cbind(-1, c(1,1,0), c(-1,10,-1)) apply(M, 1, mean) Duncan Murdoch __ R-help@r-project.org mailing list

  1   2   3   4   5   6   7   8   9   10   >