You can also try kml3d. You can either use some default distances or define
your own.
http://www.jstatsoft.org/v65/i04/paper
Christophe
--
View this message in context:
http://r.789695.n4.nabble.com/TSclust-multivariate-time-series-clustering-tp4711517p4711555.html
Sent from the R help
Thanks a lot for your time. Two questions:
1/ Shall I submit a bug report?
2/ In your point 2), I cannot find the verb... Is my english not good enough
to understand it, or is it a not-ended sentence?
:-)
--
View this message in context:
Hi all,
There is a compatibility issue between the package 'lme4' and my package
'kml'. I define the [ operator. It works just fine in my package (1). If I
try to use the lme4 package, then it does no longer work (2). Moreover, it
has some kind of strange behavior (3). Do you know what is wrong?
So easy!
Thanks a lot.
--
View this message in context:
http://r.789695.n4.nabble.com/is-na-for-S4-object-tp4708201p4708234.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and
Hi the list,
I have a variable y that is either NA or some S4 object. I would like to
know in which case I am, but it seems taht is.na does not work with S4
object, I get a warnings:
--- 8
setClass(myClass,slots=c(x=numeric))
if(runif(1)0.5){a - new(myClass)}else{a - NA}
is.na(a)
Hi the list,
I include some C code in a R function using .C. The argument is a character.
I find how to acces to the characters one by one:
--- 8 --- C
void dealWithCharacter(char **chaine, int *size){
int i=0;
for(i=0;i*size;i++){
Rprintf(Le caractere %i est
Hi the list,
I am including some C code in a R program using the .C interface. I want to
deal with NA values, but the result is strange:
--- 8 C code ---
void hein(int *a, int *b, int* c){
*c = (*a + *b);
}
--- 8 ---
--- 8 - R
Damm... I am reading the WRE, but I am only at page 83. I start to try to
play with NAOK to early.
Anyway, exactly the same function for numeric instead of integer will give
different results:
--- 8 C code ---
void hein2(double *a, double *b, double* c){
*c = (*a + *b);
}
Hi all,
I am drawing some 3D surfaces using the Triangle tools (package misc3) and
drawScene.rgl. Do you know if it is possible to add axes and graduation on
the scene?
Christophe
--
View this message in context:
Hi the list,
As far as I understand, a possibility to create a scene is to provide a
list of triangles to the function makeTriangles. Is there also a way to turn
the data that are used by plot3d into a scene? I would like to write:
--- 8 -
M - matrix(runif(12),4)
plot3d(M)
### Some
Hi the list,
Do you know if getGraphicsEvent can detect the use of keys combinaison like
shift+arrow or Crlt+arrow ?
Best
Christophe
--
View this message in context:
http://r.789695.n4.nabble.com/shift-arrow-in-getGraphicsEvent-tp4631419.html
Sent from the R help mailing list archive at
Thanks Bill,
In France, there is a famous joke about politician: Tell me what you need,
I will explain you how to do without... But in my specific case, I can not
use the classical - and [, it is why I ask my question.
More precisely, my fonction fooBis can be very long to end. So I want to
Hi the list,
I am writing a function in which I need to affect a variable on a higher
level. My fnction could be:
++
fooBis - function(x){
nameObject - deparse(substitute(x))
print(nameObject)
assign(nameObject,4,envir=parent.frame())
}
fooBis(e)
[1] e
e
[1] 4
Hi Jonas, hi the list
Try adding
LazyData: yes
to the DESCRIPTION file.
I am a bit surprise by this answer since I found in writing R extentions,
that lazydata is ignore since version 2.14.
But I have the same problem, I do not manage to export contants. So how can
I do that?
My constant
Either in Data and say
LazyData: yes
It works, thanks a lot.
Since the constant from above is probbaly only used within the NAMESPACE;
No, I am write four package. The first is all the tools used by the
three others. It includes the constants, so the others needs to see
them.
Hi the list,
I try to use callNextMethod in a setteur ([-) but it does not work.
Any raison ?
Any other option ?
--- 8 --
### Class B0 ###
setClass(B0 , representation(b0 = numeric))
setReplaceMethod([,B0,function(x,i,j,value){x@b0 - -value})
a - new(B0)
a@b0 - 3
a
a[b0] - 3
a
My working example is in the package kml3d. The class 'clusterLongData' is
define by inehirance from class 'listClustering' and 'longitudinalData'. But
as you say, it is unusual, I will try an other way.
Thank you for your help.
Christophe
--
View this message in context:
Hi the list,
I define a class 'C' that inherit from two classes 'A' and 'B'. 'A' and 'B'
have no slot with similar names.
setClass(
Class=C,
contains=c(A,B)
)
To define the get operator '[' for class C, I simply use the get of A or
B (the constante 'SLOT_OF_A' is a
I am not familiar with wiki (wich one?) but here is the code without
line-break
--- 8 --
%\usepackage{Sweave}
\RequirePackage[T1]{fontenc}
\RequirePackage{graphicx,ae,fancyvrb}
\IfFileExists{upquote.sty}{\RequirePackage{upquote}}{}
\setkeys{Gin}{width=0.8\textwidth}
Hmmm.
I guess I did something wrong since it does not work.
The file r2lhOutput.pdf is in the folder \inst\doc\
In the Rd file (for example in rthb.Rd) I add
See \url{/library/r2lh/doc/r2lhOutput.pdf} for display detail.
But the link leads to a dead link.
I did not manage to find the file
Hi the list,
I would like to put a link in a .Rd file to a PDF document (not a vignette,
just a
regular PDF). I put my PDF in the folder inst/doc/toto.pdf. In the bible
2.5
Cross-references, I read that \link can point to PDF file, but I did not
manage to do
it. How shall I do that ?
Christophe
Thanks, Duncan.
And where am I suppose to put the file toto.pdf ?
In /myPack/doc/ or in myPack/inst/doc/
Christophe
--
View this message in context:
http://r.789695.n4.nabble.com/Link-to-a-pdf-document-tp2271973p2272016.html
Sent from the R help mailing list archive at Nabble.com.
Thanks
On 29/06/2010 6:55 AM, cgenolin wrote:
Thanks, Duncan.
And where am I suppose to put the file toto.pdf ?
In /myPack/doc/ or in myPack/inst/doc/
The latter. When your package is installed, it will be installed to
myPack/doc.
Duncan Murdoch
Hi the list,
Using flextClust, we can cluster data using k-mean with some
user-define distances. Is there something similar for fuzzy k-means ?
Christophe
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
Hi all,
In a function, I need to get the name of a variable that has been used to
call the function.
For example, I want:
--- 8 --
toto - 3
fun - function(y){
nameOfY -deparse(substitute(y))
cat(name is ,nameOfY)
}
fun(toto)
# [1] name is toto
--- 8
But deparse(substitute(y))
I need to use the function saveTriangleAsASY in my package. Does it allready
exist in a package or may I unclude it ?
Christophe
--
View this message in context:
http://r.789695.n4.nabble.com/Exporting-an-rgl-graph-tp1872712p2075086.html
Sent from the R help mailing list archive at Nabble.com.
Thanks.
I did write a function cuboid, then 3dLine for joining two points, then
3dLines for more points.
I do create an asy file with your function saveTrianglesAsASY, then I
include the scene.pre in the LaTeX file.
So far, everything works fine.
My last problem is that I did not manage to get
Hi the list,
I use rgl to produce a 3D graph. I would like to show this graph to
some collaborator. Is there a way to save it and send it to someone
else?
Christophe Genolini
__
R-help@r-project.org mailing list
Thanks for you answer. Let me precise my question.
In fact, I do not want to capture a screen, I want to save an object
that can be seen in 3D. With rgl, using my mouse, I can make the object
move. This is what I want to export: an real 3D object that my
collaborator will have the possibility
Hi the list, and merry christmas !
I am using some screen tool (screen, split.screen, close.screen) and at
some point, I get an error :
parameter i in mfg is out of range
What does in mean ? How can I correct it ?
On the web, I find an old message from Giovanni that suggest to erase
all
Hi the list,
I need to compute Gower distance between a specific individual and all
the other individual.
The function DAISY from package cluster compute all the pairwise
dissimilarities of a population. If the population is N individuals,
that is arround N^2 distances to compute.
I need
If you used daisy, is there a problem with converting the resulting
object to a full dissimilarity matrix and extracting the relevant
row/column you need for the target site?
Well, the lost of efficiantcy is huge. I need to compute the distance
several time on data base that count 1000 or
Martin Maechler [EMAIL PROTECTED] a écrit :
CG == Christophe Genolini [EMAIL PROTECTED]
on Sat, 26 Jul 2008 12:12:12 +0200 writes:
CG Martin Maechler [EMAIL PROTECTED] a écrit :
CG == Christophe Genolini [EMAIL PROTECTED]
on Tue, 22 Jul 2008 19:04:37 +0200
Martin Maechler [EMAIL PROTECTED] a écrit :
CG == Christophe Genolini [EMAIL PROTECTED]
on Tue, 22 Jul 2008 19:04:37 +0200 writes:
CG Prof Brian Ripley [EMAIL PROTECTED] a écrit :
On Tue, 22 Jul 2008, [EMAIL PROTECTED] wrote:
Hi the list (well, half of the list, only
Hi the list (well, half of the list, only the one who are not on holidays...)
I am trying to make an S4 package. When I run it on a console,
everything seems ok. When I run R CMD check, I got an error --- 8
--
Error in setMethod(plot, ClassX, function(x, y) { : no existing
Prof Brian Ripley [EMAIL PROTECTED] a écrit :
On Tue, 22 Jul 2008, [EMAIL PROTECTED] wrote:
Hi the list (well, half of the list, only the one who are not on
holidays...)
I am trying to make an S4 package. When I run it on a console,
everything seems ok. When I run R CMD check, I got an
c Christophe
c == cgenolin [EMAIL PROTECTED] on Tue, 03
Jun 2008 09:55:15 +0200 writes:
provide commented, minimal, self-contained,
reproducible code. Please do -- both --
c Sorry... Usualy, I do...
c --- 8 userA - function(x)x+1 privateA
The R Logo was done manually (using software) in several
phases IIRC.
Well, that's not a surprise. Let me rephrase my question : is the logo
drawer still on this list ? Did you use gimp ? A specific filter ? or a
scriptfu ?
Christophe
__
Hi the list,
When we use package.skeleton, it create some file in the man
directorie. - If we use package.skeleton with namespace=FALSE, it
create a file toto-internal.Rd
- If we use package.skeleton with namespace=TRUE, it does not create
the file toto-internal.Rd
Why is that ?
Christophe
Thanks, Berwin,
So the main idea is - With NAMESPACE, you do not document the
not-for-user because they don't have to be documented
- Witout NAMESPACE, you document the not-for-user with a
toto-internal.Rd that say not for user
That's clear.
Is it stupid to consider to use both technique at
Thanks for your answer.
I guess writing
a regular expression that says export everything that does not start
with a dot but do not export foo and bar would be not trivial to write
(at least not for me).
The NAMESPACE created by package.skeleton contain a single line :
Hi
I entirely agree with Patrick, and would add 'why do you think a 5
square window is appropriate on both 8 and 30 monitors?'.
I do not realy care about 5, 8 or 20, I use it when I devellop, I
will remove it for the final package.
I just want the two windows to not be one on the top of the
x11(xpos = 1) # makes one on the left
x11(xpos = -1) # makes one on the right
Thanks you very much, I'll try that.
Is there any difference between x11 and X11?
Christophe
Patrick Connolly [EMAIL PROTECTED] a écrit :
On Mon, 16-Jun-2008 at 09:43AM +0200, [EMAIL PROTECTED] wrote:
I do
Hi the list,
I write a package for clusterizing longitudinal data using a non
parametric algorithm. I develop the package under windows. To be as
user friendly as possible, the package use some graphical procedure to
show to the user the evolution of the cluster construction, and to
export
- function(x).userB(.privateB(x))
userD- function(x)userA(.userB(x))
privateD - function(x)privateA(.privateB(x))
--- 8
c == cgenolin [EMAIL PROTECTED]
on Tue, 03 Jun 2008 00:32:13 +0200 writes:
c Hi the list.
c I got a probleme with R CMD check. I run a package.skeleton
I find the problem: the name of my base directory (the one that contain
R, man and test) was not the same than the name of the package...
I thaught this was allowed, I guess I was wrong.
Christophe
c == cgenolin [EMAIL PROTECTED]
on Tue, 03 Jun 2008 09:55:15 +0200 writes:
provide
Hi the list.
I got a probleme with R CMD check. I run a package.skeleton on a very
simple code (four toy function, no probleme with the R CMD build). But
on the R CMD check packClassique, I get :
* checking for unstated dependencies in R code ... WARNING
Erreur dans .find.package(package,
Hi the list,
I do not manage to build a package using package.skeleton.
My pacakge in called 'partition'
I run package.skeleton, then I write the Rd file.
R CMD check partition is ok
But R CMD build --binary partition does not compile. I get :
WARNING
* some HTML links may not be found
Hi the list
I do not manage to build a package using package.skeleton.
My pacakge in called 'partition'
I have no probleme to source the file. Then I run
package.skeleton(partition)
I get :
Saving function and data...
Error in file(file,ifelse(append,a,w)):
impossible to open the connexion
Hi the list,
I write a short function to draw lines in 3D, showing then turning.
At some point, I add delais to slow down the rotation.
So two questions:
1) I try to find a library to draw animate lines in 3D but I did not
find. That surprise me since it is very simple to do. Did I forget to
Hi the list
Is it possible to add one argument to the arguments contain in ... ?
I would like to do :
f - function(ttt,...)[
if(... does not contain the args uuu)
[add uuu=3 to ...]
else[]
g(ttt,...)
]
More precisely, my function g is a callNextMethod()
Thanks
Christophe
Hi the list,
I need to use getGraphicsEvent to plot two graph. On the following toy
example:
- the function b is ploting two graph depending on a parameter
- the function a is calling b according to some user answers. It is
suppose to call b until the user press Return, but it does not.
b -
Sorry to come back on callNextMethod, I am still not very confident about it.
Consideres the following (there is a lot of code, but very simple with
almost only some cat) :
--
setClass(A,representation(a=numeric))
setValidity(A,function(object){cat( * Valid A *\n);TRUE})
Hi Martin
I am re reading all the mail we exchange with new eyes because of all
the thing I learn in the past few weeks. That very interesting and some
new question occurs...
***
Once, you speak about callGeneric :
setClass(A, representation(x=numeric))
callGeneric is an advanced topic.
Ok, when I will be older :-)
*
This works :
setMethod(initialize,B,
function(.Object,..., yValue){
callNextMethod(.Object, ..., y=yValue)
return(.Object)
})
new(B,yValue=3)
but this
The code example is incomplete, so I don't really know why one
version assigned y=3 for you and the other did not; for me, neither
version did the assignment.
I probably add the return in the mail without imagining il will change things.
My question was more on the use of ... versus the
Not easily.
Ok
So you could probably write a function that tracked down and copied
all the pieces, but it's not easy.
b. Well, you're right, it's not worth it.
So I will define a class ClusterizLongData then a constructor
cld - clusterizLongData - function(){new(ClusterizLongData)}
Well well well...
To summarize : let assume that A is a class (slot x) and C is a class
containing A (A and slot y) - as(c,A) calls new(A). So new(A) HAS
TO works, you can not decide to forbid empty object (unless you define
setAs(C,A) ?)
- In addition, any test that you would like to set in
Hi Martin, thanks for your answer
But a couple
of other quick points. I would have written
setMethod(initialize, A,
function(.Object, ..., xValue=numeric(0)){
callNextMethod(.Object, ..., x=xValue)
})
I am not that much familiar with S3... In our way of
Hi the list
I define a class A (slot a and b), a class C (slot c and d) and a class
E that inherit from A and B.
I define print(A) and print(B). For print(C), I would like to use both
of them, but I do not see how...
Thanks for your help...
Christophe
Hi the list.
I try to learn the S4 programming. I find the wiki and several doc. But
I still have few questions...
1. To define 'representation', we can use two syntax :
- representation=list(temps = 'numeric',traj = 'matrix')
- representation(temps = 'numeric',traj = 'matrix')
Is
Seems strange to me to define an operator relatively to a very special case.
I have to admit that I do not use 1:1e7 every day :-)
Wouldn't it be more appropriate to define a a:b operator numeric (that
is preserving the initial class of a and b) and in specific case that
need optimization,
Hello the list,
I am trying to write a cleanProgramming function to test the
procedure I use. For example, I want to be sure that I am not using
globals variables. The function findGlobals detect that.
To list the globals used in function fun, the syntax is :
findGlobals(fun,FALSE)$variable
library(codetools)
findGlobals(power)
Thanks for your answer.
In addition, findGlobals(power,FALSE) gives the list of the globals
variables alone :
findGlobals(power,F)
$functions
[1] ^ { - return
$variables
[1] pp
64 matches
Mail list logo