Re: [Rd] setdiff bizarre (was: odd behavior out of setdiff)

2009-06-02 Thread Barry Rowlingson
On Tue, Jun 2, 2009 at 4:13 PM, Stavros Macrakis wrote: > but simply treats the data frame as a *character* list: > >     1 %in% data.frame(a=2,b=1)  # TRUE >     '1' %in% data.frame(a=2,b=1)  # TRUE >     1 %in% data.frame(a=2:3,b=1:2) # FALSE >     1:3 %in% data.frame(a=2:4,b=1:3)  # FALSE FALS

[Rd] Show location of workspace image on quit?

2009-06-05 Thread Barry Rowlingson
When I quit R, it says: > q() Save workspace image? [y/n/c]: and since I've probably got 3 R sessions running in however many different directories and I might have jumped around with setwd() , I forget exactly where R wants to save its workspace image. So could q() be changed to say what file

Re: [Rd] Show location of workspace image on quit?

2009-06-05 Thread Barry Rowlingson
On Fri, Jun 5, 2009 at 1:46 PM, Mathieu Ribatet wrote: > I guess that having something like this >> q() >> Save workspace image (/home/me/workspace/.RData)? [y/n/c/e]: > > where "e" means Editing the path should be clear enought, isn't it? 'e' might be thought to mean 'exit' in English, which mak

Re: [Rd] Show location of workspace image on quit?

2009-06-05 Thread Barry Rowlingson
On Fri, Jun 5, 2009 at 3:01 PM, Gabor Grothendieck wrote: > > Save workspace to /home/me/workspace/.RData? [ y(es) / (n(o) / > c(ancel) / o(ther) ]: Quitting emacs produces this: Save file /foo/bar/baz.qux? (y, n, !, ., q, C-r, d or C-h) I'm not sure what any other than the first two do. I d

Re: [Rd] Show location of workspace image on quit?

2009-06-05 Thread Barry Rowlingson
Here's a replacement 'q' function that spits out the path of the workspace image: q = function (save = "default", status = 0, runLast = TRUE) { cat(paste("Workspace image is ",file.path(getwd(),formals(save.image)$file),'\n')) flush.console() .Internal(quit(save, status, runLast)) } Note the tric

Re: [Rd] Matrix with random number

2009-06-30 Thread Barry Rowlingson
>     x(i,j) = call myrbeta(1,4,5) ! It's correct? > The code of the error in R is: > dyn.load("func.so") > Error in dyn.load("func.so") : >   unable to load shared library > '/home/julio/Orientados/Fabio/Fortran/mat-fortran/func.so': >   /home/julio/Orientados/Fabio/Fortran/mat-fortran/func

[Rd] "Roxygenating" packages

2009-07-08 Thread Barry Rowlingson
Is there any interest in a method of taking a package with documentation in Rd files and attaching it to package R files in Roxygen format? I can see a few problems with a totally general solution but it might be possible to make a script that provides a kickstart to converting a package to Roxygen

Re: [Rd] "Roxygenating" packages

2009-07-08 Thread Barry Rowlingson
On Wed, Jul 8, 2009 at 3:53 PM, hadley wickham wrote: > Sounds like a neat idea!  Especially with Duncan Murdoch's recent work > making it easy to parse rdoc files in R. I reckon the tricky bit is going to be working out how to map the various possibilities of rdoc files into Roxygen syntax. We

[Rd] Lightweight 'package' idea.

2009-08-21 Thread Barry Rowlingson
I'm often wanting to develop functions whilst manipulating data. But I don't want to end up with a .RData full of functions and data. It might be that I have functions that are re-usable but not worth sticking in a package. So I've tried to come up with a paradigm for function development that mo

Re: [Rd] License of Port3 library for R

2009-09-02 Thread Barry Rowlingson
On Wed, Sep 2, 2009 at 2:49 AM, Pin Tian Ng wrote: >      I developed some code that called subroutines from the Port3 Library > (http://www-out.bell-labs.com/project/PORT/).  I¹m thinking about making it > available as an R package.  But I¹m not sure if their NON-EXCLUSIVE SOURCE > CODE LICENSE AG

Re: [Rd] Viewing pdfs from inst/doc

2009-09-04 Thread Barry Rowlingson
On Fri, Sep 4, 2009 at 10:44 PM, rudjer wrote: > > Writing R extensions says: > > In addition to the help files in Rd format, R packages allow the inclusion > of documents in arbitrary other formats. The standard location for these is > subdirectory inst/doc of a source package, the contents will b

Re: [Rd] OOP with Encapsulated Class Definitions

2009-11-23 Thread Barry Rowlingson
On Mon, Nov 23, 2009 at 10:04 AM, Charlotte Maia wrote: > Hi all, > > I'm seeking feedback (good, bad or indifferent) in regards to > developing (further) a new class system for R, that uses encapsulated > class definitions (i.e. the method definitions are literally inside > the body of the class

[Rd] "bug report" field in DESCRIPTION file?

2009-11-26 Thread Barry Rowlingson
A lot of R packages are now effectively maintained by several people and so use sites like R-forge or google code for development. This means the best way to report bugs or problems with these packages is via the development site's bug tracking rather than emailing the maintainer. Could we agree on

Re: [Rd] "bug report" field in DESCRIPTION file?

2009-11-26 Thread Barry Rowlingson
On Thu, Nov 26, 2009 at 1:39 PM, Duncan Murdoch wrote: > This sounds like a good idea, though I would add a "package" parameter to > the bug.report() function, rather than creating a new function. I'm sure when I did help.search("bug") and help.search("report") this morning I didn't see this fun

Re: [Rd] How x[, 'colname1'] is implemented?

2010-01-01 Thread Barry Rowlingson
On Thu, Dec 31, 2009 at 11:27 PM, Peng Yu wrote: > I don't see where describes the implementation of '[]'. > > For example, if x is a matrix or a data.frame, how the lookup of > 'colname1' is x[, 'colname1'] executed. Does R perform a lookup in the > a hash of the colnames? Is the reference O(1) o

Re: [Rd] How x[, 'colname1'] is implemented?

2010-01-02 Thread Barry Rowlingson
On Fri, Jan 1, 2010 at 9:40 PM, Peng Yu wrote: > I'm not complaining that it is not documented. Yes but you didn't answer my question. When you ask a question on these (or any mailing lists) you should always say what efforts you've made to answer the question. I first looked in the help for '[

Re: [Rd] seq.int broken (seq as well) (PR#14169)

2010-01-13 Thread Barry Rowlingson
2010/1/11 Jens Oehlschlägel : > Petr, > This can have severe consequences like accessing beyond the limits of an > array. If C-code is involved, this can crash R. In the worst case algorithms > can silently do wrong. Being an admirer of R since its early days, I was > shocked to see this, and as

Re: [Rd] interfacing R with RFC2445

2010-01-14 Thread Barry Rowlingson
On Mon, Jan 11, 2010 at 10:10 PM, Jeff Hamann wrote: > R Developers, > > I cannot seem to find an R package that can read/write iCalendar (RFC2445) > files. > > I have found the libical library at sourceforge. I've used it briefly so it > may be what I need, but again no R interface. I may have to

[Rd] Missing argument error message

2010-01-28 Thread Barry Rowlingson
Back in the days of R 2.6, if you did this, you got this: > z=function(x){x*2} > z() Error in z() : argument "x" is missing, with no default But now in this decade we get (for R 2.9 and 2.10): > z=function(x){x*2} > z() Error in z() : element 1 is empty; the part of the args list of '*' be

Re: [Rd] Package Directory Hierarchy: Recursive inclusion of *.R possible?

2010-02-04 Thread Barry Rowlingson
On Wed, Feb 3, 2010 at 10:40 AM, Johannes Graumann wrote: > Hello, > > I would like to organize the "R" directory in my home-grown package into > sub-directories, but "R CMD --build" doesn't seem to find *.R files below > the actual source directory. Is there any way around that? This was discuss

[Rd] R Startup configuration file

2010-02-10 Thread Barry Rowlingson
Currently when R starts up it can be configured by a file of environment variable specifications and a file of R code. This makes programmatic modification of startup configuration tricky. Case in point: I start R, do install.packages("foo"), and up pops the 'choose a CRAN mirror' dialog. I'd like

Re: [Rd] R Startup configuration file

2010-02-10 Thread Barry Rowlingson
On Wed, Feb 10, 2010 at 11:44 AM, Duncan Murdoch wrote: > When I read the ?Startup man page, I find it is too complicated already; I > don't want to add another kind of file to read.  (Would we have  separate > user and site versions of this new file?  When would it be handled?) > > However, we c

Re: [Rd] filenames with special characters in the R/ directory of a package?

2010-02-12 Thread Barry Rowlingson
On Fri, Feb 12, 2010 at 5:35 AM, blue sky wrote: > According to R-exts.pdf (page 3): > For maximal portability filenames should only > contain only ASCII characters not excluded already (that is > A-Za-z0-9._!#$%&+,;=...@^(){}’[] > > I have some files with special characters like '[' and '%' e.g.

Re: [Rd] R Startup configuration file

2010-02-12 Thread Barry Rowlingson
On Wed, Feb 10, 2010 at 3:06 PM, Barry Rowlingson wrote: >  But I agree that writing a saveable options package is the first step > - then making that a default in R is the second so people don't have > to edit profiles and R packages and applications can expect an API for &

Re: [Rd] R Startup configuration file

2010-02-12 Thread Barry Rowlingson
On Fri, Feb 12, 2010 at 2:22 PM, Simon Urbanek wrote: > This is getting OT, but, please, no XML. It's entirely useless in this > context IMHO (as it is in others, but that's another story) and we already > have reliable support for storing R objects (more than one in fact). Despite > the fact tha

Re: [Rd] Problem with ?Syntax

2010-02-20 Thread Barry Rowlingson
On Sat, Feb 20, 2010 at 9:52 AM, Gabor Grothendieck wrote: > In ?Syntax [ is given as higher priority than $ but BOD$demand[3] > seems to be the same as (BOD$demand)[3] contrary to [ being higher > priority. > >> BOD$demand[3] > [1] 19 >> (BOD$demand)[3] > [1] 19 > > What is the rule being used he

Re: [Rd] R logo as SVG ?

2010-02-21 Thread Barry Rowlingson
On Sat, Feb 20, 2010 at 7:56 PM, Jens Elkner wrote: > Yes and scaling would be too resource consuming as well (very bad for > menus, etc.). I think, the most challenging part here is all the > [different type of] shadows. So does anybody know, who made  the > original pixel based image? If not ra

Re: [Rd] Improved Nelder-Mead algorithm - a potential replacement for optim's Nelder-Mead

2010-03-06 Thread Barry Rowlingson
On Fri, Mar 5, 2010 at 8:26 PM, Ravi Varadhan wrote: > Hi, > > I have written an R translation of C.T. Kelley's Matlab version of the > Nelder-Mead algorithm.  This algorithm is discussed in detail in his book > "Iterative methods for optimization" (SIAM 1999, Chapter 8).  I have tested > this

Re: [Rd] CRAN nearly down?

2010-03-06 Thread Barry Rowlingson
On Fri, Mar 5, 2010 at 5:40 PM, Paul Gilbert wrote: > Is CRAN having trouble or is it just me?  (The web interface is very > slow and install.packages() is timing out and giving me "service not > available"). Have you ever tried: http://downforeveryoneorjustme.com/cran.r-project.org - I though

Re: [Rd] Is it valid to do x == Inf?

2010-04-01 Thread Barry Rowlingson
On Thu, Apr 1, 2010 at 11:03 AM, Henrik Bengtsson wrote: > Hi, > > I found in a bit of code the following test for infinity: > >  if (x == Inf) ... > > Is that valid, or should it be (as I always thought): > >  if (is.infinite(x)) ...? > > Does it depend on whether 'x' is float or integer? > > My

Re: [Rd] Difference Linux / Windows

2010-04-01 Thread Barry Rowlingson
On Thu, Apr 1, 2010 at 4:37 PM, Simon Urbanek wrote: > > On Mar 31, 2010, at 18:38 , Seth Falcon wrote: > >> On 3/31/10 1:12 PM, Christophe Genolini wrote: >>> >>> Hi the list, >>> I am writing a package that happen to not be compatible with linux >>> because I did not know that the function "save

[Rd] automatically loading packages

2010-05-04 Thread Barry Rowlingson
If I start an R session with a previously saved .RData that has S4 objects in it, there are times when the associated package loads when I use (or mention) the object, and times when it doesn't. For example: > dim(casesIn) NULL > library(sp) > dim(casesIn) [1] 726 22 - because casesIn is a

Re: [Rd] require( "foo (>= 2.1)" )

2010-05-31 Thread Barry Rowlingson
On Sun, May 30, 2010 at 5:50 PM, Romain Francois wrote: > Hi, > > Sure. I could and I would provide a patch. Since this is more of a "nice to > have", I wanted to first find out whether others would find it useful, and > also if such a patch would have chances to get accepted by one of R-core > me

Re: [Rd] Bridging R to OpenOffice

2007-03-29 Thread Barry Rowlingson
Kevin B. Hendricks wrote: > As I remember, I think someone has built an interface from Gnumeric > to R if I am not mistaken. That project if it is still alive might > provide a nice model of how to interface from a spreadsheet to R > without lots of GUI front end stuff being needed. As I r

Re: [Rd] R-Forge?

2007-04-12 Thread Barry Rowlingson
Gregor Gorjanc wrote: > I have recently found RForge.net (http://www.rforge.net/) by Simon > Urbanek and found out today that the site is accepting subscriptions. > Great! However, browsing a bit on the site I found a link to another > forge: R-Forge (http://r-forge.r-project.org/). > > Is/will t

[Rd] attach/detach asymmetry

2007-05-16 Thread Barry Rowlingson
Is there a good reason why arguments to 'attach' and 'detach' differ so much? Yes, I know this is the documented behaviour, it just seems to violate the principle of least surprise. Examples: file = "foo.RData" df = data.frame(x=1:10,y=1:10) attach(file) # attaches the RData file 'foo.RD

[Rd] Saving R graphics as various file types.

2007-07-18 Thread Barry Rowlingson
I'm using R called via Rpy from Python running from Quantum GIS. Put simply, I'm developing a GUI wrapper round some R plotting functions. What I want to do is offer the user a 'Save Plot As...' option. The problem is divining what sort of output files R can copy a graphics device into.

Re: [Rd] the amazing prof. ripley ...

2007-08-03 Thread Barry Rowlingson
Ben Bolker wrote: > x = readLines("http://developer.r-project.org/R.svnlog.2007";) > rx = x[grep("^r",x)] > who = gsub(" ","",sapply(strsplit(rx,"\\|"),"[",2)) > twho = table(who) > twho["ripley"]/sum(twho) > > 74% of all commits! And 99% of all 'This is not a bug/You have not read the postin

Re: [Rd] Compiling R for the Sony Playstation 3?

2007-08-03 Thread Barry Rowlingson
[EMAIL PROTECTED] wrote: > Beyond that, there may be a few more things that can be done to make R run > "stupidly fast" on ps3 or IBM Cell blades. > Wouldn't the right way to go here be to make it use the PS3 graphics hardware, in a http://www.gpgpu.org/ kind of way? Or are the Cell process

Re: [Rd] Returning vectors of two different data types back to R environment (from C).

2007-11-16 Thread Barry Rowlingson
Charles Danko wrote: > Hello, > > Quick question. > > I have written a C function - I would like to make it return two vectors to > the R environment - one STRSXP vector, and one INTSXP vector. Is this > possible/ easy to do using the API? > > I looked, but could not find the answer to this qu

[Rd] Building packages

2007-12-07 Thread Barry Rowlingson
I've started a new package and I'm trying to work out the best way to do it. I'm managing my package source directory with SVN, but "R CMD build" likes to dump things in the inst/doc directory when making vignette PDF files. I don't want to keep these in SVN (they aren't strictly 'source'), so

Re: [Rd] Building packages

2007-12-07 Thread Barry Rowlingson
Oleg Sklyar wrote: > If I am not mistaken R CMD build builds the package temporarily and uses > that build to build the vignette, so where is the problem? All my > vignettes build fine on both Linux and Windows and on Windows you > actually see that running R CMD build --binary builds the source c

Re: [Rd] Building packages

2007-12-07 Thread Barry Rowlingson
Gabor Grothendieck wrote: > An svn checkout directory can contain a mix of files that > are mirrored in the svn and not mirrored. In particular, if you > add a new file into your checkout directory it will not automatically > go into the repository on your next commit unless you specifically > pla

[Rd] Rapid Random Access

2007-12-14 Thread Barry Rowlingson
I have some code that can potentially produce a huge number of large-ish R data frames, each of a different number of rows. All the data frames together will be way too big to keep in R's memory, but we'll assume a single one is manageable. It's just when there's a million of them that the ma

Re: [Rd] Rapid Random Access

2007-12-14 Thread Barry Rowlingson
Tony Plate wrote: > This is exactly the type of situation that the trackObjs package is > designed for. Ooh, I'm having deja-vu - yes I think I saw this package a while back and wondered what magic it did. I shall go play with it later. Thanks Barry ___

Re: [Rd] 0.45<0.45 = TRUE (PR#10744)

2008-02-13 Thread Barry Rowlingson
hadley wickham wrote: > It's more than that as though, as floating point addition is no longer > guaranteed to be commutative or associative, and multiplication does > not distribute over addition. Many concepts that are clear cut in > pure math become fuzzy in floating point math - equality, sin

Re: [Rd] [R] R-Logo

2008-03-07 Thread Barry Rowlingson
[Think this is more R-devel than R-help now] Gabor Csardi wrote: > Jean, > > this is nice, but 1) the logo is a bitmap, it is ugly if you > resize it, 2) you don't need a pdf version for pdflatex, it > handles jpg (and maybe also png as well), so you can > just use the logos at the R develope

[Rd] "R CMD check" leaving object files.

2008-04-07 Thread Barry Rowlingson
If I run "R CMD check" on my package source directory I get no warnings (okay, at the moment I get a few, but lets imagine for the sake of argument I don't). Then if I run it again I get a warning about my source package having object files in it: * checking if this is a source package ... WARN

Re: [Rd] X11cairo with antialias="none" buggy under MacOS?

2008-05-01 Thread Barry Rowlingson
Joerg van den Hoff wrote: X11(antialias="none") I obviously am going to plot to the screen device. where a line width below one pixel does'nt make sense to me. what am I missing? The new "cairo" X11 device with antialiasing off can indeed look awful , but if you really don't want antialia

Re: [Rd] ** operator

2008-05-15 Thread Barry Rowlingson
Duncan Murdoch wrote: It's fairly unlikely to go away, but it's an old undocumented feature, so use at your own risk. There are lots of other undocumented features, but maybe no others at the lexical level. Check out src/main/gram.y if you want to search for more at that level, and src/* if

[Rd] Double-clicking in tk list dialogs

2008-08-14 Thread Barry Rowlingson
Am I the only one who finds himself futilely double-clicking a CRAN mirror in the dialog for choosing a CRAN mirror? Yes, double-clicking works in Windows, but not in the Tk-based dialog on Linux. I'm going to wear out my mouse button. Adding the following line to the tk_select.list function in th

Re: [Rd] indexing by character with identical names

2008-09-19 Thread Barry Rowlingson
2008/9/19 Jake Michaelson <[EMAIL PROTECTED]> > ... that is, if a vector has identical (and therefore ambiguous) names, > it only returns the first match when the vector is indexed by a > non-unique name. From my perspective, a more sensible behavior would be > to return *all* elements which carr

Re: [Rd] Possible GPL Violation

2008-10-22 Thread Barry Rowlingson
> It seems unlikely that the functionality of this program can be separated > from the R-packages upon which it relies, thus making them one work subject > to GPL. Does anyone have any experience with this software/company? Any > thoughts? They're not distributing R itself: "You must have R on

Re: [Rd] Possible GPL Violation

2008-10-22 Thread Barry Rowlingson
2008/10/22 Ian Fellows <[EMAIL PROTECTED]>: > Perhaps my understanding of GPL is lacking, but isn't this the reason that > GPL is different for LGPL? Linking to functions is allowed in the lesser > license, but not in GPL. > > From the gpl faq: >

Re: [Rd] writting null (\000 or ^@) to an external text file without the new warning

2008-10-28 Thread Barry Rowlingson
2008/10/28 Greg Snow <[EMAIL PROTECTED]>: > I have some functions that write an external text file for postprocessing by > another program. Some instructions to the other program need to be indicated > by null values (\000 or ^@). The function currently uses code like: > > writeChar(rawToChar(a

[Rd] R in a sandbox/jail

2008-12-07 Thread Barry Rowlingson
Someone recently suggested building a system for automatically testing student's R programs. They would upload them to our Virtual Learning Environment, which would then run the code on some inputs and see if it got the right output. If it does, the student scores points for that course. My first

Re: [Rd] Accuracy of dnorm (PR#8586)

2006-02-10 Thread Barry Rowlingson
Prof Brian Ripley wrote: >>The dnorm functions yield a wrong value when the standard deviation is near to >>1e-1 > What is wrong here? Try the textbook formula > > >>x <- 0 >>m <- 0.04 >>sd <- 0.3 >>1/(sqrt(2*pi)*sd) * exp(-0.5*(x-m)^2/sd^2) > > [1] 1.318039 > Even MS Excel gets this one ri

Re: [Rd] Error - Compiling R on a Sun V40Z - R/R-2.2.1

2006-06-23 Thread Barry Rowlingson
[EMAIL PROTECTED] wrote: > The current version of R is 2.3.1 patched. You are asked not to report > problems on obselete versions of R. > > This seems to be gcc 3.3.6, also obselete. If configure says: >>configure: WARNING: ## --- ## >>configure: WARNING:

Re: [Rd] Using TCP/IP sockets in R

2006-08-16 Thread Barry Rowlingson
Dirk Eddelbuettel wrote: > Are you aware of Simon's Rserve project at http://www.rosuda.org/Rserve/ ? > It already has Java and C++ client code -- it would be nice if you could > add Python client code to this project. I dont think its feature-complete or well-tested or documented and certainly

Re: [Rd] R-Project logo in SVG format

2006-08-31 Thread Barry Rowlingson
[EMAIL PROTECTED] wrote: > After you created one and submitted it to us probably at the same place as > the bitmaps. In the meantime it will have to suffice that you use all we > have, and that are the bitmaps (the logo was done by a volunteer who chose > to use a bitmapped graphics program). It i

Re: [Rd] Complete documentation gram.y ??

2006-09-08 Thread Barry Rowlingson
Patricia Bautista wrote: > Hi everybody, > > Does anybody know where I can find documentation about > file gram.y?. What I need to do is related to the > parse tree. I need the parse tree of a R user defined > function for being used by a c++ function. Briefly, I > have a C++ function that is use

Re: [Rd] c.factor

2006-11-15 Thread Barry Rowlingson
> > It does not remove names in Splus either, just all > other attributes. I see c() used in several Splus > functions as a way to convert a matrix into a vector > (by removing the .Dims and .Dimnames attributes). > I dont see the logic in certain attribute names (?attr lists 'class', 'comm

[Rd] Detecting compilation under R

2006-12-14 Thread Barry Rowlingson
The docs tell me: "The header files define USING_R, which should be used to test if the code is indeed being used with R." but surely you only get that if you #include , which you can only do if you are using R. If you have code that you might want to compile in R and for other purposes, how c

Re: [Rd] Detecting compilation under R

2006-12-14 Thread Barry Rowlingson
Prof Brian Ripley wrote: > If *no* R.h is around: easy to solve. Have a dummy R.h somewhere? > What is BUILD? Oh, pardon me for forgetting the arbitrary capitalisation of R CMD thingies. Can someone come up with a mnemonic for remembering that BATCH, COMPILE, SHLIB, INSTALL, LINK and REMO

Re: [Rd] Detecting compilation under R

2006-12-14 Thread Barry Rowlingson
> So the problem is that you needed rather > > #include > #ifdef USING_R > x = rand_unif(0.0,1.0); > #else > #include > x = gsl_runif(0.0,1.0); > #endif > > since if R.h is not around, the include will not include it. > If R.h is not around, the preprocessor will throw a tantrum: cc

Re: [Rd] Which programming paradigm is the most used for make R packages?

2007-01-04 Thread Barry Rowlingson
Ross Boylan wrote: > On Wed, Jan 03, 2007 at 11:46:16AM -0600, Ricardo Rios wrote: >> Hi wizards, does somebody know Which programming paradigm is the most >> used for make R packages ? Thanks in advance. >> > You need to explain what you mean by the question, for example what > paradigms you have

[Rd] obsolescence

2007-01-19 Thread Barry Rowlingson
Since many posts to R-devel/help invoke this response: Prof Brian Ripley wrote: > Please, use the current version of R and not an obselete one is there an argument for including a version check on R startup? These things seem somewhat in vogue these days (what with everything on the internet

Re: [Rd] can't plot a line

2007-01-23 Thread Barry Rowlingson
Spencer Graves wrote: > Consider the following: > > plot(0, 0, xlim=c(-10, 10), ylim=c(-50, 50)) > lines(c(0,0), (2*c(-pi, pi))^2) Because squaring is done before multiplication - its higher priority. Hence you end up with (-2*pi)^2 and (2*pi)^2, which are the same, and your 'lin

<    1   2