[Rcicr-users] ColMeans question

Dotsch, R. (Ron) R.Dotsch at uu.nl
Fri Dec 12 09:06:15 CET 2014


Hi Daniel,

This is a bit complicated, because it depends on how you structured your data file and whether the different base images were presented to the same participants or to different ones. Anyway, you have made a mistake in your code. Your reference baseimage as argument to the call to batchGenerateCI2IFC but you define the two baseimages as separate variables earlier (baseimage1, baseimage2). For now, the easiest option is to only refer to one as baseimage, and make sure you then only supply the subset of responsedata that applies to that specific base image.

Best,

Ron

________________________________
Dr. Ron Dotsch

Utrecht University
Social and Organizational Psychology (Room E2.22)

Website: http://ron.dotsch.org


On Dec 12, 2014, at 00:48, Daniel Albohn <d.albohn at gmail.com<mailto:d.albohn at gmail.com>> wrote:

Hello all,

I’m attempting to analyze the data for a RC study using two base images. When I run the generateCI2IFC command, I get the following error:

Error in colMeans(weighted):
‘x’ must be an array of at least two dimensions

In my response data file I have four columns: 1) Subject_nbr (numerical), 2) Face (stim number presented), 3) Sex (gender of the stimulus presented), and 4) correct (1 or -1 based off of participant response).

Full script reproduced below. Thanks in advance for your help!

Best,
Dan

library(rcicr)
base_face_files<- list('OldM'='And_OldM.jpg', 'OldF'='And_OldF.jpg')

library(rcicr)

baseimage1 <- 'And_OldM'
baseimage2 <- 'And_OldF'

rdata <- 'rcicrdata.Rdata'

responsedata <- read.csv('rcicrdata.csv')

ci <- batchGenerateCI2IFC(responsedata, 'Sex', 'Face', 'correct', baseimage, rdata)

Daniel Albohn
Email<mailto:d.albohn at gmail.com>  | (484)332-7688

_______________________________________________
Rcicr-users mailing list
Rcicr-users at lists.r-forge.r-project.org<mailto:Rcicr-users at lists.r-forge.r-project.org>
http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcicr-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcicr-users/attachments/20141212/10719e6e/attachment.html>


More information about the Rcicr-users mailing list