similar to: eager to learn how to use "sapply", "lapply", ...

Displaying 20 results from an estimated 2000 matches similar to: "eager to learn how to use "sapply", "lapply", ..."

2002 Dec 01
1
generating contrast names
Dear R-devel list members, I'd like to suggest a more flexible procedure for generating contrast names. I apologise for a relatively long message -- I want my proposal to be clear. I've never liked the current approach. For example, the names generated by contr.treatment paste factor to level names with no separation between the two; contr.sum simply numbers contrasts (I recall an
2003 Feb 14
5
Translating lm.object to SQL, C, etc function
This is my first post to this list so I suppose a quick intro is in order. I've been using SPLUS 2000 and R1.6.2 for just a couple of days, and love S already. I'm reading MASS and also John Fox's book - both have been very useful. My background in stat software was mainly SPSS (which I've never much liked - thanks heavens I've found S!), and Perl is my tool of choice for
2013 Mar 13
1
Empty cluster / segfault using vanilla kmeans with version 2.15.2
Hello, here is a working reproducible example which crashes R using kmeans or gives empty clusters using the nstart option with R 15.2. library(cluster) kmeans(ruspini,4) kmeans(ruspini,4,nstart=2) kmeans(ruspini,4,nstart=4) kmeans(ruspini,4,nstart=10) ?kmeans either we got empty always clusters and or, after some further commands an segfault. regards, Detlef Groth ------------ [R] Empty
2005 Sep 20
2
script.aculo.us: pause before effect.appear
I''ve created a simple script (below) which calls the effect.appear script in order to make a group of items appear at the page load. I would like to have the images randomly appear at different times; e.g. the 3rd image might start appearing 2 seconds after load, the 6th image immediately after load, the first image 1 second after load, etc... How can I achieve this affect? ---
2004 Sep 06
1
A naive lsoda question....
Hello, I am an R newbie, trying to use lsoda to solve standard Lotka-Volterra competition equations. My question is: how do I pass a parameter that varies with time, like say, phix <- 0.7 + runif(tmax) in the example below. # defining function lotvol <- function(t,n,p){ x <- n[1]; y <- n[2] rx <- p["rx"]; ry <- p["ry"] Kx <-
2007 Jul 09
1
factanal frustration!
Hi. It seems that nearly every time I try to use factanal I get the following response: >faa2db1<-factanal(mretdb1,factors=2,method="mle",control=list(nstart=25)) Error in factanal(mretdb1, factors = 2, method = "mle", control = list(nstart = 25)) : unable to optimize from these starting value(s) > In the case cited above, mretdb1 is synthetic data created
2005 Dec 02
1
k-means / role of 'nstart'
Hello, the k-means {stats} help and the Hartigan&Won paper say nothing about the way random sets works (parameter nstart). I would expect to get the different results for each random initial set but I always obtain only one result: how is it selected? Charles Raux
2009 Mar 28
0
R: Fortran 90 etc.
I have tried to compile the working Fortran-90 routines (see attachment) to interface them with R. The compiler automatically caled by R CMD command line prints a bunch of error messages (as follows). I think I'm better off translating the Fortran implementation into R ... which is what I hoped I could avoid. Maura host705:Desktop mauede$ R CMD SHLIB ford.f90 gfortran -arch i386
2009 Jun 10
1
Weird behavior in receive_data function
Dear List, I'm trying to get diff/removed data and it's offset out. So I write a functions in receive_data. When I run backup, I found there is a weird behavior which I don't understand. i = recv_token(f_in, &data) will receive (i = -1, offset2 = 0) some where in the middle of the transfer procedure. That's to say, it's going to transfer the first data block from sender,
2013 Feb 03
1
Empty cluster / segfault using vanilla kmeans with version 2.15.2
Dear experts, I am encountering a version-dependent issue. My laptop runs Ubuntu 12.04 LTS 64-bit, R 2.14.1; the issue explained below never occurred with this version of R My desktop runs Ubuntu 11.10 64-bit, R 2.13.2; what follows applies to this setup. The data I'm clustering is constituted by the rows of a 320 x 6 matrix containing integers ranging from 1 to 7, no missing data. I applied
1999 Oct 22
1
factors in glm
Is there any logical reason why glm prints out the labels of factor levels after variable names when baseline contrasts (contr.treatment) are used but the codes for the levels when mean contrasts (contr.sum) are used? Jim -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info",
2013 Jun 24
1
K-means results understanding!!!
Dear members. I am having problems to understand the kmeans- results in R. I am applying kmeans-algorithms to my big data file, and it is producing the results of the clusters. Q1) Does anybody knows how to find out in which cluster (I have fixed numberofclusters = 5 ) which data have been used? COMMAND (kmeans.results <- kmeans(mydata,centers =5, iter.max= 1000, nstart =10000)) Q2) When I
2009 Sep 29
4
How can I avoid a for-loop through sapply or lapply ?
Through converting a miRNAs file from FASTA to character format I get a vector which looks like the following: > nml [1] "hsa-let-7a MIMAT0000062 Homo sapiens let-7a" [2] "hsa-let-7b MIMAT0000063 Homo sapiens let-7b" [3] "hsa-let-7c MIMAT0000064 Homo sapiens let-7c" [4] "hsa-let-7d MIMAT0000065 Homo sapiens
2005 Jun 14
1
KMEANS output...
Using R 2.1.0 on Windows 2 questions: 1. Is there a way to parse the output from kmeans within R? 2. If the answer to 1. is convoluted or impossible, how do you save the output from kmeans in a plain text file for further processing outside R? Example: > ktx<-kmeans(x,12, nstart = 200) I would like to parse ktx within R to extract cluster sizes, sum-of-squares values, etc., OR save ktx in
2005 Jun 01
1
Problem with fPortfolio
Hello, I hesitate to call this a bug, because I could have forgotten something important, but the MarkowitzPortfolio example in fPortfolio does not work for me. Here's my code: > library(fPortfolio) > >xmpPortfolio("\nStart: Load monthly data set of returns > ") > data(berndtInvest) > # Exclude Date, Market and Interest Rate columns from data
2009 Dec 11
1
cluster size
hi r-help, i am doing kmeans clustering in stats. i tried for five clusters clustering using: kcl1 <- kmeans(as1[,c("contlife","somlife","agglife","sexlife",                         "rellife","hordlife","doutlife","symtlife","washlife",                       
2009 Jun 01
1
LM/GLM can't find weights vector from within a function (PR#13735)
Full_Name: Alberto Gaidys Version: 2.9.0 OS: Mac OS X 10.5.7 Submission from: (NULL) (201.81.185.155) When calling LM or GLM from within a function, R gives a message error that it can't find the specified weights object "Erro em eval(expr, envir, enclos) : objeto 'W' n?o encontrado" (Error in eval(expr, envir, enclos) : object 'W' not found). The call from within
2008 Sep 09
1
Addendum to wishlist bug report #10931 (factanal) (PR#12754)
--=-hiYzUeWcRJ/+kx41aPIZ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Hi, on March 10 I filed a wishlist bug report asking for the inclusion of some changes to factanal() and the associated print method. The changes were originally proposed by John Fox in 2005; they make print.factanal() display factor correlations if factanal() is called with rotation =
2006 Jan 07
1
Clustering and Rand Index
Dear WizaRds, I am trying to compute the (adjusted) Rand Index in order to comprehend the variable selection heuristic (VS-KM) according to Brusco/ Cradit 2001 (Psychometrika 66 No.2 p.249-270, 2001). Unfortunately, I am unable to correctly use cl_ensemble and cl_agreement (package: clue). Here is what I am trying to do: library(clue) ## Let p1..p4 be four partitions of the kind
2012 Jan 14
1
Error: unexpected '<' in "<" when modifying existing functions
Hi. I am trying to modify kmeans function. It seems that is failing something obvious with the workspace. I am a newbie and here is my code: myk = function (x, centers, iter.max = 10, nstart = 1, algorithm = c("Hartigan-Wong", + "Lloyd", "Forgy", "MacQueen")) + { + do_one <- function(nmeth) { + Z <- switch(nmeth, { + Z