Re: [R] replacing unicode characters

2023-06-30 Thread Adrian Dusa
Right on the point, Ivan, that was the issue. The output from l10n_info() was: $MBCS [1] FALSE $`UTF-8` [1] FALSE $`Latin-1` [1] FALSE $codeset [1] "US-ASCII" (and the locale was just "C") I simply needed to write something like: export LC_ALL='en_US.UTF-8' before starting the child

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

2012-04-10 Thread Adrian Dusa
. Most notably, the previous qmcc() function is now obsolete, given that all our tests have shown that eqmcc() yield the same exact results but it's by far superior in speed. A very happy Easter, and happy QCA-ing, Adrian and Alrik -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd

Re: [R] For-loop dummy variables?

2010-10-19 Thread Adrian Dusa
gravityflyer gravityflyer at yahoo.com writes: Hi everyone, I've got a dataset with 12,000 observations. One of the variables (cleary$D1) is for an individual's country, coded 1 - 15. I'd like to create a dummy variable for the Baltic states which are coded 4,6, and 7. In other words, as

Re: [R] For-loop dummy variables?

2010-10-19 Thread Adrian Dusa
On Tuesday 19 October 2010, Phil Spector wrote: I always find R useful to solve problems like this: dummy = as.numeric(cleary$D1 %in% c(4,6,7)) Indeed, and this works too: dummy - 1*(cleary$D1 %in% c(4,6,7)) Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd

Re: [R] looking for .. dec if vector if element x

2010-05-18 Thread Adrian Dusa
1] - test[test 1] - 1 test [1] 1 2 4 6 8 Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel.:+40 21 3126618 \ +40 21 3120210 / int.101 Fax: +40 21 3158391 __ R-help@r-project.org

Re: [R] Question about factor that is numeric, in aov()

2010-05-09 Thread Adrian Dusa
it is mighty important whether group is numeric or factor. There are both in your mind, but in R you have to declare it as factor in order to treat it as such... I hope this helps, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel

Re: [R] merging issue.........

2010-01-13 Thread Adrian Dusa
, karean -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel.:+40 21 3126618 \ +40 21 3120210 / int.101 Fax: +40 21 3158391 __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] counting the number of times a string appears

2010-01-13 Thread Adrian Dusa
[[alternative HTML version deleted]] -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel.:+40 21 3126618 \ +40 21 3120210 / int.101 Fax: +40 21 3158391 __ R-help@r-project.org mailing

[R] install.packages error

2009-12-07 Thread Adrian Dusa
tools_2.10.0 Thanks in advance for any hint, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel.:+40 21 3126618 \ +40 21 3120210 / int.101 Fax: +40 21 3158391 __ R-help@r-project.org mailing list

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

2009-09-21 Thread Adrian Dusa
for mvQCA. The QCA package performs the Quine-McCluskey algorithm for Qualitative Comparative Analysis. As usual, any suggestions and bug reports are welcomed. Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel.:+40 21 3126618 \ +40

Re: [R] RMySQL - overwrite record, not table

2009-08-24 Thread Adrian Dusa
whizvast wrote: Hi, Adrian- If you use overwrite=T parameter, you will overwrite the entire table, not each record. this is the essence of my problem and i still haven't found out right solution. i am thinking of writing my own MySQLwriteTable function... Thank you for your answer

Re: [R] RMySQL - overwrite record, not table

2009-08-18 Thread Adrian Dusa
whizvast wrote: Hi, useR- In RMySQL, how do I overwrite records? (equivalent to replace query). For example, suppose that dat2 is a newer data.frame than dat1. con - dbConnect(MySQL()) res - dbWriteTable(con, DBname, dat1, row.names=F, append=T, replace=T) res - dbWriteTable(con,

Re: [R] Memory errors when using QCA package

2009-07-23 Thread Adrian Dusa
Allan Engelhardt allane at cybaea.com writes: It is a little stupid, but the length of a vector is limited to 2^31-1 entries on any platform. A matrix is stored as a vector, so the product of all dimensions is also limited to 2^31-1. Allan. Matthew Gwynne wrote: Hi, I have been

Re: [R] read.table, row.names arg

2009-06-05 Thread Adrian Dusa
Markus Loecher markus.loecher at gmail.com writes: [...] x ID X1 X2 1 010007787048271871 1 4 2 1007109516820319 2 3 3 10094843652996959 3 2 4 010145176274075487 4 1 The first column was not read in as a string, which mangled the IDs. I could use colClasses

Re: [R] re ad.table, row.names arg

2009-06-05 Thread Adrian Dusa
Markus Loecher-4 wrote: Dear R users, I had somehow expected that read.table() would treat the column specified by the row.names argument as of class character. That seems to be the only sensible class allowed for a column containing row names. However, that does not seem to be the

Re: [R] exporting data to csv file -problem with column names

2009-06-01 Thread Adrian Dusa
Steven Matthew Anderson adastra69 at mac.com writes: [...] Is there a way to exclude the row numbers from the exported csv file? Or add a column name for row number to keep this from happening? Steven, see the row.names argument in write.table(), set it to FALSE. Adrian

Re: [R] Help needed on R output

2009-05-26 Thread Adrian Dusa
A simpler solution: my.string - c(, 01001001011011101100, 1001001011010101, 1101110100000011, 000100100101001001011001, 000101101101101001101001) my.string - paste(my.string, collapse=\,\n\)

Re: [R] how to implement a circular buffer with R

2009-05-24 Thread Adrian Dusa
Still not elegant, but I would split the string first: spl.str - unlist(strsplit(12345abcdefgh12345abcdefgh, )) Measure its length: len.str - length(spl.str) Shift it: spl.str - c(spl.str[len.str], spl.str[seq(len.str - 1)]) Then paste it back together: paste(spl.str, collapse=) #

Re: [R] Row number of minimum value?

2009-05-17 Thread Adrian Dusa
?? Maybe this helps: which(mycol == min(mycol)) where mycol is your column. Hth, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel.:+40 21 3126618 \ +40 21 3120210 / int.101 Fax: +40 21 3158391

Re: [R] split a character variable into several character variable by a character

2009-04-10 Thread Adrian Dusa
100. BCPy01-02 BCPy01-02-3 92.5926 BCPy01-02 BCPy01-02-3 100. BCPy01-03 BCPy01-03-1 100. Regards, Mao Jian-feng -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel.:+40 21 3126618 \ +40 21 3120210 / int.101 Fax: +40 21

Re: [R] split a character variable into several charac ter variable by a character

2009-04-10 Thread Adrian Dusa
]] [1] First Last Bill Dunlap TIBCO Software Inc - Spotfire Division wdunlap tibco.com - [R] split a character variable into several character variableby a character Adrian Dusa dusa.adrian at gmail.com Fri

Re: [R] Random sampling based on the observations

2009-03-24 Thread Adrian Dusa
that is the random sample will be based on the observations. It will be great if someone can help me out me out with a proper syntax. Thanks in Advance. I think you need to read the help for: ?[ and most probably one of the introductory books for R. I hope this helps, Adrian -- Adrian Dusa Romanian

Re: [R] How to write a function that accepts unlimited number of input arguments?

2009-03-10 Thread Adrian Dusa
as the number of input scalar changes. Many thanks in advance! -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel.:+40 21 3126618 \ +40 21 3120210 / int.101 Fax: +40 21 3158391 [[alternative HTML version deleted

Re: [R] Dropping rows conditionally

2009-03-04 Thread Adrian Dusa
row4 10 11 12 row5 13 14 15 row6 16 17 18 row7 19 20 21 I want to say drop row if value=1 or value =11 or value =20 How do I do that? Kind regards, Lazarus Mramba -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel.:+40 21

Re: [R] [R-pkgs] New package: exams - Automatic Generation of Standardized Exams

2009-02-23 Thread Adrian Dusa
easily. Best, Bettina ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/mailman/listinfo/r-packages -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel.:+40 21 3126618

Re: [R] sas.get under Linux

2009-02-03 Thread Adrian Dusa
On Monday 02 February 2009, Frank E Harrell Jr wrote: [...] Stat/Transfer has a menu option to read the SAS format catalog but I haven't tried it. Been there, done that... didn't get the t-shirt though. I tried everything I believe, but with no avail. Thanks again, Adrian -- Adrian Dusa

Re: [R] sas.get under Linux

2009-02-02 Thread Adrian Dusa
just base SAS. Acually... no. I don't plan to use SAS in the future (I use R! :), just need it for the moment to extract some value labels. Best wishes, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel.:+40 21 3126618 \ +40 21

Re: [R] sas.get under Linux

2009-02-02 Thread Adrian Dusa
do... Thanks for your help, Adrian On Saturday 31 January 2009, Frank E Harrell Jr wrote: Adrian Dusa wrote: Dear all, I am trying to import a SAS file into R (in fact I only need the value labels from the formats file), using Hmisc package, but I get this error: my.sas - sas.get

[R] sas.get under Linux

2009-01-31 Thread Adrian Dusa
? Thanks in advance for any hint, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel.:+40 21 3126618 \ +40 21 3120210 / int.101 Fax: +40 21 3158391 [[alternative HTML version deleted

Re: [R] QCA adn Fuzzy

2008-12-23 Thread Adrian Dusa
wrote: Dear Gott and Prof Adrian DUSA , I am learning fuzzy set QCA and recently, I just write a function to construct a truthTable, which can be passed to QCA:::eqmcc to do the Boolean minimization. The function is here: http://code.google.com/p/asrr/source/browse/trunk/R/fs_truthTable.R

[R] SPSSyntax function

2008-11-26 Thread Adrian Dusa
Dear all, I've created a function called spssyntax that creates a syntax for variable labels and value labels in SPSS (in the *sps* syntax format that was recently discussed), using a list of such labels in R. The entry list looks like this (between the ### signs): ### labels - list()

Re: [R] [R-pkgs] RQDA-0.1.5 is released

2008-11-25 Thread Adrian Dusa
vis popup menu # Temporary delete files and codes # Rename the files,code, code category, case and others More information can be found in http://rqda.r-forge.r-project.org/ Comments and suggestions are welcome:) -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025

Re: [R] remove levels from a factor

2008-08-30 Thread Adrian Dusa
Yuan Jian jayuan2008 at yahoo.com writes: [...snip...] I want to remove level b because level b has less than 2. f [1] a a Levels: a f[which(f %in% names(table(f))[table(f) = 2]), drop=TRUE] [1] a a Levels: a HTH, Adrian __

Re: [R] How to repress the annoying complains from X window system

2008-08-11 Thread Adrian Dusa
| |_ | platform i486-pc-linux-gnu | arch i486 Is that a pre-Pentium machine?? Nope, quite the contrary. It's a HP mobile workstation model 8710w, with a Intel Core2Duo processor at 2.6 GHz and 2GB of RAM... -- Adrian Dusa Romanian Social Data Archive 1, Schitu

Re: [R] Change language in Rcmdr

2008-07-08 Thread Adrian Dusa
in French. Best, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel.:+40 21 3126618 \ +40 21 3120210 / int.101 Fax: +40 21 3158391 signature.asc Description: This is a digitally signed message part

Re: [R] Subsetting to unique values

2008-06-06 Thread Adrian Dusa
Emslie, Paul [Ctr] emsliep at atac.mil writes: I want to take the first row of each unique ID value from a data frame. For instance ddTable - data.frame(Id=c(1,1,2,2),name=c(Paul,Joe,Bob,Larry)) I want a dataset that is IdName 1 Paul 2 Bob unique(ddTable) Will give

Re: [R] Trouble receiving messages from the mailing list

2008-01-18 Thread Adrian Dusa
certainly could. One possible solution is to digitally sign the message, but there are probably few people who know about PGP and its benefits... Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd. 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40

[R] read.table and double quotes in strings

2007-12-16 Thread Adrian Dusa
happening? (besides whipping the data entry person :), I am referring to R procedures to detect and correct such things) 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

Re: [R] read.table and double quotes in strings

2007-12-16 Thread Adrian Dusa
On Sunday 16 December 2007, Adrian Dusa wrote: Dear all, [...] Given these examples, I have two questions: 1. What is the correct syntax to import the R-exported file 2. What can I do to prevent these situations from happening? (besides whipping the data entry person :), I am referring

Re: [R] connecting RMySQL to and external server

2007-12-15 Thread Adrian Dusa
designed for client-server operation and there are some things that definitely do not work. (As I recall, that included dbWrite as that imports a file which is on the local machine.) On Fri, 14 Dec 2007, Adrian Dusa wrote: Dear list, I learned how to connect R to a local MySQL server, using

Re: [R] connecting RMySQL to and external server

2007-12-15 Thread Adrian Dusa
On Saturday 15 December 2007, Prof Brian Ripley wrote: On Sat, 15 Dec 2007, Adrian Dusa wrote: Indeed, I noticed the host argument but the server demands an username and a password for the machine first, But you said 'connect to', not 'log in to', so how were we to know that? and only

Re: [R] connecting RMySQL to and external server

2007-12-15 Thread Adrian Dusa
) but I'm sure your hints will be relevant to our sysadmin. I do want to understand this stuff myself, just need more digging in the manuals. Cheers, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618

[R] connecting RMySQL to and external server

2007-12-14 Thread Adrian Dusa
-- 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@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Dot plots in R

2007-11-26 Thread Adrian Dusa
is better suited by the DOTplot() function from the UsingR package: it looks exactly the same as the web image and it has no axes, as Paul wants in a later message. x - sample(1:10, 30, replace=T) library(UsingR) DOTplot(x) Hth, Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu

Re: [R] generate combination set

2007-11-16 Thread Adrian Dusa
, 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@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] generate combination set

2007-11-16 Thread Adrian Dusa
On Friday 16 November 2007, Peter Dalgaard wrote: [...] Or even (from someone who have known about combn for a while) combn(LETTERS[1:7], 2, paste, collapse=) [1] AB AC AD AE AF AG BC BD BE BF BG CD CE CF CG [16] DE DF DG EF EG FG Chapeau... Adrian -- Adrian Dusa Romanian Social

Re: [R] generate combination set

2007-11-15 Thread Adrian Dusa
On Thursday 15 November 2007, [EMAIL PROTECTED] wrote: Actually, (now that I know about combn), a better way is t(matrix(set[combn(7,2)], nrow = 2)) Indeed, or to avoid transposing: matrix(set[combn(7,2)], ncol = 2, byrow=T) Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu

Re: [R] list matching

2007-10-07 Thread Adrian Dusa
that list, the argument all = FALSE does nothing but to add another branch... hmm, I should really use more time series... 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] list matching

2007-10-07 Thread Adrian Dusa
of R and zoo: R.version.string [1] R version 2.6.0 (2007-10-03) packageDescription(zoo)$Version [1] 1.3-2 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] list matching

2007-10-07 Thread Adrian Dusa
/merge.zoo.R?rev=361root=zoo) as.vector(time(do.call(merge, c(lapply(aa, function(x) zoo(,x)), all = FALSE Yeap, that fixes it. Ah-haa, so all = FALSE is merge()s argument... Neat :) Adrian -- Adrian Dusa Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5

[R] list matching

2007-10-06 Thread Adrian Dusa
, it should return e (or NA if none of the letters are common). I have a solution to apply %in% multiple times (here two times, first between the first two and then between the result and the third) but... perhaps there is a better and quicker way. Thanks in advance, Adrian -- Adrian Dusa Romanian

Re: [R] list matching

2007-10-06 Thread Adrian Dusa
particular case the elements are always unique but generally this is the best approach indeed. Thanks Marc, 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] Adding a table to a plot area

2007-09-24 Thread Adrian Dusa
Frank E Harrell Jr f.harrell at vanderbilt.edu writes: Judith Flores wrote: Is there a command to insert a table into the plot area other that using text? Thank you. To me the only completely satisfying approach is to use LaTeX and psfrag in you want great alignment and other

Re: [R] programming question

2007-09-17 Thread Adrian Dusa
, and I'd like to process 20 such input variables (their complexity grow exponentially)... Thanks again, 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