powered by
prolific academic provides a demographics file. This reads it and merges with your data using PID and participant_id
umx_read_prolific_demog( file, base = "", df = NULL, verbose = FALSE, by.df = "PID", by.demog = "participant_id", vars = c("age", "Sex"), all.df = TRUE, all.demog = FALSE )
Path to a file to read.
Optional path to folder
Optional existing datafile
Whether to print names in the file.
The ID name in your datafile (default = "PID")
The ID name in the prolific demographics file (default = "participant_id")
Vars to keep from demographics file (default = age & Sex)
Whether to keep all lines of df (default = TRUE)
Whether to keep all lines (people) in the demographics file (default = FALSE)
[data.frame]
https://github.com/tbates/umx, https://tbates.github.io
Other Data Functions: umxFactor(), umxHetCor(), umx_as_numeric(), umx_cont_2_quantiles(), umx_lower2full(), umx_make_MR_data(), umx_make_TwinData(), umx_make_fake_data(), umx_make_raw_from_cov(), umx_polychoric(), umx_polypairwise(), umx_polytriowise(), umx_read_lower(), umx_rename(), umx_reorder(), umx_score_scale(), umx_select_valid(), umx_stack(), umx
umxFactor()
umxHetCor()
umx_as_numeric()
umx_cont_2_quantiles()
umx_lower2full()
umx_make_MR_data()
umx_make_TwinData()
umx_make_fake_data()
umx_make_raw_from_cov()
umx_polychoric()
umx_polypairwise()
umx_polytriowise()
umx_read_lower()
umx_rename()
umx_reorder()
umx_score_scale()
umx_select_valid()
umx_stack()
umx
# NOT RUN { fp = "~/Desktop/prolific_export_5f20c3e662e3b6407dcd37a5.csv" df = umx_read_prolific_demog(fp, df = df) tmp = umx_read_prolific_demog(demog= fp, base = "", df = NULL, verbose = FALSE) # }
Run the code above in your browser using DataLab