I\'m trying to set the default value for a function parameter to a named numeric. Is there a way to create one in a single statement? I checked ?numeric and ?vector but it
...as a side note, the structure function allows you to set ALL attributes, not just names:
structure
structure(1:10, names=letters[1:10], foo="bar", class="myclass")
Which would produce
a b c d e f g h i j 1 2 3 4 5 6 7 8 9 10 attr(,"foo") [1] "bar" attr(,"class") [1] "myclass"