Thanks for your help, and sorry for mis-posting.
JD
On Wed, Sep 25, 2013 at 3:18 AM, Matthew Dowle mdo...@mdowle.plus.com wrote:
Very sorry to hear this bit you. If you need a copy of names before
changing them by reference :
oldnames - copy(names(DT))
This will be documented and
I got bitten badly when a variable I created for the purpose of
recording an old set of names changed when I didn't think I was going
near it.
I'm not sure if this is a desired behaviour, or documented, or warned
about. I read the data.table intro and the FAQ, and also ?setnames.
Ben Bolker
I have two matrices, generated by R functions that I don't understand.
I want to confirm that they're the same, but I know that they have
different attributes.
If I want to compare the dimnames, I can say
identical(attr(tm, dimnames), attr(tmm, dimnames))
[1] FALSE
or even:
,check.attributes=FALSE)
gives TRUE!!! I.e. sometimes attributes really are vital characteristics.
cheers,
Rolf Turner
On 16/11/12 08:52, Jonathan Dushoff wrote:
I have two matrices, generated by R functions that I don't understand.
I want to confirm that they're the same, but I know
David:
Thank you for your very valuable response. In fact, I was trying to
_avoid_ partial matching, not accomplish it. Subset is a _much_ better
way of doing what I was trying to do.
Humorously, however, your code also reproduces the mistake that brought
me here, AFAICT. I think my code
I have a list of observations of individuals. I would like to make a
list of individuals, with a data frame of observations for each individual.
The following code usually works, but not always
--
# Make a list of empty data
6 matches
Mail list logo