[R] [R-pkgs] QCA version 0.4-5

2007-09-09 Thread Adrian Dusa
minimization function, using a shortcut instead of the classical complete and exhaustive algorithm. This new function is faster and uses significantly less memory (50 MB compared to 1.5 GB for large datasets). It should appear soon on CRAN, feedback is welcome. -- Adrian Dusa Romanian Social Data

Re: [R] bars' values on barplot

2007-08-05 Thread Adrian Dusa
plot(my.values, ylim=c(0,11)) text(x, my.values, "wibble", pos=3) # always does what you want, whereas: text(x, 0.4+my.values, "wibble") # doesn't look very nice HTH, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5

Re: [R] Looping through all possible combinations of cases

2007-07-31 Thread Adrian Dusa
h > each possible quartet of cases (i.e., abcd, abce, abcf, etc.) and sums > up their respective values on 'variable'. > > etc. > > Then, at the end I want to capture all possible combinations that were > considered (i.e., what elements were combined in it) and get the va

Re: [R] Levene Test with R

2007-07-06 Thread Adrian Dusa
the homogeneity of variances test, and the recommended ones are: Ansari-Bradley for two groups (i.e. for t.test) Fligner-Killeen for three or more groups (i.e. for ANOVA) hth, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel.

Re: [R] Odp: Odp: pie initial angle

2007-05-29 Thread Adrian Dusa
tial angle, I just needed the position of the slices the way they are. My geometry seems to be poor towards innexistent :) All the best, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21

[R] pie initial angle

2007-05-29 Thread Adrian Dusa
advance, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/

[R] data in packages... a list?

2007-05-22 Thread Adrian Dusa
Dear all, Is it possible to add a list in the data folder when creating a new package? In other words, is data in packages restricted to data.frame only? Thank you, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21

Re: [R] read.spss (package foreign) and SPSS 15.0 files

2007-04-14 Thread Adrian Dusa
e multiple Excel fiels but it seems rather an overkill. In the mean time, I use portable files or export in different formats using a comercial software like StatTransfer (this one is really good). Thanks, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest s

Re: [R] read.spss (package foreign) and SPSS 15.0 files

2007-04-13 Thread Adrian Dusa
Charilaos Skiadas hanover.edu> writes: > [...] > I save as csv format all the time, and it offers me a choice to use > the labels instead of the corresponding numbers. So you shouldn't > have to lose that labelling. This is interesting and I tried to do this as well; I don't have access to an

Re: [R] Sorting rows of a binary matrix

2007-02-22 Thread Adrian Dusa
func(3, 2) # For 3 columns in base 3 myfunc(3, 3) hth, Adrian On Thursday 22 February 2007 15:00, Adrian Dusa wrote: > Hello Serguei, > > Is this what you need? > > myfunc <- function(x) { > create <- function(idx) { > rep.int(c(rep.int

Re: [R] Sorting rows of a binary matrix

2007-02-22 Thread Adrian Dusa
te a matrix that has the rows sorted that way? > > Thanks, > Serguei > [[alternative HTML version deleted]] -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 ___

Re: [R] jump in sequence

2007-01-30 Thread Adrian Dusa
On Tuesday 30 January 2007 16:38, Peter Dalgaard wrote: > >[...snip...] > Is this it? > > > as.vector(outer(0:2,seq(4,22,9),"+")) > > [1] 4 5 6 13 14 15 22 23 24 Indeed it is :)) Thanks, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magu

[R] jump in sequence

2007-01-30 Thread Adrian DUSA
, 3) Then see which are TRUE: which(myvec) [1] 4 5 6 13 14 15 22 23 24 I'd like to avoid creating the whole vector if possible; for very large ones it can be time consuming. There should be a way to only create the proper indexes... Thanks for any hint, Adrian -- Adrian Dusa Romanian Soc

[R] [R-pkgs] version 0.3 of QCA

2007-01-24 Thread Adrian Dusa
ithmic one. This approach openes the way for _exact_ multi-value minimizations, and an even better (and faster) approach is searched for the future versions. Best, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40

Re: [R] multiple bases to decimal (was: comparing two matrices)

2007-01-21 Thread Adrian Dusa
cbind(mat1, conv=colSums(apply(mat1, 1, function(x) x*mbase))) YES! Thank you so much Jim, this made my day :)) Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101

[R] multiple bases to decimal (was: comparing two matrices)

2007-01-21 Thread Adrian Dusa
. Thanks for any hint, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

Re: [R] comparing two matrices

2007-01-21 Thread Adrian Dusa
quot;) > ind2 <- apply(mat2, 1, paste, collapse = "/") > match(ind2, ind1) Oh yes, I thought about that too. It works fast enough for small matrices, but I deal with very large ones. Using paste() on such matrices decreases the speed dramatically. Thanks again, Adrian -- Adrian

Re: [R] comparing two matrices

2007-01-21 Thread Adrian Dusa
On Sun, 2007-01-21 at 00:14 +0200, Adrian Dusa wrote: > > Dear helpeRs, > > > > I have two matrices: > > mat1 <- expand.grid(0:2, 0:2, 0:2) > > mat2 <- aa[c(19, 16, 13, 24, 8), ] > > > > where mat2 is always a subset of mat1 > > > > I need to f

Re: [R] comparing two matrices

2007-01-21 Thread Adrian Dusa
ings) since it does not use the sum: > > apply(mat2, 1, function(x) which(apply(mat1, 1, function(y) all(x == y)) == > TRUE)) > > -Christos -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \

[R] comparing two matrices

2007-01-20 Thread Adrian Dusa
which(apply(mat1, 1, function(y) { sum(x == y) }) == ncol(mat1)) }) The code is vectorized, but I wonder if there is a simpler (hence faster) matrix computation that I miss. Thank you, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Buc

Re: [R] a question of substitute

2007-01-11 Thread Adrian Dusa
This comes up often enough that I have contemplated adding a solution to > (b) to the stats package. > > Doing either of these right is really pretty complicated, and not > something to dash off code in a fairly quick reply (or even to check that > th

Re: [R] a question of substitute

2007-01-10 Thread Adrian Dusa
ithout > the workarounds I posted: >fun.2(values ~ group) Brilliant :) Super fast change, this is why I love R. Cheers, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21

Re: [R] a question of substitute

2007-01-09 Thread Adrian Dusa
h fligner.test(), printing the p.value and based on that changing the var.equal argument in the oneway.test() It's just for convenience, but they do like having it all-in-one. Best regards, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5

Re: [R] a question of substitute

2007-01-09 Thread Adrian Dusa
> > fun.3 <- function(formula) { > mc <- match.call() > mc[[1]] <- as.name("oneway.test") > eval.parent(mc) > } > fun.3(values ~ group) > > fun.4 <- function(formula) { > do.call(oneway.test, list(formula)) > } > fun.4(v

[R] a question of substitute

2007-01-09 Thread Adrian Dusa
o vectors in a data.frame, with no avail. I did find a hack, creating two new vectors inside the function and creating a fresh formula, so I presume this has something to do with environments. Could anybody give me a hint on this? Thank you, Adrian -- Adrian Dusa Romanian Social Data Archi

[R] dashed lines and SVG files

2007-01-04 Thread Adrian DUSA
Sorry for duplicating the message, the previous had an unintended subject line... Dear helpers, I have a question about the SVG device. It works fine, the SVG file is indeed produced, only the graphic differs from the R window. In the SVG file the dashed line is just a regular plain one. My toy e

[R] dashed lines and SVG files devSVG("/folderul/unde/salvez/myplot.svg", width=10, height=10) plot(1:10, 1:10) dev.off()

2007-01-04 Thread Adrian DUSA
Dear helpers, I have a question about the SVG device. It works fine, the SVG file is indeed produced, only the graphic differs from the R window. In the SVG file the dashed line is just a regular plain one. My toy example is: library(RSvgDevice) devSVG("myplot.svg", width=10, height=10) plot(1:10

Re: [R] how to replace some objects?

2006-12-21 Thread Adrian Dusa
t;b" with "2", and "c" with "3". > > Like this: 1,2,1,3,2,2,1,1,3. > > let <- c('a', 'b', 'a', 'c', 'b', 'b', 'a', 'a', 'c') > library(car) > num <- recod

Re: [R] Count cases by indicator

2006-12-09 Thread Adrian DUSA
t; > 093/0499;1 > > 093/0499;1 > > 093/0499;1 > > 093/0499;1 > > -- > > ___ > > > > Austrian Institute of Economic Research (WIFO) > > > > Name: Serguei Kaniovski

Re: [R] weight cases?

2006-10-14 Thread Adrian Dusa
On Saturday 14 October 2006 16:52, Gabor Grothendieck wrote: > Try this (and round the result to make to it comparable to your > calculation): > > xtabs(weight ~ var1 + var2, my.data) Oh yes... :) It was so simple. Thanks for the cov.wt() as well. Regards, Adrian -- Adrian Dusa Rom

Re: [R] weight cases?

2006-10-14 Thread Adrian Dusa
;- table(my.data$var1, my.data$var2)) round(unweighted*total$weight, 0) Yet another question: how would the weight variable be applied to correlate two numerical variables? Best, Adrian On Saturday 14 October 2006 16:00, Gabor Grothendieck wrote: > Try this: > > table(lapply(my.

[R] weight cases?

2006-10-14 Thread Adrian Dusa
.data$var1, my.data$var2) A B C D E a 1 0 0 0 0 b 0 0 0 1 0 c 0 0 0 0 1 d 0 0 1 0 0 e 0 1 0 0 0 Applying the weight variable, the table should yield a value of 2 for the "eB" combination: > table(my.data$var1, my.data$var2) A B C D E a 1 0 0 0 0 b 0 0 0 1 0

Re: [R] How to repeat vectors ?

2006-09-30 Thread Adrian DUSA
a11 a12 > > a21 a22 > >Is there a routine to get: a11 a12 > > a11 a12 > > a21 a22 > >

Re: [R] delete a entire vector of a dataframe

2006-09-22 Thread Adrian DUSA
dat) %in% "Var_7") # now don't want Var_7 > dat <- dat[, -not.want] > dat > > This can be extended to many variables: > > not.want <- which(names(dat) %in% c("Var_10", "Var_2", "Var_8")) > dat <- dat[, -not.want] >

[R] test the tcltk package

2006-08-21 Thread Adrian Dusa
fine? I have R 2.3.1, tcl and tk version 8.4 (dev packages installed as well). Thanks in advance, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 31

Re: [R] R Site Search directly from Firefox's address bar

2006-08-18 Thread Adrian Dusa
On Friday 18 August 2006 10:08, Romain Francois wrote: > Le 17.08.2006 20:56, Adrian Dusa a écrit : > [...] > > It breaks also every usage of the google feeling lucky default behaviour > which is really useful I think. > There are R related firefox search plugins on mycroft.

Re: [R] R Site Search directly from Firefox's address bar

2006-08-17 Thread Adrian Dusa
"r". Now, everytime I type "r" in the address bar it takes me to www.r-project.org :) -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 __

[R] R Site Search directly from Firefox's address bar

2006-08-17 Thread Adrian Dusa
ions&idxname=docs&idxname=Rhelp02a&query="; >From now on, every keyword(s) you type in the address bar will take you directly to the first page of hits at http://finzi.psych.upenn.edu I found this very helpful. Best, Adrian -- Adrian Dusa Romanian Social Data Archive 1,

Re: [R] RE : tcltk library on linux

2006-08-12 Thread Adrian Dusa
.R-project.org/bin/linux/ubuntu/ dapper/ Then: $ sudo apt-get update $ sudo apt-get install r-cran-rcmdr (as Dirk Eddelbuettel advised). It _should_ work flawlessly. HTH, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 312

Re: [R] objects and environments

2006-08-09 Thread Adrian Dusa
is not > nearly so ugly so you might reconsider whether its ok > for you to just pass bb. Aah-aaa!! :) So that's the way to do it... I don't know how many times I read the help from apply and I missed it every time. Well, I learned many things today, I feel much better now

Re: [R] objects and environments

2006-08-09 Thread Adrian Dusa
- apply(mymatrix, 1, fun2) > } Beautiful :) Thanks very much Dimitris, I was out of energy after several hours of struggling with this. Best, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Te

[R] objects and environments

2006-08-09 Thread Adrian Dusa
4, e2) fun2() } fun2 <- function(idx) { get("bb", e2) } > fun1() Error in get("bb", e2) : object "e2" not found Any hint would be highly appreciated, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5

Re: [R] missing documentation entries

2006-08-09 Thread Adrian Dusa
uestion for R-devel: please do study the posting guide. > > `R-devel is intended for questions and discussion about code development > in R.' Thank you very much for your reply, I'll post to R-devel from now on. It seems to me that name spaces are the solution for my problem. Adr

[R] missing documentation entries

2006-08-09 Thread Adrian Dusa
d have two questions: - is it mandatory to document _all_ functions (will the source package be rejected by CRAN if otherwise)? - if not, is there a way to tell R which are the functions that I don't want to document? Thanks, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magu

Re: [R] Tcltk package

2006-08-03 Thread Adrian DUSA
.org/bin/linux/ubuntu/ dapper/ This repository has lots of other packages compiled for Ubuntu, feel free to take a look. HTH, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 312

Re: [R] Extracting from a matrix w/o for-loop

2006-07-29 Thread Adrian DUSA
volving matrix indexing (M1[M2]) is simpler but just for the sake of it, since we're dealing with matrices it is not a case of sapply but of _apply_: apply(M2, 1, function(x) M1[x[1], x[2]]) My 2c, Adrian -- Adrian DUSA Arhiva Romana de Date Sociale Bd. Schitu Magureanu nr.1 050025 Bucur

Re: [R] Getting rid of for loops

2006-07-17 Thread Adrian DUSA
[2]]))[[1]]$"Pr(>F)"[3])     } p.interaction <- apply(all.pairs, 1, myfun) Actually, you don't need "as.matrix" there, just cbind all your vectors to obtain the final dataframe: finally <- as.data.frame(cbind(marker1, marker2, p.interaction)) Adrian On

Re: [R] Getting rid of for loops

2006-07-17 Thread Adrian DUSA
gt; > Thanks in advance! > Kevin > > ------ > -- > Kevin Emerson > Center for Ecology and Evolutionary Biology > 1210 University of Oregon > Eugene, OR 97403 > USA > [EMAIL PROTECTED] -- Adr

[R] [R-pkgs] new package QCAGUI

2006-06-05 Thread Adrian DUSA
ment and advice. Regards, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 ___ R-packages mailing list [EMAIL PROTECTED] https://stat.

Re: [R] checking package dependencies

2006-05-23 Thread Adrian DUSA
for the answer. The problem seem to have vanished (and I haven't done anything in particular). When it didn't work, I remember I checked the permissions and everything was OK. Really have no idea what went wrong, but now it works. Best, Adrian -- Adrian DUSA Romanian Social Data Archiv

[R] checking package dependencies

2006-05-17 Thread Adrian DUSA
s specify the path to the installed packages (and all depending packages are installed): R_LIBS=${R_LIBS-'/home/adi/Installed/R/site-library:/usr/local/lib/R/site-library:/usr/local/lib/R/library'} Is there something changed about defining R_LIBS? Thank you in advance, Adrian -- Adri

Re: [R] choosing a particular object

2006-03-31 Thread Adrian DUSA
et( get(obj), select=var.name ) > table(x) > } -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 __ R-help@stat.math.ethz.ch mailing list https://st

[R] choosing a particular object

2006-03-31 Thread Adrian DUSA
function(obj.name, var.name) { temp <- give.me.the.object.called(Object) table(temp[, var.name]) } This should perfom the same thing as: table(bb$q2) Is this possible? TIA, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5

Re: [R] ifelse problem

2006-03-10 Thread Adrian DUSA
On Friday 10 March 2006 16:31, Uwe Ligges wrote: > [...] > aa[!(nchar(aa) < 3)] Thanks very much, I got it now. All the best, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210

[R] ifelse problem

2006-03-10 Thread Adrian DUSA
ifelse function return the whole aa vector? Using if and else separately, I get the correct result... > if (any(nchar(aa) < 3)) { aa[-which(nchar(aa) < 3)] } else { aa } [1] "test" "name" Thanks in advance, Adrian -- Adrian DUSA Roma

Re: [R] QCA adn Fuzzy

2006-03-07 Thread Adrian DUSA
ions and/or feedback are more than welcome. I hope this helps you, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 __ R-help@s

[R] [R-pkgs] new package QCA

2006-02-07 Thread Adrian DUSA
ethod"). Future versions of this package will have more functions to address the fuzzy-set minimization problems, as well. Big thanks to the r-help list members, supportive as ever, especially to Gabor Grothendieck and Martin Maechler for excellent ideas in the key parts of the algorithm. -- A

Re: [R] yet another vectorization question

2006-01-31 Thread Adrian DUSA
) [1] 8.62 0.27 8.91 0.00 0.00 If anyone interested, I uploaded both functions here: http://www.roda.ro/all.expr.R Thank you, Adrian -- Adrian DUSA Arhiva Romana de Date Sociale Bd. Schitu Magureanu nr.1 050025 Bucuresti sectorul 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 __

Re: [R] yet another vectorization question

2006-01-30 Thread Adrian Dusa
aa[, i]] <- c(0, 1, 0) Is there any possibility to vectorize this "for" loop? (sometimes I have hundreds of columns in the "aa" matrix) Many big thanks in advance, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Te

Re: [R] yet another vectorization question

2006-01-30 Thread Adrian Dusa
and.grid(lapply(1:3, function(x) c(0, 1, NA))) Best, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 __ R-help@stat.math.ethz.ch m

Re: [R] yet another vectorization question

2006-01-30 Thread Adrian Dusa
) and write the contents of "tt" in the "result.matrix"... Best, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 ___

Re: [R] yet another vectorization question

2006-01-30 Thread Adrian DUSA
Adrian DUSA roda.ro> writes: > > I'm trying to develop a function [...snip...] Sorry for the traffic, I forgot to say that I'm using library(combinat) for the "combn" function... Thank you, Adrian __ R-help@stat.ma

[R] yet another vectorization question

2006-01-30 Thread Adrian DUSA
ol(idk)) { end.row <- start.row + nrow(tt) - 1 return.matrix[start.row:end.row, idk[ , k]] <- tt start.row <- end.row + 1 } ## How can one modify "return.matrix" using apply on "idk"? } return.matrix[is.na(return.matrix)] <

Re: [R] R newbie example code question

2006-01-14 Thread Adrian DUSA
ot;" $major [1] "2" $minor [1] "2.1" $year [1] "2005" $month [1] "12" $day [1] "20" $"svn rev" [1] "36812" $language [1] "R" Thank you, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu B

Re: [R] R newbie example code question

2006-01-14 Thread Adrian DUSA
nessie.mcc.ac.uk> writes: > [...] > The solution I finally opted for, and still use, > is based (in a Linux environment) on including > the following code in your .Rprofile file: > > .xthelp <- function() { > tdir <- tempdir() > pgr <- paste(tdir, "/pgr", sep="") > con <- file(pgr, "

[R] more on the daisy function

2006-01-05 Thread Adrian DUSA
1 2 3 2 1 3 3 1 4 1 2 1 Here, 3 means the third variable (V3) that the first and third rows differ on. I could try to do that myself, but I don't know where to find the Fortran code daisy uses. Thanks for any hint, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magur

Re: [R] millions of comparisons, speed wanted

2005-12-17 Thread Adrian DUSA
The daisy function is _very_ good! I have been able to use it for nominal variables as well, simply by: daisy(input)*ncol(input) Now, for very large number of rows (say 5000), daisy works for about 3 minutes using the swap space. I probably need more RAM (only 512 on my computer). But at least I g

Re: [R] millions of comparisons, speed wanted

2005-12-15 Thread Adrian DUSA
p. Nice idea anyhow, maybe I'll find a way to use it further. Best, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 __ R-help@sta

[R] millions of comparisons, speed wanted

2005-12-15 Thread Adrian DUSA
zed, function(idx) input[to.be.compared[idx, 1], ]) result[!logical.result] <- "x" minimized[unique(as.vector(to.be.compared[compare.minimized, ]))] <- TRUE if (sum(minimized) > 0) { input <- rbind(input[!minimized, ], unique(t(result))) } } ## code end

Re: [R] Help on a matrix task

2005-12-08 Thread Adrian DUSA
input_numbers = (input_numbers - new_col) / 2 > } > colnames(input_mat) = NULL A little late, but wouldn't be more simple to create input_mat with: N <- 4 input_mat <- matrix(NA, ncol=N, nrow=2^N) for (i in 1:N) input_mat[,i] <- c(rep(0, 2^(N - i)), rep(1, 2^(N - i))) HTH, Adrian --

Re: [R] attributes of a data.frame

2005-11-21 Thread Adrian DUSA
;s another reason why it's not in the base: it doesn't need to be, > you can just go find and install that contributed package! > > Duncan Murdoch I got it, it's logic. Well, one could always use Hmisc which does very well these things. Thank you again, Adrian -- Adria

Re: [R] attributes of a data.frame

2005-11-21 Thread Adrian DUSA
hem like this: > > varlab(x) # to see the labels > > varlab(x, "varname") <- "label" # to set one > > Duncan Murdoch Thank you for the tip; I'll certainly use it. Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucha

[R] attributes of a data.frame

2005-11-21 Thread Adrian DUSA
;varlab<-" Thank you, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 __ R-help@stat.math.ethz.ch mailing list https:/

Re: [R] help with apply, please

2005-11-19 Thread Adrian DUSA
pply(combos, 1, function(idx) all(colSums(mtrx[idx,]))),] > > In the example we get: > > [,1] [,2] > [1,]13 > [2,]23 > > which says that rows 1 and 3 of mtrx form one solution > and rows 2 and 3 of mtrx form another solution. I'm speechless. It i

Re: [R] help with apply, please

2005-11-19 Thread Adrian DUSA
p://www.cs.ualberta.ca/~amaral/courses/329/webslides/Topic5-QuineMcCluskey/sld079.htm Best wishes, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 ___

Re: [R] help with apply, please

2005-11-19 Thread Adrian DUSA
ithm, the number of rows will always be much lower than the number of columns, and applying the two above principles will make the matrix even more simple. There are algorithms written in other languages (like Java) freely available on the Internet, but I have no idea how to adapt them to R. Best,

Re: [R] help with apply, please

2005-11-19 Thread Adrian DUSA
s thinking there might be a more efficient way to loop over all possible columns (using perhaps the apply family). Thanks again, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \

Re: [R] help with apply, please

2005-11-19 Thread Adrian Dusa
t should have been a list with: [[1]] [1] 1 0 1 [[2]] [1] 0 1 1 Also, thanks to Duncan and yes, I do very much care finding the smallest possible solutions (if I correctly understand your question). It seems that lp function is very promising, but can I use it to find _all_ minimum solutions? A

[R] help with apply, please

2005-11-19 Thread Adrian DUSA
lgorithm. I tried following the original algorithm applying row dominance and column dominance, but (as I am not a computer scientist), I am unable to apply it. If you have a better solution for this, I would be gratefull if you'd share it. Thank you in advance, Adrian -- Adrian DUSA

Re: [R] returning a modified fix()-ed dataframe

2005-10-07 Thread Adrian DUSA
column line and drag to desired width. Oh, silly me. I knew this works under Windows, but I should have specified I run R under Linux (Kubuntu 5.04, KDE). And I also knew that the Linux interface is not as developed as the Windows one, so it's probably not possible yet. Thanks for ever

Re: [R] returning a modified fix()-ed dataframe

2005-10-07 Thread Adrian DUSA
On Friday 07 October 2005 20:55, Sundar Dorai-Raj wrote: > Adrian DUSA wrote: > > [...snip...] > > Hi, Adrian, > > You need to assign "fix(dataf)" to something: > > my.data <- data.frame(age=c(24,35,28), gender=c("Male", "Female", "M

[R] returning a modified fix()-ed dataframe

2005-10-07 Thread Adrian DUSA
in which(varlab != dataf[,2])) { label(x[,i]) <- dataf[i,2] } } Now, say during fix() one modified "Responent's gender" into "Respondent's gender" (the previous missed a "d"). The trouble I'm having is to return the modified

Re: [R] measurement unit

2005-09-09 Thread Adrian DUSA
) > > HTH > > Christophe Thank you Cristophe, This solves it. I also thought about transforming, but I was curious if there's an already built in argument. Best, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest Romania Tel

[R] measurement unit

2005-09-09 Thread Adrian DUSA
of a certain width and height: X11(width=10, height=5) and I would like these to be centimeters, rather than inches. Thank you, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / in

[R] producing SVG files

2005-09-03 Thread Adrian DUSA
e = "/home/adi/Rplots.svg", width = 10, height = 8, bg = "white", fg = "black", onefile=TRUE, xmlHeader=TRUE) with the same result. Could you please point me to the right direction, please? Thank you in advance, Adrian -- Adrian Dusa Romanian Social Data

Re: [R] producing SVG files

2005-09-03 Thread Adrian DUSA
Adrian DUSA gmail.com> writes: > I am trying to use the RSvgDevice package to produce some SVG graphs which I > want to edit with Inkscape 0.42. > [...snip...] Argh, a minute after posting a find out the solution here: http://www.stat.auckland.ac.nz/~paul/Talks/gridSVG/slide8.ht

Re: [R] Digest reading is tedious

2005-08-12 Thread Adrian Dusa
couldn't find it. I tried to figure out how to use procmail and formail but is too complex for a regular user. Is it possible to get numbered encapsulated messages? TIA, Adrian -- Adrian Dusa Arhiva Romana de Date Sociale Bd. Schitu Magureanu nr.1 Tel./Fax: +40 21 3126618 \

Re: [R] texture in barplots?

2005-07-13 Thread Adrian Dusa
On Thursday 14 July 2005 00:51, Peter Dalgaard wrote: > Adrian Dusa <[EMAIL PROTECTED]> writes: > > <...snip...> > > This comes up every now and then, and while it seems that everyone > thinks fill patterns would be nice to have, I suspect that every > attempt to

Re: [R] texture in barplots?

2005-07-13 Thread Adrian Dusa
On Wednesday 13 July 2005 17:36, Knut Krueger wrote: > Adrian Dusa schrieb: > >Is it possible to draw barplots using a texture instead of colors, for a > > black and white printer? > > barplot(height,.,density=c(4,6,8,10) ...) > > for each bar one number - this ex

[R] texture in barplots?

2005-07-13 Thread Adrian Dusa
for a black and white printer? TIA, Adrian -- Adrian Dusa Arhiva Romana de Date Sociale Bd. Schitu Magureanu nr.1 Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 -- This message was scanned for spam and viruses by BitDefender. For more information please visit

Re: [R] not supressing leading zeros when reading a table?

2005-07-10 Thread Adrian Dusa
On 7/10/05, alejandro munoz <[EMAIL PROTECTED]> wrote: > Adrian, > > To prevent coercion to numeric, try: > > mydata <- read.table("myfile", colClasses="character") > > HTH. > > alejandro > On 7/10/05, Adrian Dusa <[EMAIL PROTECTED]

[R] not supressing leading zeros when reading a table?

2005-07-10 Thread Adrian Dusa
Dear R list, I have a dataset with a column which should be read as character, like this: name surname answer 1 xx yyy "00100" 2 rrr hhh "01" When reading this dataset with read.table, I get 1 xx yyy 100 2 rrr hhh 1 The string column consists in answers to multiple choic

Re: [R] [spam] t.test confidence interval

2005-04-15 Thread Adrian Dusa
On 15 Apr 2005 13:53:32 +0200, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > Adrian Dusa <[EMAIL PROTECTED]> writes: > > > Hi, > > > > I'm using R for some undergraduate lectures, reaching the t tests. > > No matter what conf.level one specifies in t

[R] [spam] t.test confidence interval

2005-04-15 Thread Adrian Dusa
drian -- Adrian Dusa Romanian Social Data Archive Bd. Schitu Magureanu nr.1 Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 -- This message was scanned for spam and viruses by BitDefender. For more information please visit http://linux.bitdefende

[R] z and p

2005-03-15 Thread Adrian Dusa
is an already built function. Regards, Adrian -- Adrian Dusa Romanian Social Data Archive Bd. Schitu Magureanu nr.1 Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 -- This message was scanned for spam and viruses by BitDefender. For more information please visit

Re: [R] Graphics

2005-02-25 Thread Adrian Dusa
John Dougherty surewest.net> writes: > > On Thursday 24 February 2005 04:13, Adrian Dusa wrote: > > ... > > You need to check your font installation. Be sure the X-11 fonts are > installed. > > XFree86-fonts-75dpi-4.3.99.902-30 > XFree86-fonts-100dpi-4.3

Re: [R] Graphics

2005-02-24 Thread Adrian Dusa
Prof Brian Ripley stats.ox.ac.uk> writes: > > On Tue, 22 Feb 2005 Cedric.Ginestet tvu.ac.uk wrote: > > > The R platform that I installed on my Windows XP crashes everytime that > > I try to run some sophisticated graphics (e.g. Demo Graphics). Is that > > to do with the configuration? Shall I

Re: [R] file 'attributes'

2005-02-06 Thread Adrian Dusa
Liaw, Andy merck.com> writes: > > file.info() should help with some of those items. > > Andy > > > From: Adrian Dusa > > > > Dear R-list, > > > > I have many files on many CDs (probably same as many of you) > > and I would like

[R] further issues with install.packages

2005-02-06 Thread Adrian Dusa
lled under SuSE. The command whereis g77 gives: g77: /usr/bin/g77 /usr/share/man/man1/g77.1.gz R.version _ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major2 minor0.1 year 2004 month11 day 15 language R

[R] file 'attributes'

2005-02-06 Thread Adrian Dusa
in manually) Is it possible to read a CD/structure of folders in such a way? Thank you for any suggestion, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101

  1   2   >