-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Milestone
Description
Please have a look at
http://stackoverflow.com/questions/25184965/r-dplyr-how-to-use-last-first-nth-correct-in-a-sql-database
library("dplyr")
mytab <- tbl(src_postgres(dbname, host, port, user, password), "catalog")
mytab <- group_by(mytab, catalog_id)
mytab<- mutate(mytab, curr2 = last(currency))
mytab
RS-DBI driver: (could not Retrieve the result : ERROR: function first_value() does not exist
mytab$query
SELECT "catalog_id", "currency", "skonto", FIRST_VALUE() OVER (PARTITION BY "catalog_id") AS "curr2" FROM "catalog"
In my opinion the query should be:
SELECT "catalog_id", "currency", "skonto", FIRST_VALUE(currency) OVER (PARTITION BY "catalog_id") AS "curr2" FROM "catalog"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior