[Rd] typo in cbind help page (PR#10523)

2007-12-20 Thread markleeds
--=_Part_1509_5179695.1198191004146
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit


--=_Part_1509_5179695.1198191004146
Content-Type: application/octet-stream; name=R.bug.report
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=R.bug.report


# Your mailer is set to "none" (default on Windows),
# hence we cannot send the bug report directly from R.
# Please copy the bug report (after finishing it) to
# your favorite email program and send it to
#
#   [EMAIL PROTECTED]
#
##

The bug is that the cbind help should read stringsAsFactors=FALSE
( rather than TRUE ) in the Data Frame Methods section.


--please do not edit the information below--

Version:
 platform = i686-pc-linux-gnu
 arch = i686
 os = linux-gnu
 system = i686, linux-gnu
 status = 
 major = 2
 minor = 6.0
 year = 2007
 month = 10
 day = 03
 svn rev = 43063
 language = R
 version.string = R version 2.6.0 (2007-10-03)

Locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

Search Path:
 .GlobalEnv, package:datasets, .Marks.env, package:lattice, package:nnet, 
package:car, package:filehash, package:reshape, package:zoo, package:chron, 
package:MASS, package:utils, package:stats, package:graphics, 
package:grDevices, package:methods, Autoloads, package:base

--=_Part_1509_5179695.1198191004146--

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Request: Documentation of formulae

2008-05-30 Thread markleeds
 This isn't particularly helpful because the book is  quite old but 
formula notation/functionality is covered in depth in "Statistical 
Models in S" by
Chambers and Hastie.  My guess is that there is strong consistency 
between what is said in there and how things work in R.




On Fri, May 30, 2008 at  4:19 PM, Mike Prager wrote:


In working through material on p.272 of MASS (4th ed.), I came
across the following model formula:

pet1.lm <- lm(Y ~ No/EP - 1, Petrol)

I was at a loss to understand the use of "/" until I looked in
"An Introduction [!] to R," where I found the explanation.
My request is that more complete material on model formulae be
lifted from "Introduction to R" (or elsewhere) and put into the
main online help files. There are other useful notations that
may not be well known. Since formulae are not limited to any
particular function, perhaps an entry could be made under
"Formula".

More justification:

The help for "lm" does not explain this notation, nor did I find
a cross-reference to anything useful there. The R Reference
Manual seems to explain functions only. The R Language
Definition has no index entry for "formula" or "model formulae".

Looking to print, neither the section on "model formula" on p.56
of MASS nor the section surrounding the above example explains
the notation, nor could I find it in Dalgaard's book, nor in
Maindonald and Braun.
This seems too nice a feature to keep hidden in plain sight.

--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] [R] learning R

2009-02-25 Thread markleeds
 Hi Wacek: Somewhere I remember reading that environments have 
functionality like lists EXCEPT for the names part. IIRC, I think that I 
read this in the R Language Reference manual also.




On Wed, Feb 25, 2009 at  4:32 AM, Wacek Kusnierczyk wrote:


a quick follow-up:

e = new.env()
e$a = 1
names(e)
# NULL
names(e) = 'a'
# error in names(e) = "foo" : names() applied to a non-vector

this is surprising.  names(e) 'works', there is no complaint, but when
names<- is used, the error is about the use of names, not names<-.

btw. ?names says:

"Description:

 Functions to get or set the names of an object.

Usage:

 names(x)
 names(x) <- value

Arguments:

   x: an R object.
"

and there is no clarification in the rest of the page that x cannot be
an environment, or that it has to be a vector.  furthermore:

p = pairlist(a=1)
names(p)
# "a"
names(p) = 'b'
# fine
is.vector(p)
# FALSE

which is incoherent with the above error message, in that p is *not* a
vector.

vQ



Wacek Kusnierczyk wrote:


the following:

names(a[2]) = 'foo'

has (partially) a functional flavour, in that you assign to the names 
of

a *copy* of a part of a, while

names(a)[2] = 'foo'

does not have the flavour, in that you assign to the names of a;  it
seems, according to the man page you quote, to be equivalent to:

a = 'names<-'(a, '[<-.'(names(a), 2, 'foo'))

which proceeds as follows:

tmp1 = names(a)
# get a copy of the names of a, no effect on a

tmp2 = '[<-'(tmp1, 2, 'foo')
# get a copy of tmp1 with the second element replaced with 'foo'
# no effect on either a or tmp1

tmp3 = 'names<-'(a, tmp2)
# get a copy of a with its names replaced with tmp2
# no effect on either a, tmp1, or tmp2

a = tmp3
# backassign the result to a



__
r-h...@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.


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel