KentonWhite / ProjectTemplate

A template utility for R projects that provides a skeletal project.
http://projecttemplate.net
GNU General Public License v3.0
623 stars 159 forks source link

csv files are imported with stringsAsFactors although in config it is set to FALSE #233

Closed alsmnn closed 6 years ago

alsmnn commented 6 years ago

Report an Issue / Request a Feature

I'm submitting a (Check one with "x") :


Issue Severity Classification -

(Check one with "x") :

Expected Behavior

Files, imported from /data while load.project() should be imported whith stringsAsFactors = FALSE when the statement is set to FALSE in global.dcf

Current Behavior

Currently my dataframes are imported with factors instead of characters

Steps to Reproduce Behavior

save a dataframe inside /data

library("ProjectTemplate"); load.project()

Screenshots

image

sig.all is just a gene list with EntrezGeneIDs and HGCSymbols

> str(sig.all)
'data.frame':   694 obs. of  2 variables:
 $ EntrezGeneID: Factor w/ 694 levels "ENSG00000000971",..: 137 149 317 403 253 562 109 235 393 176 ...
 $ HGCSymbol   : Factor w/ 694 levels "A2MP1","ABCC5",..: 596 265 269 341 209 266 349 347 113 359 ...

hope you can help me out

Version Information

I am using R 3.4.3 and ProjectTemplate 0.8.2

KentonWhite commented 6 years ago

@AljoLe What type of file is sig.all? Is it an Excel file? CSV file? Will help us track down where stringAsFactors is not being honoured!

alsmnn commented 6 years ago

@KentonWhite Oh sorry I omitted that information. sig.all is a csv file. In the meantime I migrated my ProjectTemplate to the latest version and now everything is imported fine. Maybe I had the "wrong" file in cache and that was why it was always imported wrong.

I´m sorry to bother you with a bug, that is not there.

Best regards and thanks for your work.