Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use typeof() to detect data type #95

Merged
merged 3 commits into from Feb 10, 2016

Conversation

@krlmlr
Copy link
Member

commented Feb 9, 2016

instead of class().

From https://github.com/krlmlr/bigrquery/commit/50a1ff03afefa86dc7f7e4ef0bb0b8de294e5c81#commitcomment-15959160:

this will give better default behaviour for base vectors with classes that we don't know how to deal with otherwise.

Kirill Müller added some commits Feb 8, 2016

Kirill Müller
use typeof() to detect data type
instead of class().
R/upload.r Outdated
POSIXct = "TIMESTAMP",
stop("Unknown class ", paste0(class(x), collapse = "/"))
if (is.factor(x)) return("STRING")
if (inherits(x, "POSIXct")) return("TIMESTAMP")

This comment has been minimized.

Copy link
@hadley

hadley Feb 10, 2016

Member

This should test for "POSIXt"

Kirill Müller

hadley added a commit that referenced this pull request Feb 10, 2016

Merge pull request #95 from krlmlr/feature/upload-typeof
Use typeof() to detect data type

@hadley hadley merged commit b4f438b into r-dbi:master Feb 10, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.