I need to extract numeric values from a variable which is a structure combined with numeric values and names
structure(c(-1.14332132657709, -1.1433213265771, -1.20580568266868,
-1.75735158849487, -1.35614113300058), .Names = c("carbon",
"nanotubes", "potential", "neuron", "cell", "adhesion"))
At the end I would like to have a vector with just this information
c(-1.14332132657709, -1.1433213265771, -1.20580568266868,
-1.75735158849487, -1.35614113300058)
how can I do it?
many thanks
Both
as.numeric()andunname()do this: