Closed olivethree closed 2 years ago
Could you paste the code that you used so we can reproduce this error?
Here it is:
library(rcicr) # dev version library(png) library(stringr) library(tidyverse) library(broom)
iter <- 300 # number of 2IFC task trials res <- 256
base_image <- strc("grey", res, ".png") writePNG(matrix(0.5, nrow=res, ncol=res), base_image)
baseimage <- 'grey'
stimuli_set_1 <- generateStimuli2IFC(base_face_files=list("grey"=base_image), n_trials = iter, ncores = 2, returnAsDataframe = TRUE, seed = 1, img_size = 256, stimulus_path = "./stimuli_set_1")
rcic_seed_1_time_jul_19_2017_21_03.zip
rdata1 <- 'rcic_seed_1_time_jul_19_2017_21_03.Rdata' load(rdata1)
resp <- 1 # response value nr_response_sets <- 20 # simulated number of participants stim1responses <- sample(c(-resp,resp),iter*nr_response_sets,replace=TRUE)
dataset1 <- data.frame(subject = rep(1:nr_response_sets, each = iter), stimuli = rep(1:iter, times = nr_response_sets), responses = stim1responses)
sim_cis_1 <- batchGenerateCI2IFC(dataset1,'subject', 'stimuli', 'responses', baseimage, rdata1, saveaspng = TRUE, targetpath = "./sim_cis_1")
Thanks, I will take a look next week.
As a note to ourselves: In the development version, generateCI2IFC()
will take over almost all functionality of batchGenerateCI2IFC()
. It already performs the same computations when you specify the participants
argument, it just doesn't save each participant's CI to a bitmap. (See #43)
This issue is now fixed in the development branch.
Returns the following error:
Error in txtProgressBar(min = 1, max = npids, style = 3) : must have 'max' > 'min'
Also, I ran this function with the same data in the old package and it worked.