Displaying 3 results from an estimated 3 matches for "stringnam".
Did you mean:
stringname
2009 Nov 15
3
Error running lda example from Help File (MASS library )
Hello all,
I'm trying to run lda() from the MASS library but the Help example generates
the
following error:
#Code from example in lda Help file
# Resulting Error
>Error in if (targetlist[i] == stringname) { : argument is of length zero
My Current R Installation:
MacOSX: 10.5.8
R: 2.10.0
--
Gregory Riddick, PhD.
CRTA Research Fellow
National Institutes of Health
National Cancer Institute, Neuro-Oncology Branch
http://home.ccr.cancer.gov/nob/
37 Convent Drive
Building 37, Room 1142
Bethesda...
2009 Nov 17
1
Error running lda example: Session Info
...s3[,,1], iris3[,,2], iris3[,,3]),
+ Sp = rep(c("s","c","v"), rep(50,3)))
> train <- sample(1:150, 75)
> table(Iris$Sp[train])
c s v
22 23 30
> z <- lda(Sp ~ ., Iris, prior = c(1,1,1)/3, subset = train)
Error in if (targetlist[i] == stringname) { : argument is of length zero
>
> sessionInfo()
R version 2.10.0 (2009-10-26)
i386-apple-darwin9.8.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1]...
2012 Mar 18
2
malloc/calloc/strdup and R's aequivalents
...some code and port it to R.
If I need to rewrite a lot of stuff, just because I need
to adapt to R, this would be more effort than if it would be possible
just to have some functions, that could make porting easier.
For example, if I want to resuse a function, that opens a file
and needs a char* stringname
then it would add more effort if I need to go via CHARSXP or so.
I would need to rewrite many pieces of the code.
(Should I implement my own kind of R_str_alloc() ?)
My main problem at the moemnt is, that I can use R_alloc()
but when I try to use Calloc() or R_Calloc() I can't compile.
So...