'How to find the type of variables in a column in an imported table
Solution 1:[1]
Instead of typeof, you should useclass. To get all of the columns' classes at once, you can do
sapply(starwars, class)
name height mass hair_color skin_color eye_color birth_year
"character" "integer" "numeric" "character" "character" "character" "numeric"
sex gender homeworld species films vehicles starships
"character" "character" "character" "character" "list" "list" "list"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |

