[R] dims error
Ivan Calandra
ivan.calandra at uni-hamburg.de
Tue Aug 17 15:33:10 CEST 2010
Yaacov,
I cannot really help you, I don't even understand what you're trying to do!
What's the link between your function and all the information you've
just sent (by the way, you forgot to send it to the list)?
By the way, attachments are not really advised, you'd better use dput()
I've never used these packages and functions, that could explain why I
don't understand.
Maybe someone else will be able to help you
Ivan
-------- Message original --------
Sujet: RE: [R] dims error
Date : Tue, 17 Aug 2010 09:11:18 -0400
De : Yaacov Petscher <ypetscher at fcrr.org>
Pour : ivan.calandra at uni-hamburg.de <ivan.calandra at uni-hamburg.de>
Thanks for your response Ivan. Below is the call and attached are the referenced tables. My sense is that it's related to the table, but I'm not quite sure why.
library(statmod)
library(rgenoud)
aE<- read.table("Z:\\Measurement Grant\\TCC linking\\f1p1.dat", header=T,sep="\t")$mean[1:20]
bE<- read.table("Z:\\Measurement Grant\\TCC linking\\f1p1.dat", header=T,sep="\t")$mean[31:50]
cE<- rep(0,25)
aB<- read.table("Z:\\Measurement Grant\\TCC linking\\f1p28.dat", header=T,sep="\t")$mean[1:20]
bB<- read.table("Z:\\Measurement Grant\\TCC linking\\f1p28.dat", header=T,sep="\t")$mean[31:50]
cB<- rep(0,25)
theta<-seq(-4, 4, length=20)
nxi<- 40
std<- sqrt(c(0.306))
item<- c(9,8)
ax<-aB
cx<-cB
bx<-bB
ay<-aE
cy<-cE
by<-bE
testlet.linking.coefficients(ax, cx, bx, theta, nxi, std, item, ay,
cy, by,"Z:\\Measurement Grant\\TCC linking\\f1P28p1OUT.txt")
Yaacov Petscher, Ph.D.
Director of Research, Florida Center for Reading Research
Associate in Research, Florida State University
2010 Levy Ave
Suite 100
Tallahassee, Florida, 32310
850-645-8963 (phone Tuesday/Thursday)
850-645-9477 (phone Monday/Wednesday/Friday)
850-644-9085 (f)
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Ivan Calandra
Sent: Tuesday, August 17, 2010 9:08 AM
To: r-help at r-project.org
Subject: Re: [R] dims error
Hi,
Maybe knowing what you provided to the function call as a, b, c, and xi would help!
Since you're at it, think about using the dput() function to provide copy/pastable objects ;)
HTH,
Ivan
Le 8/17/2010 15:00, Yaacov Petscher a écrit :
> Greetings,
>
> I am a very novice user with R, and in the course of running a linking procedure :
>
>
> P.old<- function (a, c, b, xi){
> #a contains a parameters
> #c contains c parameters
> #b contains b parameters
> #xi is a one column vector containing quadrature
> points for xi(=theta-gamma)for one item
>
> tmp<- a*(xi-b)
> p<- c+(1-c)*pnorm(tmp)
> return(p)
> }
>
> I receive an error which states:
>
> Error in P.old(a[i], c[i], b[i], node) :
> dims [product 40] do not match the length of object [0]
>
> I'm not exactly sure to what I should attend in changing the code. Any help would be greatly appreciated!
>
> Yaacov
>
> Yaacov Petscher, Ph.D.
> Director of Research, Florida Center for Reading Research Associate in
> Research, Florida State University 2010 Levy Ave Suite 100
> Tallahassee, Florida, 32310
> 850-645-8963 (phone Tuesday/Thursday)
> 850-645-9477 (phone Monday/Wednesday/Friday)
> 850-644-9085 (f)
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. Säugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra at uni-hamburg.de
**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php
[[alternative HTML version deleted]]
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: F1P28.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100817/3937b8b8/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: F1P1.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100817/3937b8b8/attachment-0001.txt>
More information about the R-help
mailing list