[R] How to properly finalize external pointers?

2007-08-03 Thread Jens Oehlschlägel
also work when removing the SEXP external pointer object is difficult because it was handed over to the closing function directly as a parameter) Best regards Jens Oehlschlägel // C-code static void rindex_finalize(SEXP extPtr){ pINT ptr = R_ExternalPtrAddr(extPtr); if(ptr){ Free(ptr

[R] nearest correlation to polychoric

2007-07-13 Thread Jens Oehlschlägel
Dear all, Has someone implemented in R (or any other language) Knol DL, ten Berge JMF. Least-squares approximation of an improper correlation matrix by a proper one. Psychometrika, 1989, 54, 53-61. or any other similar algorithm? Best regards Jens Oehlschlägel Background: I want

Re: [R] nearest correlation to polychoric

2007-07-13 Thread Jens Oehlschlägel
of posdefify() ? Nice opportunity to give-back. Below is the R code for nearcor and .Rd help file. A quite natural place for nearcor would be John Fox' package polycor, what do you think? John? Best regards Jens Oehlschlägel # Copyright (2007) Jens Oehlschlägel # GPL licence, no warranty, use

Re: [R] factanal AIC?

2007-05-04 Thread Jens Oehlschlägel
or to investigate the wieghtings on your paramaters (eigenvalues in spectral decomp - principal components analysis). Maybe some of those factors are not contributing? The data was simulated, so we know what it is. Best regards Jens Oehlschlägel -- Feel free - 10 GB Mailbox, 100 FreeSMS/Monat

[R] factanal AIC?

2007-05-03 Thread Jens Oehlschlägel
Dear list members, Could any expert on factor analysis be so kind to explain how to calculate AIC on the output of factanal. Do I calculate AIC wrong or is factanal$criteria[objective] not a negative log-likelihood? Best regards Jens Oehlschlägel The AIC calculated using summary.factanal

[R] questioin about cluster in R

2006-04-19 Thread Jens Oehlschlägel
Jane, I know that you can tweak dendrogram objects to display such info (as.dendrogram() converts your tree), but I have no example code at hand. Good luck Jens Oehlschlägel -- Analog-/ISDN-Nutzer sparen mit GMX SmartSurfer bis zu 70%! Kostenlos downloaden: http://www.gmx.net/de/go

Re: [R] Dynamic Programming in R

2006-01-20 Thread Jens Oehlschlägel
or by directly using environments. Best regards Jens Oehlschlägel -- __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] bootstrap vs. resampleing

2005-04-06 Thread Jens Oehlschlägel
Confidence intervals depend on the sample size - the bigger the sample the smaller the interval. Subsampling (resampling without replacement) gives smaller samples and underestimates confidence (overestimates confidence interval size) of parameters calculated on the original sample. Best Jens

Re: [R] R-devel not R-help (was Bug? using { as a function ...)

2004-09-29 Thread Jens Oehlschlägel
content } nams - letters[1:3] v - 1:2 as.constlist(v, nams) Best Jens Oehlschlägel I find I need to do that and when I noticed a recent problem posted on r-help that required it I decided it was time that I figured out a better way to do it. I simplified the problem for purpose

[R] pairs, panel.functions, xlim and ylim

2004-09-22 Thread Jens Oehlschlägel
Valerie, A bit ugly, because you must ignore some warnings, but for me works the code below. Best Jens Oehlschlägel x - rnorm(100, sd=0.2) x - cbind(x=x-0.1, y=x+0.1) pairs(x , panel=function(x,y){ function to be called with xlim=, ylim= parameters points(x, y) abline(0,1

[R] Survey analysis of repeated relationships?

2004-08-20 Thread Jens Oehlschlägel
I just discovered the great piece of software that is available with the survey package. Many thanks and 'Hats off' to Thomas Lumley. While package survey covers analysis of features of objects sampled (in clusters, strata) I could not find analysis of features of repeated relationsships between

Re: [R] truly object oriented programming in R

2004-08-13 Thread Jens Oehlschlägel
, especially you need to understand all the PROTECT macros and how to avoid overloading the protect-stack, because you will need to reprotect your KD-tree very often. Hope that helps Best Jens Oehlschlägel -- NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler! GMX DSL = supergünstig kabellos

RE: [R] RGui Titlebar

2004-07-14 Thread Jens Oehlschlägel
An ugly workaround for versions prior 2.0 would be creating a copy of Rgui.exe and change its icon (google for 'change icon'). Under xp I also can just deactivate the icon on the compatibility tab (disable visual themes). Best Jens Oehlschlägel

Re: [R] please help with estimation of true correlations and reliabilities

2004-05-14 Thread Jens Oehlschlägel
to specify such structure to sem or another SEM software? (no assumption about number of factors, no assumptions about which variables group together). Best regards Jens Oehlschlägel -- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch

RE: [R] please help with estimation of true correlations andreliabilities

2004-05-13 Thread Jens Oehlschlägel
which items belong to which factors but I still want to estimate single item reliabilities Is this impossible? How can one specify such unspecified model to sem? Which (exploratory?) function would me help doing this? Or just: what should I read? Thanks for any help Jens Oehlschlägel

[R] please help with estimation of true correlations and reliabilities

2004-05-13 Thread Jens Oehlschlägel
would be needed for SEM. Is R software available to do this? Best regards Jens Oehlschlägel -- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting

[R] Item Similarity in Scale Analysis?

2004-05-05 Thread Jens Oehlschlägel
Inspection and Preliminary Cluster Analysis, Journal of Educational Measurement 10:51-61) which replaces guessing single item reliabilities by assumption of equal item reliabilites. Does anyone has experience with this method? SEM experts? Thanks for any help. Jens Oehlschlägel -- Sie haben neue

Re: [R] New unique name and fixing getAnywhere()

2004-04-19 Thread Jens Oehlschlägel
# what about gensym - function(root=GeneratedSymbolname, pool=c(letters, LETTERS, 0:1), n=16, sep=_) { todo - TRUE while (todo){ symbolname - paste(root, paste(sample(pool, n, TRUE), collapse=), sep=sep) todo - length(getAnywhere(symbolname)$objs) } symbolname } # but this

RE: [R] How to cluster the variables instead of data points?

2004-04-01 Thread Jens Oehlschlägel
Have a look at function varclus in package Hmisc. Best Jens Oehlschlägel -- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] significance testing under sampling from small finite populations

2004-03-24 Thread Jens Oehlschlägel
in distributions My current application would be on unpaired comparision of discrete (6-valued) questionaire data, but I would also appreciate pointers to functions for continuous data or paired comparisions. Thanks for any help Best regards Jens Oehlschlägel

[R] Is there a way to deactivate partial matching in R?

2004-02-27 Thread Jens Oehlschlägel
(partial argument matching as well as partial matching of list elements), e.g. using an environment variable. If this is currently not possible this would be my current most important wishlist topic. Best regards Jens Oehlschlägel -- __ [EMAIL

[R] [R-pkgs] Package ref implements references and referenceable data.frames for the S-language

2004-02-23 Thread Jens Oehlschlägel
tests to make shure the code does what it is intended to do). Feedback about problems or successful example uses is welcome. Please use the email address given in the package DESCRIPTION and please don't cc to lists for spam prevention. Best regards Jens Oehlschlägel -- GMX ProMail (250 MB

RE: [R] consensus trees/groups from clustering

2004-02-16 Thread Jens Oehlschlägel
Andrew, have a look at library(e1071) ?bclust which does bagging of kmeans cluster centers followed by hierarchical cluster analysis. Smart and fast. Best regards Jens Oehlschlägel I wish to build consensus groups/tree from a set of bootstraps from a clustering algorithm such as hc

RE: [R] distance between two matrices

2004-01-28 Thread Jens Oehlschlägel
Sundar, Have a look at knn1 from package class. As I understand what you want is as.integer( knn1(train=A, test=B, cl=1:nrow(A)) ) Best regards Jens Oehlschlägel Say I have a matrix A with dimension m x 2 and matrix B with dimension n x 2. I would like to find the row

[R] Please help with \usage{} for [.S3Class in Rd-Format

2004-01-22 Thread Jens Oehlschlägel
Dear all, I try to submit a library to CRAN but can't overcome the last R CMD CHECK. Can someone enlighten me how to put the \usage{} section for an S3-Method extractor defined as args(get([.refdata)) function (x, i = NULL, j = NULL, drop = FALSE, ref = FALSE) NULL I read the Writing R

[R] outlier identification: is there a redundancy-invariant substitution for mahalanobis distances?

2004-01-21 Thread Jens Oehlschlägel
to chi^2 assuming that all variables are independent? Can anyone recommend a procedure to calculate distances and identify multivariate outliers which is invariant to the degree of collinearity? Thanks to any advice Jens Oehlschlägel # Example code library(MASS) # generate bivariate normal

[R] How to return a big treelike list from .Call Interface (protect stack overflow)

2003-11-18 Thread Jens Oehlschlägel
C-side recursive list assignment MyList[[c(1,2,1,2,2,1)]] - NewSEXP without calling the R evaluator? Thanks for any help Best regards Jens Oehlschlägel -- GMX Weihnachts-Special: Seychellen-Traumreise zu gewinnen! Rentier entlaufen. Finden Sie Rudolph! Als Belohnung winken tolle Preise. http

Summary: [R] How to represent pure linefeeds chr(10) under R for Windows

2003-11-06 Thread Jens Oehlschlägel
Thanks to all who have responded. My concern was to be able to write a csv file that can have line feeds in string columns chr(10). Why? Excel allows line feeds chr(10) within cells and line breaks chr(13)+chr(10) at line ending, but the windows version of R automatically replaces \n by \r\n in

[R] How to represent pure linefeeds chr(10) under R for Windows

2003-11-05 Thread Jens Oehlschlägel
I need to write out with write.table() a csv file allowing for line feeds (pure chr(10)) as part of character field (not as a line seperator). How can I do that? Best regards Jens Oehlschlägel -- __ [EMAIL PROTECTED] mailing list https

Re: [R] How to represent pure linefeeds chr(10) under R for Windows

2003-11-05 Thread Jens Oehlschlägel
be solved within R, I could workaround by substituting all chr(13)+chr(10) into chr(10) after writing the file using a system() call. However, writing the files twice would be ugly and performance reducing (I am writing an interface). Any idea? Best regards Jens Oehlschlägel

[R] How to grow an R object from C (.Call Interface)

2003-10-31 Thread Jens Oehlschlägel
a sentence in Wrtiting R Extensions. Thanks for any help Jens Oehlschlägel -- NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien... Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService Jetzt kostenlos anmelden unter http://www.gmx.net +++ GMX - die erste Adresse für Mail

[R] GIS re-mapping / polygon overlap

2003-10-23 Thread Jens Oehlschlägel
gpclib) I am willing to share developed code for this problem (that's why I would prefer gpl code over gpclib, which is not really free) Thanks for any help Jens Oehlschlägel -- NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien... Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX