Displaying 20 results from an estimated 400 matches similar to: "how to define method for "+" function in a new class"
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
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 <-
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
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
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]]
2008 Mar 17
1
problems with rgl in Ubuntu 'gutsy'
Dear R users/gurus,
I have recently installed Ubuntu 7.10 (Gutsy) on my Dell Latitude D520.
First time for me, as I have always used Fedora.
R installation using "apt" has proceeded fine, both for r-base and r-base-dev.
Next, I need to install various other packages, "rgl" being first in the line.
I have sorted some preliminaries by installing headers for X11 and Mesa:
sudo
2011 May 19
3
A better way to do this
Hello gurus,
I have a dataframe containing two groups viz., 'control' and 'case', each of
these groups contains longitudinal data for 100 subjects. I have to plot all
these subjects on a single chart and then put a regression line for each of
the group for all the subjects. I have written a function to do the chart
grpcharts<-function (dat, group,group2,molecule,cutoff){
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))
}
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 Aug 10
3
Hitachi wip5000
Hi all,
Saw on the net the wip5000 SIP wireless phone from Hitachi, a suprising rig.
As anyone successfull in making it work with Asterisk?
If so, how do you like it?
Regards,
Francois
Random Thought:
---------------
Molecule, n.:
The ultimate, indivisible unit of matter. It is distinguished
from the corpuscle, also the ultimate, indivisible unit of matter, by a
closer resemblance to
2015 Jul 17
11
[Bug 91373] New: Nouveau fills kern.log with gigabytes of data when molecule screensaver is ran
https://bugs.freedesktop.org/show_bug.cgi?id=91373
Bug ID: 91373
Summary: Nouveau fills kern.log with gigabytes of data when
molecule screensaver is ran
Product: xorg
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
2012 Nov 06
2
[LLVMdev] Help needed on debugging llvm
On 6 November 2012 14:52, Duncan Sands <baldrick at free.fr> wrote:
> Hi Anitha,
>
>
> On 06/11/12 10:19, Anitha Boyapati wrote:
>
>> Hi Duncan
>> I am facing a build error about __builtin_iceil
>>
>
> it's surely just that dragonegg doesn't have any support for this builtin.
>
ok. Just verified that Target.cpp and x86_builtins do not have
2008 Apr 19
2
problem in caluclaring the multiple regression
I am trying to calculate the regression for the follwing input data stored in
'data.txt' file.I am reading this and storing it in the variable i .then i
am trying to get the predicted value using f1 as dependent and others
f2....f10 as independent variables.It is giving the following error. Also i
want that i shoul get one predicted value for each row(y). What should i do.
Please help me
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
2006 Feb 17
4
ssh x11 forwarding problem
I'm running into an a problem with x11 forwarding over ssh
I'm trying to run an application (rasmol - molecule viewing program)
which when using the the default setup for x11 forwarding causes the
following error:
X Error of failed request: BadAccess (attempt to access private
resource denied)
Major opcode of failed request: 132 (MIT-SHM)
Minor opcode of failed request: 1
2010 Jan 18
0
new R package. How to hide data file
Dear R community,
I'm in the process of writing a package.
One of the functions reads a whole ascii file, full of data:
> SYMINFO <- scan("/file/full/of/data.txt",what="character",sep="\n",quiet=TRUE)
SYMINFO is now an array character with roughly 14000 elements.
I thought the best way to use this file in the package was to list it, together with the
1999 Jul 20
2
R 0.65 and AIX: if it quacks like a duck...
Hi,
this relates to R-devel of 1999/July/18. I will outline what I had
to change to get R to compile with cc then with gcc. Note that R
compiled with cc works, R compiled with gcc is broken.
--> Compile with cc:
1) Edit src/main/saveload.c: disable the undefine! With the #undef
_XOPEN_SOURCE_EXTENDED the compilation dies an untimely death.
(And the header files are not as badly broken
2016 Dec 14
2
A *very* strange C 7 question
Ok, I've got a user, I just built him a C 7 machine. The new one has an
ATI card; the old had an NVidia card. I got it to use the radeon driver,
so it looks ok (he has a very wide screen). However... he has a program
that renders a molecule (which you see as many connected lines, in various
colors). However... it used to display it against a black background, and
suddenly, it's a