Displaying 20 results from an estimated 900 matches similar to: "cluster analysis"
2009 Aug 12
1
calling a function with dynamically generated buttons
Hallo,
I'm dynamically generating buttons depending on the number of rows of
my dataframe. Every button is supposed to call a function which
generates a plot with the values of one of my dataframe rows.
My code looks like this:
base <- tktoplevel()
plotten <- function(mat, namen, titel) {
midpts <- barplot(height=mat, names.arg = namen, main =
titel, las=2)
2006 Oct 20
6
summing elements in a list of functions
Dear all,
I have looked for an answer for a couple of days, but can't come with any
solution.
I have a set of functions, say:
> t0 <- function(x) {1}
> t1 <- function(x) {x}
> t2 <- function(x) {x^2}
> t3 <- function(x) {x^3}
I would like to find a way to add up the previous 4 functions and obtain a new
function:
> rrr <- function(x) {1+x+x^2+x^3}
without,
2005 Oct 26
4
symbolic math
Hi all!
Does anyone knows if it exists a "symbolic math" package in R, that allows to compute derivatives, integrals, etc.?
Does exist a freeware version of Maple?
Cheers,
Marco
[[alternative HTML version deleted]]
2006 Jul 20
2
failed installing rgl
Dear all,
I have tried installing "rgl" with the usual command:
R CMD INSTALL rgl_0.67-2.tar.gz
Differently from what happened last time I have succesfully installed this
package, this time there was a failure:
...
...g++ -I/usr/lib/R/include -I/usr/lib/R/include -I -DHAVE_PNG_H
-I/usr/include/libpng12 -I/usr/local/include -fpic -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2
2005 Jan 07
1
S4 class no longer accepts matrix in array slot under 2.0.1
I have an S4 class with a slot of class "array", and in upgrading to 2.0.1
(from 1.9.1) I have encountered a change in behaviour. This causes me some
difficulties if I want to allow 2-dimensional arrays in the slot.
The following (in 2.0.1) illustrates the point:
> setClass("foo",representation("array"))
[1] "foo"
> a <-
2010 Jul 07
2
how to define method for "+" function in a new class
Dear R developers,
I have a new class, which I called "Molecule", and have tried to define =
a "+" operation for 2 objects of this class.
This is what I have written so far, although the method is not complete =
(I'm trying to look at it at intermediate stages):
setMethod(
f=3D"+",
signature(x=3D"Molecule",y=3D"Molecule"),
2009 Nov 24
2
convex hull for cluster analysis
Dear R gurus and users,
I seem to have problem finding the right tool for plotting convex hulls over
2D plots, after a cluster analysis. In fact I would like to draw a convex hull
in 2D for a generic group of points. I found a "convhulln", but this doesn't seem
to give me a convex hull. Here is what I do:
> library(mvtnorm)
> Mean <- c(2,1)
> Sigma <-
2009 Jun 18
1
validObject throws non-caught error when slot doesn't exist
I have been retooling an S4 class definition to include another slot and
have found that the methods::validObject function (defined in
methods/R/SClasses.R) in R-devel throws an error that isn't caught
internally (and thus not controllable by 'test' argument) when
retrieving a non-existent slot. The offending line of code is shown below:
> validObject
function (object, test =
2009 Dec 10
1
question about centroid-linkage (cluster analysis)
Dear R community,
I would be greatful if somebody could shed light on the following.
I have created a set of 6 points to check how centroid
agglomeration works in cluster analysis:
> Y <- data.frame(x=c(-1,1,1,-1,10,12),y=c(1,1,-1,-1,0,0))
It is quite intuitive to understand that the last clusters to be joined will be
{1,2,3,4} with {5,6}. Now, the centroid for the first cluster has
2011 Feb 26
2
sourcing a linux file with "system"
Dear R community,
I would like to source a file in my linux system to set a few environment variables.
I have tried:
> system("source /home/james/build//ccp4-6.1.13/include/ccp4.setup")
and got:
sh: source: not found
In fact, using Sys.which("source") I get an empty string.
How can I source that ccp4.setup file from within an R session?
J
Dr James Foadi PhD
Membrane
2005 Jan 09
1
S4 class no longer accepts matrix in array slot under 2.0.1
I have an S4 class with a slot of class "array", and in upgrading to 2.0.1
(from 1.9.1) I have encountered a change in behaviour. This causes me some
difficulties if I want to allow 2-dimensional arrays in the slot.
The following (in 2.0.1) illustrates the point:
> setClass("foo",representation("array"))
[1] "foo"
> a <-
2010 Jul 23
1
greek letters in rgl plot3d
Dear RGL experts,
I haven't been able to add greek letters to my rgl plot3d.
I have tried "expression" with no success.
Here is the interested bit:
> library(rgl)
> cb <- cube3d()
> plot3d(cb,xlab=expression(alpha),ylab="",zlab="",box=FALSE,alpha=0.5)
The expression(alpha) appears as "alpha", rather than as a greek symbol.
I suspect greek
2010 Sep 09
1
rgl and lighting
Dear R community (and Duncan more specifically),
I can't work out how to make additional light sources work in rgl.
Here is the example.
First I create a cube and visualize it:
> cubo <- cube3d(col="black")
> shade3d(cubo)
Next I position the viewpoint at theta=0 and phi=30:
> view3d(theta=0,phi=30)
Next, I want to create a 2nd light source which diffuses red light
2007 Jul 05
3
unexpected result in function valuation
Dear all,
I have a very small script to plot a function. Here it is:
##########################################
sinca <- function(N,th)
{
return(sin((N+0.5)*th)/sin(0.5*th))
}
plot_sinca <- function(N)
{
x <- seq(-5*pi,5*pi,by=pi/100)
y <- rep(0,length=length(x))
for (i in 1:length(x))y[i] <- sinca(N,x[i])
plot(x,y,type="l",ylim=c(0,2*N+4))
return(c(x,y))
}
2010 Jan 25
1
summing a large, partitioned data frame
Dear R community,
I'm trying to develop a fast way of summing specific rows of a large data frame.
Here is an example of the kind of data frames I'm dealing with:
> refls
H K L M/ISYM BATCH I SIGI
43247 1 0 5 21 79 61.44117 2.20553
1040 1 0 5 257 6 15.16316 0.54431
2324 1 0 5 257 5 46.76152 1.67858
31515 1 0 5 259 60 57.97305
2008 Jun 05
2
Fourier Transform
Hello All,
I wanted to perform a fourier transform on high frequency financial data. I
have searched and have not found much on this topic for R. I was wondering
if anyone has used any libraries for it or have come across any papers I may
read.
Many Thanks,
Neil Gupta
[[alternative HTML version deleted]]
2004 Mar 30
1
classification with nnet: handling unequal class sizes
I hope this question is adequate for this list
I use the nnet code from V&R p. 348: The very nice and general function
CVnn2() to choose the number of hidden units and the amount of weight
decay by an inner cross-validation- with a slight modification to use it
for classification (see below).
My data has 2 classes with unequal size: 45 observations for classI and
116 obs. for classII
With
2005 Jan 05
0
matrix no longer "is" array in 2.0.1?
I have an S4 class which extends array and has other slots, and in upgrading
to 2.0.1 (from 1.9.1) I have encountered a change in behaviour. This causes
me some difficulties if I want to allow 2-dimensional arrays in the slot
(which I do).
The following (in 2.0.1) illustrates the point:
> setClass("foo",representation("array"))
[1] "foo"
> a <-
2007 May 31
1
recompile R using ActiveTcl
Dear all,
While running some code requiring the "tcltk" package I have realised that my
version of R was compiled with the Tcl/Tk libraries included in Fedora 6. It
would be for me better to use the ActiveTcl libraries (which I have
under /usr/local), and I'm aware that this probably means to recompile R with
the proper configuration variables.
But...is it by any chance
2019 Feb 06
1
Mount AD home directory and login on Ubuntu Workstations
Hi,
In a school environment, I have a server (NEWTON) that acts as AD DC
(domain DIDATTICA) and another one (EULER) that acts as File Server (Domain
Member of DIDATTICA).
Both of them have Ubuntu Server 16.04.5 LTS and Samba 4.9.1. (At the bottom
I attached their smb.conf).
The users are divided in groups: students, teachers, admin. Each user has a
"home directory" where can save his