<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Dan,
<div class=""><br class="">
</div>
<div class="">Your script misspecified the label referring to base image in the generateCI2IFC function and the list that combines both cis. In the development version (version 0.2.6) I have added user feedback to the package, so rcicr will give you a more
 informative error message that will help find this mistake.</div>
<div class=""><br class="">
</div>
<div class="">Moreover, up until the current version, if you want images aggregated across subjects, you need to feed aggregated data into the generateCI2IFC. Otherwise the data structures become to big and R will crash with an error message. This is what will
 happen if you run the code below with your current version. However, I adapted generateCI2IFC do this automatically for you in the development version (version 0.2.6), so you don't have to do the aggregation yourself. The function will simply assume it can
 aggregate data that is fed into it by stimulus number. If you just provide the data for a single subject, the behavior will be the same as previously.</div>
<div class=""><br class="">
</div>
<div class="">I have uploaded the development version to R-Forge and it is being built as we speak. You can see its current status at <a href="https://r-forge.r-project.org/R/?group_id=1932" class="">https://r-forge.r-project.org/R/?group_id=1932</a>. As soon
 as its ready (status: current), you can follow the instructions on <a href="http://ron.dotsch.org/rcicr" class="">
http://ron.dotsch.org/rcicr</a> to install the development version. Then you should be able to run the following code without problems:</div>
<div class=""><br class="">
</div>
<div class="">-----------------------</div>
<div class=""></div>
<div class="">R code:</div>
<div class="">-----------------------</div>
<div class="">
<div class=""><font face="Courier New" class="">library(rcicr)</font></div>
<div class=""><font face="Courier New" class="">rdata <- 'rcicrdata.Rdata'</font></div>
<div class=""><font face="Courier New" class=""><br class="">
</font></div>
<div class=""><font face="Courier New" class="">responsedata <- read.csv('rcicrdataM.csv')</font></div>
<div class=""><font face="Courier New" class="">ci1 <- generateCI2IFC(responsedata$Face, responsedata$correct, 'OldM', rdata)</font></div>
<div class=""><font face="Courier New" class=""><br class="">
</font></div>
<div class=""><font face="Courier New" class="">responsedata <- read.csv('rcicrdataF.csv')</font></div>
<div class=""><font face="Courier New" class="">ci2 <- generateCI2IFC(responsedata$Face, responsedata$correct, 'OldF', rdata)</font></div>
<div class=""><font face="Courier New" class=""><br class="">
</font></div>
<div class=""><font face="Courier New" class="">cis <- list(OldM=ci1, OldF=ci2)</font></div>
<div class=""><font face="Courier New" class="">scaled_cis <- autoscale(cis, saveasjpegs=T)</font></div>
</div>
<div class="">
<div class="">-----------------------</div>
<div class=""></div>
</div>
<div class=""><br class="">
</div>
<div class="">Hope this helps.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class=""><br class="">
</div>
<div class="">Ron</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
________________________________</div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Dr. Ron Dotsch</div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
</div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">Utrecht University</div>
<div class="">Department of Psychology </div>
<div class=""><br class="">
</div>
<div class="">Website: <a href="http://ron.dotsch.org" class="">http://ron.dotsch.org</a><br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div><br class="">
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word" class="">
<div class="">
<div class="">
<div class="h5">
<div class="">
<blockquote type="cite" class="">
<div class="">
<div class="gmail_extra">
<div class="gmail_quote">On Mon, Dec 15, 2014 at 4:22 AM, Dotsch, R. (Ron) <span dir="ltr" class="">
<<a href="mailto:R.Dotsch@uu.nl" target="_blank" class="">R.Dotsch@uu.nl</a>></span> wrote:
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word" class="">Hi Daniel,
<div class=""><br class="">
</div>
<div class="">I apologize for the cryptic error messages, this part of the package is definitely not user friendly yet, and something that I need to work on.</div>
<div class=""><br class="">
</div>
<div class="">In your specific case, the error message reflects that your input is still incorrect. Can you send your code + .Rdata file + .csv file to me off-list so I can debug? I'll report the solution back to the list.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class=""><br class="">
</div>
<div class="">Ron</div>
<div class=""><span class=""><br class="">
<div class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
________________________________</div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
Dr. Ron Dotsch</div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<br class="">
</div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div class="">Utrecht University</div>
<div class="">Social and Organizational Psychology (Room E2.22)</div>
<div class=""><br class="">
Website: <a href="http://ron.dotsch.org/" target="_blank" class="">http://ron.dotsch.org</a><br class="">
<br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br class="">
</span>
<div class="">
<div class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On Dec 12, 2014, at 17:40, Daniel Albohn <<a href="mailto:d.albohn@gmail.com" target="_blank" class="">d.albohn@gmail.com</a>> wrote:</div>
<br class="">
<div class="">
<div dir="ltr" class="">Thanks, Ron. I saw the error after I sent the email. However, after accounting for it, I still get the same colMeans error. That is, I seperated the data by base image and tried call the batchGenerateCI2IFC function again with no success.
 Do you have any idea what variable this the colMeans(weighted) is referring to?
<div class=""><br class="">
</div>
<div class="">To answer your other question, all participants saw both base image faces.</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class="">Dan</div>
</div>
<div class="gmail_extra"><br clear="all" class="">
<div class="">
<div class="">
<div dir="ltr" class="">
<div class=""><br class="">
</div>
Daniel Albohn<br class="">
<div class=""><a href="tel:484-332-7688" value="+14843327688" target="_blank" class="">484-332-7688</a></div>
</div>
</div>
</div>
<br class="">
<div class="gmail_quote">On Fri, Dec 12, 2014 at 3:06 AM, Dotsch, R. (Ron) <span dir="ltr" class="">
<<a href="mailto:R.Dotsch@uu.nl" target="_blank" class="">R.Dotsch@uu.nl</a>></span> wrote:
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word" class="">Hi Daniel,
<div class=""><br class="">
</div>
<div class="">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.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class=""><br class="">
</div>
<div class="">Ron</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
________________________________</div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
Dr. Ron Dotsch</div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<br class="">
</div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word" class="">
<div class="">Utrecht University</div>
<div class="">Social and Organizational Psychology (Room E2.22)</div>
<div class=""><br class="">
Website: <a href="http://ron.dotsch.org/" target="_blank" class="">http://ron.dotsch.org</a><br class="">
<br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">
<div class="">
<div class="">On Dec 12, 2014, at 00:48, Daniel Albohn <<a href="mailto:d.albohn@gmail.com" target="_blank" class="">d.albohn@gmail.com</a>> wrote:</div>
<br class="">
</div>
</div>
<div class="">
<div class="">
<div class="">
<div style="word-wrap:break-word" class="">Hello all,
<div class=""><br class="">
</div>
<div class="">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:</div>
<div class=""><br class="">
</div>
<div class="">Error in colMeans(weighted):</div>
<div class=""><span style="white-space:pre-wrap" class=""></span>‘x’ must be an array of at least two dimensions</div>
<div class=""><br class="">
</div>
<div class="">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).</div>
<div class=""><br class="">
</div>
<div class="">Full script reproduced below. Thanks in advance for your help!</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Dan</div>
<div class=""><br class="">
</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px" class="">
<div class="">
<div style="font-family:TimesNewRomanPSMT" class="">library(rcicr)</div>
</div>
<div class="">
<div style="font-family:TimesNewRomanPSMT" class="">base_face_files<- list('OldM'='And_OldM.jpg', 'OldF'='And_OldF.jpg')</div>
</div>
<div class="">
<div style="font-family:TimesNewRomanPSMT" class=""><br class="">
</div>
</div>
<div class="">
<div style="font-family:TimesNewRomanPSMT" class="">library(rcicr)</div>
</div>
<div class="">
<div style="font-family:TimesNewRomanPSMT" class=""><br class="">
</div>
</div>
<div class="">
<div style="font-family:TimesNewRomanPSMT" class="">baseimage1 <- 'And_OldM'</div>
</div>
<div class="">
<div style="font-family:TimesNewRomanPSMT" class="">baseimage2 <- 'And_OldF'</div>
</div>
<div class="">
<div style="font-family:TimesNewRomanPSMT" class=""><br class="">
</div>
</div>
<div class="">
<div style="font-family:TimesNewRomanPSMT" class="">rdata <- 'rcicrdata.Rdata'</div>
</div>
<div class="">
<div style="font-family:TimesNewRomanPSMT" class=""><br class="">
</div>
</div>
<div class="">
<div style="font-family:TimesNewRomanPSMT" class="">responsedata <- read.csv('rcicrdata.csv')</div>
</div>
<div class="">
<div style="font-family:TimesNewRomanPSMT" class=""><br class="">
</div>
</div>
<div class="">
<div style="font-family:TimesNewRomanPSMT" class="">ci <- batchGenerateCI2IFC(responsedata, 'Sex', 'Face', 'correct', baseimage, rdata)</div>
</div>
</blockquote>
<div class="">
<div class=""><br class="">
Daniel Albohn<span style="white-space:pre-wrap" class=""> </span><br class="">
<a href="mailto:d.albohn@gmail.com" target="_blank" class="">Email</a>  | <a href="tel:%28484%29332-7688" value="+14843327688" target="_blank" class="">
(484)332-7688</a><br class="">
</div>
<br class="">
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
Rcicr-users mailing list<br class="">
<a href="mailto:Rcicr-users@lists.r-forge.r-project.org" target="_blank" class="">Rcicr-users@lists.r-forge.r-project.org</a><br class="">
<a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcicr-users" target="_blank" class="">http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcicr-users</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>