method dispatch.
Regards
Laurent
-Original Message-
From: Blaser Nello [mailto:nbla...@ispm.unibe.ch]
Sent: woensdag 29 mei 2013 15:56
To: Franckx Laurent; r-help@r-project.org
Subject: RE: [R] adding class attributes to strings: works in a loop, but not
directly
There are two separate
a) You cannot assign attributes to literal values such as "BICY". You must
assign them to variables, as in
x <- "BICY"
class(x) <- "AONmode"
b) You cannot give the separate elements of a vector their own separate
attributes unless the vector is of mode "list". Ordinarily, attributes apply to
th
Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Franckx Laurent
Sent: Mittwoch, 29. Mai 2013 13:49
To: 'r-help@r-project.org'
Subject: [R] adding class attributes to strings: works in a loop, but
not directly
Dear all
I try to a
Dear all
I try to assign class attributes to strings. Depending on the approach I use,
it works (including method dispatch) or fails.
Let me clarify with an example.
Let:
> AONtptmodelist <- c("FOOT","BICY")
When I assign "class" attributes directly to these strings, it fails:
> class("BICY
4 matches
Mail list logo