From Gilbert.Ritschard at unige.ch Fri Feb 1 09:01:05 2013 From: Gilbert.Ritschard at unige.ch (Gilbert Ritschard) Date: Fri, 1 Feb 2013 08:01:05 +0000 Subject: [Traminer-users] modify legend in plot from WeightedCluster package In-Reply-To: References: Message-ID: <66ABD43696E3DB4687E0BB396A76E5F12A190B@golf.isis.unige.ch> Hi Jeremy, The legend position is controlled with the legendpos argument: plot(pam1, legendpos="topleft") For more control on the legend such as on the number of columns you can make the plot with the "withlegend=FALSE" argument and then use the R legend function (type ?legend for details). Here is an example: plot(pam1, stat = c("PBC", "HG", "ASW"), legendpos="top", withlegend=F) legend("top", c("PBC", "HG", "ASW"), fill = c("black", "red", "green"), ncol = 2) Gilbert From: traminer-users-bounces at lists.r-forge.r-project.org [mailto:traminer-users-bounces at lists.r-forge.r-project.org] On Behalf Of Jeremy Reynolds Sent: Thursday, January 31, 2013 17:25 To: traminer-users at lists.r-forge.r-project.org Subject: [Traminer-users] modify legend in plot from WeightedCluster package Dear TraMineR Users, I am using the WeightedCluster library and have produced a graph of the stopping rule statistics that it provides through the wcKMedRange command. The code below produces a very useful plot, but the legend hides a portion of the graph. Does anyone know how I can move the existing legend to the top left corner and perhaps make it two columns instead of one? Thanks, Jeremy pam1 <- wcKMedRange(diss4vs, kvals = 2:10, weights = aggbhps$aggWeights) plot(pam1) -- ******************** Dr. Jeremy Reynolds Associate Professor Undergraduate Coordinator Department of Sociology 117 Baldwin Hall University of Georgia Athens, GA 30602-1611 Phone: (706) 583-8072 Web: http://uga.edu/soc/people/faculty/reynolds_jeremy.php Fax: (706) 542-4320 -------------- next part -------------- An HTML attachment was scrubbed... URL: From pit.blavier at gmail.com Mon Feb 11 13:14:42 2013 From: pit.blavier at gmail.com (Pierre Blavier) Date: Mon, 11 Feb 2013 13:14:42 +0100 Subject: [Traminer-users] pb of memory to compute distance matrix Message-ID: Hi TramineR-users, 2 questions : 1) pb of memory computing distance matrix Everything works perfectly (couts <- seqsubm(seq.seq, method="CONSTANT", cval=2) / range(couts) / round(couts, 2) ) Until : seq.om <-seqdist(seq.seq, method="OM",indel=1.1, sm=couts) I obtain : Erreur : impossible d'allouer un vecteur de taille 1.5 Go R(351,0xac7312c0) malloc: *** mmap(size=1617408000) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug R(351,0xac7312c0) malloc: *** mmap(size=1617408000) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug My dataset is rather large (43 periods, n=20 000, 6 states) but it is rather suprising, how can I solve the problem ? ? (I have a brand-new macintosh with 8Go of live memory, so I think this is not the pb). 2) How can we use the weights in TramineR, for example in order to make it take them into account in commands like > seqdplot(seq.seq, withlegend=T, title="1988", weights="pond") It does not seem to work? Thanks a lot and best regards, Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexis.gabadinho at unige.ch Mon Feb 11 14:38:09 2013 From: alexis.gabadinho at unige.ch (Alexis Gabadinho) Date: Mon, 11 Feb 2013 14:38:09 +0100 Subject: [Traminer-users] pb of memory to compute distance matrix In-Reply-To: References: Message-ID: <5118F441.4070605@unige.ch> Hi Pierre, I think this is a lack of memory, a 20000x20000 distance matrix requires a huge amount of memory. You can try the "full.matrix=FALSE" option so that only half of the -symmetric- distance matrix is returned by the seqdist function. Remember also that having other big objects in your current R environment, like other distance matrices - uses a part of the available memory. Regarding weights, these are defined once when creating a sequence object with seqdef, and used automatically by seqdplot and other plot and sequence analysis functions. Please see our freely available article in the journal of statistical software and help(seqdef) for more details. All the best, Alexis Le 11. 02. 13 13:14, Pierre Blavier a ?crit : > > Hi TramineR-users, > > 2 questions : > > > 1) pb of memory computing distance matrix > > Everything works perfectly (couts<- seqsubm(seq.seq, > method="CONSTANT", cval=2) / range(couts) / round(couts, 2) ) > > Until : > > seq.om <-seqdist(seq.seq, method="OM",indel=1.1, sm=couts) > > I obtain : > > Erreur : impossible d'allouer un vecteur de taille 1.5 Go > > R(351,0xac7312c0) malloc: *** mmap(size=1617408000) failed (error code=12) > > *** error: can't allocate region > > *** set a breakpoint in malloc_error_break to debug > > R(351,0xac7312c0) malloc: *** mmap(size=1617408000) failed (error code=12) > > *** error: can't allocate region > > *** set a breakpoint in malloc_error_break to debug > > My dataset is rather large (43 periods, n=20 000, 6 states) but it is > rather suprising, how can I solve the problem ? ? (I have a brand-new > macintosh with 8Go of live memory, so I think this is not the pb). > > 2) How can we use the weights in TramineR, for example in order to > make it take them into account in commands like > > > seqdplot(seq.seq, withlegend=T, title="1988", weights="pond") > > It does not seem to work... > > Thanks a lot and best regards, > > Pierre > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > Traminer-users mailing list > Traminer-users at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users -------------- next part -------------- An HTML attachment was scrubbed... URL: