Displaying 20 results from an estimated 700 matches similar to: "Error: unexpected '<' in "<" when modifying existing functions"
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
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
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
2004 Jul 21
0
loglin( tab, margin, start = bad.start ) kills R (PR#7123)
> tab <- array( sample(3^5), rep(3,5) )
> loglin( tab, list(1,2,3,4,5) )[[1]] # AOK
2 iterations: deviation 5.456968e-12
[1] 10909.89
> loglin( tab, list(1,2,3,4,5), c(1,2,3) )[[1]] # OUCH!
Process R bus error at Wed Jul 21 17:03:55 2004
this is inconsistent - sometimes issuing this msg several times before
barfing:
Error in switch(z$ifault, stop("This should not
2013 Jan 24
1
Help regarding kmeans output. need to save the clusters into different directories/folders.
Hi Team,
I am trying to run kmeans in R, and I need to save the different clusters
into different folders. How can I achieve this?
# this is how my data looks.
$ *cat 1.tsv | head*
userid bookid rating bookTotalRatings bookAvgRating
userTotalRatings userAvgRating
1 100 0 24 2.7916666666666665 291 2.6735395189003435
2 200 7 24 2.9583333333333335 6 7.0
2010 Aug 18
1
Plotting K-means clustering results on an MDS
Hello All,
I'm having some trouble figuring out what the clearest way to plot my
k-means clustering result on an my existing MDS.
First I performed MDS on my distance matrix (note: I performed k-means on
the MDS coordinates because applying a euclidean distance measure to my raw
data would have been inappropriate)
canto.MDS<-cmdscale(canto)
I then figured out what would be my optimum
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",
2010 Dec 02
1
kmeans() compared to PROC FASTCLUS
Hello all,
I've been comparing results from kmeans() in R to PROC FASTCLUS in SAS and
I'm getting drastically different results with a real life data set. Even
with a simulated data set starting with the same seeds with very well
seperated clusters the resulting cluster means are still different. I was
hoping to look at the source code of kmeans(), but it's in C and FORTRAN and
2005 Aug 19
2
tackle with error
Dear sir;
may you drop me some idea how can i get rid of following error message:
Error in switch(nmeth, { : NA/NaN/Inf in foreign function call (arg 1)
i dont know what does nmeth and ther rest of error message mean? i have
a file which contains 460 rows and 174 columns including missing value
as NA.
Regards,
Mostafa
2012 Apr 04
1
Shapiro-Wilk cpoefficients: 2 Qs
Greetings!
I want to have the coefficients that R uses in shapiro.test()
for the Shapiro-Wilk test for a prticular sample size, i.e.
the a[i] in
W = Sum(a[i]*x[i])/(Sum(x[i] - mean(x))^2)
(where the x[i] are sorted). Two questions:
Q1:
Is there a readymade R function from which I can extract these?
Q2:
I was wondering if I might be able to modify the code for the
function shapiro.test() so
2009 Aug 06
0
K-means clustering with NA
I am running a k-means clustering code in R : mydata_kmeans5 <-
kmeans(mydata, centers=5).. But the problem is that the data is having some
"NA" in it. So R is showing me a message :Error in switch(nmeth, { :
NA/NaN/Inf in foreign function call (arg 1)
In addition: Warning messages:
1: In switch(nmeth, { : NAs introduced by coercion
2: In switch(nmeth, { : NAs introduced by
2003 Dec 10
3
expressing functions
# Why does expressing one function
require(ctest)
t.test
# return only
function (x, ...)
UseMethod("t.test")
<environment: namespace:ctest>
# but expressing another function
shapiro.test
# returns more complete code?
function (x)
{
DNAME <- deparse(substitute(x))
x <- sort(x[complete.cases(x)])
n <- length(x)
if (n < 3 || n > 5000)
2008 May 09
2
K-Means Clustering
Hello,
I am hoping you can help me with a question concerning kmeans clustering
in R. I am working with the following data-set (abbreviated):
BMW Ford Infiniti Jeep Lexus Chrysler Mercedes Saab Porsche
Volvo
[1,] 6 8 2 8 4 5 4 4 7 7
[2,] 8 7 4 6 4 1 6 7 8 5
[3,] 8 2 4
2009 Apr 26
2
eager to learn how to use "sapply", "lapply", ...
After a year my R programming style is still very "C like".
I am still writing a lot of "for loops" and finding it difficult to recognize where, in place of loops, I could just do the
same with one line of code, using "sapply", "lapply", or the like.
On-line examples for such high level function do not help me.
Even if, sooner or later, I am getting my R
2008 Mar 12
1
Problem when calling FORTRAN subroutine (dll)
Hello,
I am trying to call a FORTRAN subroutine from R. The Fortran code is @:
http://lib.stat.cmu.edu/apstat/206
It performs a bivariate isotonic regression on a rectangular grid (m X n) matrix. I used the g77 compiler and successfully created a dll file and it also loads successfully from R. But somehow the programs fails to run properly. (I do get the correct result when I compile the
2001 Jul 29
1
Compiling R (1.3.0) on AIX (4.3) fails (PR#1034)
Hi,
This email reports bugs in acinclude.m4, src/library/tcltk/src/Makefile,
and share/perl/Rd2contents.pl. It is based on R-patched.tgz from 07/27/2001
(R 1.3.0) and comes from trying to compile R on AIX 4.3.
1) acinclude.m4: A string on line 3096 starts with a single quote: ' but
is terminated with a double quote: ". (This leads to the weird error
message that configure can't
2008 Nov 21
1
Bug in Kendall for n<4?
> library(Kendall)
> Kendall(1:3,1:3)
WARNING: Error exit, tauk2. IFAULT = 12 <<<<<<
tau = 1, 2-sided pvalue =1
I believe Kendall tau is well-defined for this case and the reported
value is correct; isn't it a bug to give a warning? (And if, e.g.,
the pvalue is not well-defined in this case, wouldn't it be better to
return NA or NaN or something?) Also,
2000 Apr 11
0
aggregate.ts (PR#514)
aggregate.ts does not behave in the same way as the equivalent
method aggregate.rts in S-PLUS. In particular it
- changes the start of the time series
- tends to have a length which is 1 shorter
For example:
R> x <- ts(1:10)
R> aggregate(x, nfreq=0.5, FUN=min)
Time Series:
Start = 2
End = 8
Frequency = 0.5
[1] 2 4 6 8
S> x <- rts(1:10)
S> aggregate(x, nf=0.5, fun = min)
[1]
2014 Oct 31
0
[PATCH 1/3] fish: rl.{c, h} - escaping functions for readline
From: Maros Zatko <mzatko@redhat.com>
---
fish/rl.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
fish/rl.h | 32 +++++++++++++
2 files changed, 190 insertions(+)
create mode 100644 fish/rl.c
create mode 100644 fish/rl.h
diff --git a/fish/rl.c b/fish/rl.c
new file mode 100644
index 0000000..bb8fd62
--- /dev/null
+++ b/fish/rl.c
@@ -0,0 +1,158 @@
+/* guestfish -
2012 Jun 27
1
Error: figure margins too large
Hello,
I am running cluster analysis, and am attempting to create a graph of my clusters. I keep on getting an error that says that my figure margins are too large.
d <- file.choose()
d <- read.csv(d,header=TRUE)
mydataS <- scale(d, center = TRUE, scale=TRUE)
#Converts mydataS from a matrix to a data frame
mydataS2 <- as.data.frame(mydataS)
#removes "coden"