explore ability to use other packages for data frame like objects coming from synapser commands

Description

Here's an example I tried:

1 2 imageMasksRes >- synTableQuery("select id,Experiment,Well,PID,parentId from syn11688505") imageMasks <- imageMasksRes %>% tibble::as.tibble()

I get:

1 2 Error in as.data.frame.default(value, stringsAsFactors = FALSE, ...) : cannot coerce class "c("CsvFileTable", "PythonInR_Object", "R6")" to a data.frame

This uses the 'tibble' package, which is an improvement on R data frames. The documentation states:

This is an S3 generic. tibble includes methods for data frames (adds tbl_df classes), tibbles (returns unchanged input), lists, matrices, and tables. Other types are first coerced via as.data.frame() with stringsAsFactors = FALSE.

I would expect that I could run the above because of that statement I bolded. I can do this:

1 imageMasks <- imageMasksRes %>% as.data.frame() %>% tibble::as.tibble()

I cannot do this:

1 imageMasks <- imageMasksRes %>% as.data.frame(., stringsAsFactors=FALSE) %>% tibble::as.tibble()

Environment

None

Status

Assignee

Unassigned

Reporter

Kenneth Daily

Labels

None

Validator

Kenneth Daily

Release Version History

None

Fix versions

Priority

Major
Configure