Stan125 / GREA

Gotta Read Em All: RStudio Add-In to interactively read ALL the data into R
48 stars 8 forks source link

Feature Request, Set Variable types #24

Open st-weiss opened 5 years ago

st-weiss commented 5 years ago

Dear Stan,

I'd like to ask if you can make it possible to set the type per variable with simple drop-down menu, so I can easily set to date, character, numeric, factor, etc. This would be so helpful, as it takes me forever each time. If additionally I could set the labels interactively aswell, that would be amazing. Great Work Best Wishes

NeuronalMike commented 4 years ago

Hey @st-weiss , As a workaround, to roughly set all the variables types, I usually use: RObject <- tibble(type_convert(RObject, na= c("", " ", "NA", "NULL", "null"), trim_ws = TRUE)) Then I follow up with modify_if(RObject, .p = is.[Old_Variable_Type], .f = as_[New_Variable_Type]) #or modify_at(RObject, )

Its not ideal, but they work pretty well for workarounds.