Displaying 1 result from an estimated 1 matches for "namesfirstlevelelements".
2007 Dec 28
1
unit attribute to list elements
...could include the unit in the names attribute of each
element, as in :
> names(constants$cel)<- " speed of light in vacuum [m.s^-1]"
Writing this for every element is very redundant... Is there any way
to access and set the name of each first level element of the list?
> namesFirstLevelElements(constants)<- c(" speed of light in vacuum
> [m.s^-1]",
> "impedance of vacuum [some unit]",
> ...)
Quite possibly, I'm completely on the wring track;
- maybe such a package already exists
- a custom class or structure would be more appropriate? I don't...