Hello I am importing data from Excel to R using RODBC and I am ending up
with the following data frame:

 names(AbioRep)
 [1] "Date"          "US0001W Index" "US0002W Index" "US0001M Index"
"US0002M Index" "US0003M Index" "US0004M Index" "US0005M Index" "US0006M
Index"
[10] "US0007M Index" "US0008M Index" "US0009M Index" "US0010M Index"
"US0011M Index" "US0012M Index" "F16"           "USSA1 Curncy"  "USSA2
Curncy"
[19] "USSA3 Curncy"

but when I try to call one of its components for example:

 AbioRep$US001 Index
Error: inesperado símbolo en "AbioRep$US001 Index"
>
I am getting an error because of the space in the name of the data frame
component. I have tried to replace the space with .  or _ and none have
work. How do I call the components of the data frame which have spaces in
there names? Thank you

Felipe Parra

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to