simon-lenau / prolific.api Goto Github PK
View Code? Open in Web Editor NEWR-package for creating and managing studies on the Prolific platform (https://www.prolific.co)
License: GNU General Public License v3.0
R-package for creating and managing studies on the Prolific platform (https://www.prolific.co)
License: GNU General Public License v3.0
Problem: access "studies" endpoint fails, but used to work. Error messages for as_list TRUE and FALSE are shown.
prolific_api_access <- api_access(api_token = Sys.getenv('token'))
access(
prolific_api_access,
endpoint = "studies",
method = "get",
as_list = TRUE
)
Warning: Some columns are a multi-column type (such as a matrix column): [7]. setDT will retain these columns as-is but subsequent operations like grouping and joining may fail. Please consider as.data.table() instead which will create a new column for each embedded column.Error in data.table::setDT(output) :
All elements in argument 'x' to 'setDT' must be of same length, but the profile of input lengths (length:frequency) is: [2:1, 76:14]
The first entry with fewer than 76 entries is 7
access(
prolific_api_access,
endpoint = "studies",
method = "get",
as_list = FALSE
)
Error in output$results : $ operator is invalid for atomic vectors
One of my main use cases for the package was to be able to download the participants' demographic data into R. It would be great to add an example of how to do this to a vignette. I figured it out from the API documentation. This is the approach I used:
api <- api_access(api_token = "<your_api_token>")
demo <- api$access(
endpoint = c("studies", "<your_study_id>", "export"),
method = "get"
)
demo_df <- read.csv(text = demo)
I loaded the prolific.api
package and used api_access(api_token = "X")
where X is the API token generated on my workspace Settings page. I get back the error "API token status: invalid API access failed!". Am I doing something wrong, or has the API changed?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.