Re: [R] questions on French characters in plot

2012-12-11 Thread Milan Bouchet-Valat
Le mardi 11 décembre 2012 à 01:10 +0100, Richard Zijdeman a écrit : > Dear all, > > I have imported a dataset from Stata using the foreign package. The > original data contain French characters such as and . > After importing, string variables containing names of French > departments have change

Re: [R] How do I get internal nodes of dendograms produced by R?

2012-12-05 Thread Milan Bouchet-Valat
Le mardi 04 décembre 2012 à 16:17 -0500, sagnik ray choudhury a écrit : > I am using R for hierarchical clustering of a number of documents. > > I have a distance matrix on which I have applied hclust method. When I plot > the result of hclust method, I can see the dendogram plotted. What I need >

Re: [R] problem with factor levels

2012-12-04 Thread Milan Bouchet-Valat
Le mardi 04 décembre 2012 à 00:34 -0800, Jeremy.Shearman a écrit : > Hi > I have a data.frame with 371,718 obs. of 12 variables (see below for > an str). My problem is with V1, a Factor w/ 93144 levels, there should > actually be 93994 levels. Each entry looks like: > comp[number]_c[number]_s

Re: [R] Line numbers with errors and warnings?

2012-12-02 Thread Milan Bouchet-Valat
Le dimanche 02 décembre 2012 à 14:21 -0500, Duncan Murdoch a écrit : > On 12-12-02 9:52 AM, Milan Bouchet-Valat wrote: > > Le dimanche 02 décembre 2012 à 09:02 -0500, Duncan Murdoch a écrit : > >> On 12-12-02 8:33 AM, Milan Bouchet-Valat wrote: > >>> Le dimanche

Re: [R] Line numbers with errors and warnings?

2012-12-02 Thread Milan Bouchet-Valat
Le dimanche 02 décembre 2012 à 09:02 -0500, Duncan Murdoch a écrit : > On 12-12-02 8:33 AM, Milan Bouchet-Valat wrote: > > Le dimanche 02 décembre 2012 à 06:02 -0500, Steve Lianoglou a écrit : > >> Hi, > >> > >> On Sun, Dec 2, 2012 at 12:31 AM, Worik R wrote: &

Re: [R] Line numbers with errors and warnings?

2012-12-02 Thread Milan Bouchet-Valat
Le dimanche 02 décembre 2012 à 06:02 -0500, Steve Lianoglou a écrit : > Hi, > > On Sun, Dec 2, 2012 at 12:31 AM, Worik R wrote: > > What I mean is how do I get the R compilation or execution process to spit > > out a line number with errors and warnings? Indeed, I often suffer from the same probl

Re: [R] subset data frame by variable with missing value

2012-11-30 Thread Milan Bouchet-Valat
Le vendredi 30 novembre 2012 à 07:27 -0800, ramoss a écrit : > Hello, > > I have a variable in a data frame that contains NA values. I just want to > subset so that I get the obs where that variable is missing. > In SAS I would do: > > data missing; > set test; > if myvalue=' '; > run; > > H

Re: [R] Problems with weight

2012-11-28 Thread Milan Bouchet-Valat
s the "data" argument, and that's all. But first, stop using attach(), it creates confusion and is probably the reason why you did not think of passing your data.frame object to svydesign(). Regards > Quotes from a week ago... > I colud not perform anything using svyglm.

Re: [R] Problems with weight

2012-11-27 Thread Milan Bouchet-Valat
Le mardi 27 novembre 2012 à 18:33 -0300, Pablo Menese a écrit : > I can't ... I don't know why but I can't > > When I use it: > > logit <- glm(bach ~ egp4 + programa, weight=wst7, > family=quasibinomial(link"logit")) You were advised to use svyglm(), not glm(). It's usually considered polite to r

Re: [R] Stuck trying to modify a function

2012-11-27 Thread Milan Bouchet-Valat
Le mardi 27 novembre 2012 à 16:45 +, Benjamin Ward (ENV) a écrit : > Hi, > > I have the following data: > > Path_Number <- 5 > ID.Path <- c(1:Path_Number) # Make vector of ID's. > No_of_X <- sample(50:550, length(ID.Path), replace=TRUE) # > X <- split(sample(1:1, sum(No_of_X), replace=TRU

Re: [R] R strange behaviour when building huge concatenation

2012-11-27 Thread Milan Bouchet-Valat
Le mardi 27 novembre 2012 à 07:04 -0800, angeloimm a écrit : > Hello John > It seems correct to me too but in my R console it seems to not be working > Here there is what I did: > i copied the statement on one row (leaving and removing the final useless > semi colomn) > i tried to execute it in the

Re: [R] Adding a function with default parameters into the Rcmdr menu

2012-11-23 Thread Milan Bouchet-Valat
Le vendredi 23 novembre 2012 à 03:17 +0100, vincent guyader a écrit : > Hi everyone, > > I made some tests with Rcmdr, to add a function with default parameters : > > For example (very simple): > > myfunction<-function(var="314"){ > print("hello") > print(var) > } > > if I run myfunction() dire

Re: [R] Sentiment analysis in R

2012-11-23 Thread Milan Bouchet-Valat
Le vendredi 23 novembre 2012 à 10:47 +0530, sushobhan just says"I QUIT" a écrit : > Hi All, > I am trying to perform sentiment analysis using R with the > help of the library(sentiment). I am using the function > classify_emotions(sentiment). It is basically selecting a particular

Re: [R] Factor function for coded numerical values

2012-11-23 Thread Milan Bouchet-Valat
Le jeudi 22 novembre 2012 à 13:12 -0800, maths123 a écrit : > I have s data set where 2 of the columns give the coded versions of the > factors A and B. Factor A is coded with 1, 2, 3. Factor B is coded with 1,2. > > How do use the factor function to convert these variables into factors, and > a

Re: [R] Puzzling "Execution halted"

2012-11-20 Thread Milan Bouchet-Valat
Le mardi 20 novembre 2012 à 12:54 -0500, Gang Chen a écrit : > I wrote an R program that does heavy computations with hundreds of > lines of code. It's running fine both interactively and in batch mode > on a Mac OS X computer. The program also has no problem running on a > Linux system (Fedora 14)

Re: [R] Error in memory.size(size) when calling R in batch mode (but not in interactive mode)

2012-11-09 Thread Milan Bouchet-Valat
Le vendredi 09 novembre 2012 à 10:43 +, Franckx Laurent a écrit : > Dear all > > I use a 64 bit Windows7 system with 16 GB memory. > I have run an R script in batch mode with the following command: > R CMD BATCH masterassignment_2012_11_09.r --save > The execution was terminated with th

Re: [R] Regarding the memory allocation problem

2012-10-29 Thread Milan Bouchet-Valat
t; optimize my goal. Well, I gave you one idea, but for us to tell you more you need to give us the code you are using. A better solution would be to spend some money to buy more RAM, given it's quite cheap these days, and to install a 64-bit version of Linux and R, if your computer supports

Re: [R] Regarding the memory allocation problem

2012-10-26 Thread Milan Bouchet-Valat
Le jeudi 25 octobre 2012 à 15:02 +0530, Purna chander a écrit : > Dear All, > > > My main objective was to compute the distance of 10 vectors from a > set having 900 other vectors. I've a file named "seq_vec" containing > 10 records and 256 columns. > While computing, the memory was not s

Re: [R] incomplete final line found by readTableHeader

2012-10-24 Thread Milan Bouchet-Valat
Le mardi 23 octobre 2012 à 20:36 -0700, Shane2012 a écrit : > Thanks, Jeff > This is from a course, but the course is just needed to take some > slides for presentation. I just learn R by myself, and want this skill > more practical. So I try to use the innovative way to perform a more > profession

Re: [R] Error: not 'a real'?

2012-10-20 Thread Milan Bouchet-Valat
Le samedi 20 octobre 2012 à 14:25 +0200, Brian a écrit : > Hi Jim, > > On 10/20/12 13:36, Jim Holtman wrote: > > how about supplying the context of the error. Show the lines in the file > > where the error occurred. > > > > Sent from my iPad > > > > On Oct 20, 2012, at 7:21, Brian wrote: >

Re: [R] can't find the error in if function... maybe i'm blind?

2012-10-20 Thread Milan Bouchet-Valat
Le samedi 20 octobre 2012 à 03:27 -0700, Janosch a écrit : > Hi everybody, > > the following alway gives me the error > "Fehler in if (File$X.Frame.Number[a] + 1 == File$X.Frame.Number[a + 1]) > (File$FishNr[a] <- File$FishNr[a - : Fehlender Wert, wo TRUE/FALSE nötig > ist". Maybe its stupid,

Re: [R] unique

2012-10-16 Thread Milan Bouchet-Valat
Le mardi 16 octobre 2012 à 14:45 +0200, paladini a écrit : > Hello everybody, > I've got a problem concerning the function unique. I have got a > data.frame "shopdata" with 1000 shop which were evaluated at different > points in time. > > With function subset I chose those shops with more then 1

Re: [R] How to use internationalization of R on Linux?

2012-10-15 Thread Milan Bouchet-Valat
Le lundi 15 octobre 2012 à 05:37 -0700, Manish Gupta a écrit : > HI, > > i need to use simplified chineese. But when i read XML > > > > 表 > 3 > 2.9 > > > 笔 > 3.3 >

Re: [R] extracting groups from hclust() for a very large matrix

2012-10-12 Thread Milan Bouchet-Valat
Le vendredi 12 octobre 2012 à 11:33 -0700, Christopher R. Dolanc a écrit : > That command gives me the same result. Do you see that R is not listing > the plot numbers? Just all the numbers between 1 and 137, 138 and 310, > etc. It's like it has reordered the dendrogram, so that everything > occ

Re: [R] extracting groups from hclust() for a very large matrix

2012-10-12 Thread Milan Bouchet-Valat
Le jeudi 11 octobre 2012 à 15:50 -0700, Christopher R. Dolanc a écrit : > Hello, > > I'm having trouble figuring out how to see resulting groups (clusters) > from my hclust() output. I have a very large matrix of 4371 plots and 29 > species, so simply looking at the graph is impossible. There mu

Re: [R] Up key is not the previous command

2012-10-09 Thread Milan Bouchet-Valat
Le lundi 08 octobre 2012 à 20:33 -0700, Peter Langfelder a écrit : > run > > capabilities(what="cledit") > > in your R terminal session. If you get FALSE, your R was compiled > without command line editing support which you need for the "up arrow" > action. FWIW, it works with the R version packa

[R] [R-pkgs] New package: logmult (log-multiplicative models)

2012-10-03 Thread Milan Bouchet-Valat
ls of the RC(M) and RC(M)-L families resp. for two- and three-way tables with one or several dimensions; two skew-symmetric association models proposed by Yamaguchi and by van der Heijden & Mooijaart. Thanks for your attention. As usual, comments and bug reports are welcome! -- Milan Bouch

Re: [R] Help needed on parallel processing

2012-09-26 Thread Milan Bouchet-Valat
Le mercredi 26 septembre 2012 à 13:04 +0530, Anindya Sankar Dey a écrit : > Hi All, > > If i have a vector say x<-1:10 and then use > > parLapply(cl,x,function(k){k=k*2; return(k);} > > it works and will also parallel process depending on the number of cores > and the number of clusters I've bu

Re: [R] Memory usage in R grows considerably while calculating word frequencies

2012-09-25 Thread Milan Bouchet-Valat
Le lundi 24 septembre 2012 à 16:29 -0700, mcelis a écrit : > I am working with some large text files (up to 16 GBytes). I am interested > in extracting the words and counting each time each word appears in the > text. I have written a very simple R program by following some suggestions > and examp

Re: [R] Regression Problem

2012-09-24 Thread Milan Bouchet-Valat
Le lundi 24 septembre 2012 à 11:25 +0530, Vignesh Prajapati a écrit : > Hello all, > > I am new to R, I am learning regression and logistic modeling > with categorical predictor variables, when there is only one predictor > categorical variable i can use as.numeric() but when more than t

Re: [R] Rows not common in dataframes

2012-09-24 Thread Milan Bouchet-Valat
Le lundi 24 septembre 2012 à 13:22 +1000, Chintanu a écrit : > Hi, > > I have two dataframes (Dataframe_A, Dataframe_B) with the same no. of > columns. The first column of both the dataframes contains unique names. > I wish to have Dataframe_A with the rows that are NOT common to > Dataframe_B. So

Re: [R] effective way to return only the first argument of "which()"

2012-09-19 Thread Milan Bouchet-Valat
Le mercredi 19 septembre 2012 à 15:23 +, William Dunlap a écrit : > The original method is faster than which.max for longish numeric vectors > (in R-2.15.1), but you should check time and memory usage on your > own machine: > > > x <- runif(18e6) > > system.time(for(i in 1:100)which(x>0.99)[1]

Re: [R] boot() with glm/gnm on a contingency table

2012-09-16 Thread Milan Bouchet-Valat
Le mercredi 12 septembre 2012 à 07:08 -0700, Tim Hesterberg a écrit : > One approach is to bootstrap the vector 1:n, where n is the number > of individuals, with a function that does: > f <- function(vectorOfIndices, theTable) { > (1) create a new table with the same dimensions, but with the coun

Re: [R] create new variable with ifelse? (reproducible example)

2012-09-15 Thread Milan Bouchet-Valat
Le samedi 15 septembre 2012 à 23:36 +0300, Niklas Fischer a écrit : > Dear R users, > > I have a reproducible data and try to create new variable "clo" is 1 if > know variable is equal to "very well" or "fairly well" and getalong is 4 or > 5 > otherwise it is 0. > > rep_data<- read.table(header=

Re: [R] boot() with glm/gnm on a contingency table

2012-09-12 Thread Milan Bouchet-Valat
Le mercredi 12 septembre 2012 à 07:08 -0700, Tim Hesterberg a écrit : > One approach is to bootstrap the vector 1:n, where n is the number > of individuals, with a function that does: > f <- function(vectorOfIndices, theTable) { > (1) create a new table with the same dimensions, but with the coun

Re: [R] problem while installing packages in r

2012-09-11 Thread Milan Bouchet-Valat
Le mardi 11 septembre 2012 à 15:36 +0200, Ravichandra MONDRETI a écrit : > > Dear R users, > > > > Hope someone can help me to solve the problem. I have a problem > installing packages in to r . The following message was being displayed > in the console when I was trying to install 'rgdal' pa

[R] boot() with glm/gnm on a contingency table

2012-09-11 Thread Milan Bouchet-Valat
Hi everyone! In a package I'm developing, I have created a custom function to get jackknife standard errors for the parameters of a gnm model (which is essentially the same as a glm model for this issue). I'd like to add support for bootstrap using package boot, but I couldn't find how to proceed.

Re: [R] R- merging two matrix

2012-09-10 Thread Milan Bouchet-Valat
Le dimanche 09 septembre 2012 à 19:29 -0500, Sridhar Iyer a écrit : > Hi, > > I have two matrices. (same size, same number of rows, > same names for the rows - one has data in sorted > order, another one master data in unsorted order. I need to > combine both). > > Rows names of Matrix A > P, Q

Re: [R] Problem Installing a Package

2012-08-29 Thread Milan Bouchet-Valat
Le mercredi 29 août 2012 à 14:12 -0400, Stephen P. Molnar a écrit : > I have just installed the latest version of R on a openSUSE 12.1 system > running on an ORacle VM VirtualBox and have encountered a problem with > installing ChemometricsWithR. Here is the output: > > > library("compiler") >

Re: [R] spatial correlation in lme and huge correlation matrix (memory limit)

2012-08-29 Thread Milan Bouchet-Valat
Le mercredi 29 août 2012 à 16:00 -0400, Sabrina Plante a écrit : > Hi, > > I'm trying to introduce a (spatial) exponential correlation > structure (with range=200 and nugget.effet of 0.3) in a lme model of > this form: lme(ARBUS~YEAR, random=~1|IDSOUS). > > The structure of the data is "IDS

Re: [R] tapply confusion

2012-08-29 Thread Milan Bouchet-Valat
Le mercredi 29 août 2012 à 07:37 -0700, andyspeak a écrit : > Hello > I have a huge data frame with three columns 'Roof' 'Month' and 'Temp' > i want to run analyses on the numerical Temp data by the factors Roof and > Month, separately and together. > For using more than one factor i understand i s

Re: [R] define subset argument for function lm as variable?

2012-08-29 Thread Milan Bouchet-Valat
Le mercredi 29 août 2012 à 14:26 +0200, Milan Bouchet-Valat a écrit : > Le mercredi 29 août 2012 à 04:01 -0700, Joshua Wiley a écrit : > > On Wed, Aug 29, 2012 at 3:56 AM, Milan Bouchet-Valat > > wrote: > > > Le mardi 21 août 2012 à 07:51 -0700, Joshua Wiley a

Re: [R] define subset argument for function lm as variable?

2012-08-29 Thread Milan Bouchet-Valat
Le mercredi 29 août 2012 à 04:01 -0700, Joshua Wiley a écrit : > On Wed, Aug 29, 2012 at 3:56 AM, Milan Bouchet-Valat > wrote: > > Le mardi 21 août 2012 à 07:51 -0700, Joshua Wiley a écrit : > >> Hi Rainer, > >> > >> You could try: > >> >

Re: [R] define subset argument for function lm as variable?

2012-08-29 Thread Milan Bouchet-Valat
Le mardi 21 août 2012 à 07:51 -0700, Joshua Wiley a écrit : > Hi Rainer, > > You could try: > > subs <- expression(dead==FALSE & recTreat==FALSE) > > lme(formula, subset = eval(subs)) > > Not tested, but something along those lines should work. Out of curiosity, why isn't "subset" (and "weights

[R] Different cluster orderings from cutree() and cut.dendrogram()

2012-08-12 Thread Milan Bouchet-Valat
Hi! I just discovered that cutree() and cut.dendrogram() do not assign the same cluster numberings when called on the same tree. More specifically, cutree() assigns cluster numbers by order of appearance in the data, while cut.dendrogram() sorts clusters by height (see example below). I guess this

Re: [R] Find out what "native.enc" corresponds to

2012-08-05 Thread Milan Bouchet-Valat
Le dimanche 05 août 2012 à 10:04 +0100, Prof Brian Ripley a écrit : > On 05/08/2012 09:54, Milan Bouchet-Valat wrote: > > Hi! > > > > I'm using R2HTML in my RcmdrPlugin.temis package to output localized > > strings to a HTML file. Thus, I insert a simple head

[R] Find out what "native.enc" corresponds to

2012-08-05 Thread Milan Bouchet-Valat
Hi! I'm using R2HTML in my RcmdrPlugin.temis package to output localized strings to a HTML file. Thus, I insert a simple header at the top of the file to specify what encoding is used; if I don't do that, Web browsers assume it is latin1, which is not always true. My problem is, I could not find

Re: [R] Inconsistency using seq

2012-06-18 Thread Milan Bouchet-Valat
Le lundi 18 juin 2012 à 12:58 -0700, hamoreno a écrit : > Hi all, > > Is there any problem of precision when using seq?. For example: > > x<- seq(0,4,0.1) > x[4]=0.3 > > BUT: > > x[4]-0.3=5.551115e-17 > > It means when I use this condition within an if clause, it does not find > values with 0.

Re: [R] Customizing a Plot in Correspondence Analysis

2012-06-15 Thread Milan Bouchet-Valat
Le jeudi 14 juin 2012 à 20:32 -0400, Salvador Ramirez a écrit : > Hello, > > Using the Correspondence Analysis package (ca), I wonder if there is a way > to further customize the plot beyond the options given in plot.ca provided > by the mentioned package. > > The correspondence analysis I am doi

Re: [R] package tm: reading XML files

2012-05-29 Thread Milan Bouchet-Valat
Le mardi 29 mai 2012 à 10:03 +0200, Ad Feelders a écrit : > Dear fellow R users, > > I'm using the package tm for text mining, and have a problem with > reading in a corpus from XML files. > When I copy the example from "Introduction to the tm package" of the > small reuters subset "crude", ever

Re: [R] import contingency table

2012-05-28 Thread Milan Bouchet-Valat
Le lundi 28 mai 2012 à 15:19 +0200, sylvain willart a écrit : > no, > the problem is that the lines in my file do not correspond to > individuals, but are variables, just like are the columns, > my file is already a contingency table, with each cell being a frequency: > > here is a sample of it: >

Re: [R] dot - comma problem

2012-05-20 Thread Milan Bouchet-Valat
Le dimanche 20 mai 2012 à 23:52 +1000, may.k...@yahoo.de a écrit : > Dear all > > I am trying to use the ODB package to connect to an libreoffice-odb database. > The libreoffice package is german, thus, decimal separator is a comma. > However, > I can open the database and upload a it without e

Re: [R] Help with stemDocument

2012-05-12 Thread Milan Bouchet-Valat
Le jeudi 10 mai 2012 à 17:12 -0700, Triss.Ashton a écrit : > Alekseiy, I tried your recommendation with several variations. It still does > not run. I think the problem has to do with R2.15 and the refreshed TM > package. It works here with R 2.15.0 and tm 0.5-7.2 (development version), all other

Re: [R] Dividing tick-data into intervalls

2012-05-08 Thread Milan Bouchet-Valat
Le mardi 08 mai 2012 à 10:44 +0200, osvald wiklander a écrit : > > > > Hi everybody, I am sorry that I am kind of spamming this forum, but I > have searched for some input everywhere and cant really find a nice > solution for my problem. > > Data looks like: > >

Re: [R] NA's when subset in a dataframe

2012-05-03 Thread Milan Bouchet-Valat
Le jeudi 03 mai 2012 à 07:37 -0700, agent dunham a écrit : > Dear community, > > I'm having this silly problem. > > I've a linear model. After fixing it, I wanted to know which data had > studentized residuals larger than 3, so i tried this: > > d1 <- cooks.distance(lmmodel) > r <- sqrt(abs(rs

Re: [R] how to write html output (webscraped using RCurl package) into file?

2012-04-21 Thread Milan Bouchet-Valat
Le samedi 21 avril 2012 à 07:05 -0700, sagarnikam123 a écrit : > i want > "http://scop.berkeley.edu/astral/pdbstyle/?id=d1fjgc2&output=html",showing > information in webpage to be written in .txt file as it is(i don't want any > html tag) > i am using "RCurl" package > > >marathi<-htmlTreeParse("h

Re: [R] Sort out number on value

2012-04-20 Thread Milan Bouchet-Valat
Le vendredi 20 avril 2012 à 03:26 -0700, Yellow a écrit : > Can anyone help me maybe with a question I can seem to find an answer on. > > I have this: x = c(1, 5, 70, 53, 7, 29, 75, 37, 30, 11) > > And I would like to have the numbers above 20 selected out. > But I can't find what code I need

Re: [R] $ operator is invalid for atomic vectors

2012-04-19 Thread Milan Bouchet-Valat
Le jeudi 19 avril 2012 à 09:34 +0300, Ana-Maria Dobre a écrit : > I have got the following statement: > > *> overview.domains$sample.var <- aggregate(migr$amigo.migr, > by=list(siruta=amigo$siruta), var)[,-1]/overview.domains$n.i.* > *Error in migr$amigo.migr : $ operator is invalid for atomic vec

Re: [R] problem extracting data from a set of list vectors

2012-04-18 Thread Milan Bouchet-Valat
Le mercredi 18 avril 2012 à 13:13 -0700, Vining, Kelly a écrit : > Dear useRs, > > A colleague has sent me several batches of output I need to process, and I'm > struggling with the format to the point that I don't even know how to extract > a test set to upload here. My apologies, but I think t

Re: [R] getting the value from previous row

2012-04-13 Thread Milan Bouchet-Valat
Le vendredi 13 avril 2012 à 06:09 -0700, arunkumar a écrit : > Hi > > I've a dataset with record A = 100,200,300,400... > > There will be a parameter n. say n=10 means i have add 10% of previous > value to the current row > > current_Val New_value > 100 100 > 200

Re: [R] How do I convert factors to numeric? It's an FAQ but...

2012-04-13 Thread Milan Bouchet-Valat
Le vendredi 13 avril 2012 à 13:08 +, John Coulthard a écrit : > Dear R list people > > I loaded a file of numbers into R and got a dataframe of factors. So I tried > to convert it to numeric as per the FAQ using as.numeric(). But I'm getting > errors (please see example), so what am I gett

Re: [R] R Large Dataset Problem

2012-04-13 Thread Milan Bouchet-Valat
Le vendredi 13 avril 2012 à 05:44 -0700, efulas a écrit : > Thank you very much for your helps guys. Both message help me to run the data > in R. However, R is omitting many columns from my data. Am i missing > something? Please read the posting guide. If you don't provide the code you ran and the

Re: [R] R Large Dataset Problem

2012-04-13 Thread Milan Bouchet-Valat
Le vendredi 13 avril 2012 à 04:32 -0700, efulas a écrit : > Dear All, > > I have a problem with my data. First problem is that my data is really > large and R is omitting some columns from my data. Is there any way to read > the whole data without omitting. How did you import it? Please be precis

Re: [R] Can't get R to recognize Java for rJava installation

2012-04-13 Thread Milan Bouchet-Valat
Le jeudi 12 avril 2012 à 13:41 -0700, Waichler, Scott R a écrit : > Hi, I am unable to install the package rJava. I tried doing what the output > suggests, but it doesn't help. How can I get R to find/recognize my Java > installation? I am running R-2.15.0. > > waichler@snow> sudo R CMD javar

Re: [R] Recode Variable

2012-04-12 Thread Milan Bouchet-Valat
Le jeudi 12 avril 2012 à 11:08 +0200, David Studer a écrit : > Hello everybody, > > I know this is pretty basic stuff, but could anyone explain me how to > recode a single value of a variable > into a missing value? > > I used to do it like this: > > myData[myData$var1==5;"var1"]<-NA

Re: [R] Recode Variable

2012-04-12 Thread Milan Bouchet-Valat
Le jeudi 12 avril 2012 à 12:29 +0300, Tal Galili a écrit : > Hi David, > You bring up a good question. I am not sure what is the "right" way to > solve it. But here is a simple solution I put together: > > x = c(1:10,5) > y = x > x[c(2,3)] <- NA > > # reproducing the problem: > y[x==5] > > na2

Re: [R] indexing data.frame columns

2012-04-05 Thread Milan Bouchet-Valat
Le jeudi 05 avril 2012 à 12:40 -0700, Peter Meilstrup a écrit : > Consider the data.frame: > > df <- data.frame(A = c(1,4,2,6,7,3,6), B= c(3,7,2,7,3,5,4), C = > c(2,7,5,2,7,4,5), index = c("A","B","A","C","B","B","C")) > > I want to select the column specified in 'index' for every row of 'df', to

Re: [R] How to get the most frequent value of the subgroup

2012-03-30 Thread Milan Bouchet-Valat
Le vendredi 30 mars 2012 à 11:39 -0400, David Winsemius a écrit : > On Mar 30, 2012, at 3:38 AM, Milan Bouchet-Valat wrote: > > > Le jeudi 29 mars 2012 à 09:49 -0500, Yongsuhk Jung a écrit : > >> Dear Members of the R-Help, > >> > >> > >> >

Re: [R] How to get the most frequent value of the subgroup

2012-03-30 Thread Milan Bouchet-Valat
Le jeudi 29 mars 2012 à 09:49 -0500, Yongsuhk Jung a écrit : > Dear Members of the R-Help, > > > > While using a R function - 'aggregate' that you developed, I become to have > a question. > > In that function, > > > > > aggregate(x, by, FUN, ..., simplify = TRUE) > > > > I was wondering

Re: [R] trouble for parsing HTML files

2012-03-23 Thread Milan Bouchet-Valat
Le vendredi 23 mars 2012 à 08:10 +0100, Julien Velcin a écrit : > Here it is: > > R version 2.14.2 (2012-02-29) > Platform: i386-apple-darwin9.8.0/i386 (32-bit) > > locale: > [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 I guess the OS uses a French locale? Maybe the discrepan

Re: [R] trouble for parsing HTML files

2012-03-22 Thread Milan Bouchet-Valat
Le jeudi 22 mars 2012 à 17:20 +0100, Julien Velcin a écrit : > Hi all, > > Using the XML package, I'm not able to parse some html webpages. Here > is my code and the error message: > > library("XML") > url <- "http://www.huffingtonpost.com/social/GraniteSkyline?action=fans"; > doc <- htmlParse(

Re: [R] contingency tables

2012-03-16 Thread Milan Bouchet-Valat
Le vendredi 16 mars 2012 à 06:46 -0700, mari681 a écrit : > Ok, before I definetly give up, and throw the laptop out of the window, or > fill my data.frame manually, I'll ask for some help. > I have a data.frame named MyTable with 3 columns, that looks like this: > The elements on the first colum

Re: [R] Apply a loop containing a function on a list

2012-03-14 Thread Milan Bouchet-Valat
Le mercredi 14 mars 2012 à 00:51 -0700, ali_protocol a écrit : > Hi all, > I want to do this: > > B.list$aa= (a loop containing My.fun acting on the reults of second > function on a A.list$aa)) > or, overally > B.list$aa = function (A.list$aa) > B.list and A.list has ma

Re: [R] (no subject)

2012-03-12 Thread Milan Bouchet-Valat
Le lundi 12 mars 2012 à 14:48 +, aoife doherty a écrit : > Hey guys, > > if i do a correspondance analysis, e.g.: > > table <- structure(c(4, 7, 0.2, 3, .1, 7, 222, 3, 10, 5, 11, >8, 8, 10, 7), .Dim = c(5L, 3L), .Dimnames = list(c("gene1", >"gene2", "gene3", "gene4", "gene5"), c("codo

Re: [R] For loop and using its index

2012-03-09 Thread Milan Bouchet-Valat
Le vendredi 09 mars 2012 à 13:24 +0330, Hassan Eini Zinab a écrit : > Dear All, > > I have a data set with variables x1, x2, x3, ..., x20 and I want to > create z1, z2, z3, ..., z20 with the following formula: > > > z1 = 200 - x1 > z2 = 200 - x2 > z3 = 200 - x3 > . > . > . > z20 = 200 - x20. >

Re: [R] find points on a graph

2012-03-07 Thread Milan Bouchet-Valat
Le mercredi 07 mars 2012 à 01:40 -0800, aoife a écrit : > Hey guys, Can anyone help? > > I did a correspondance analysis and made a plot. > > I also have a specific list of nodes that i want to find in my plot and want > to either color the nodes that appear in my list differently, or put some >

Re: [R] TM reader with text

2012-03-04 Thread Milan Bouchet-Valat
Le samedi 03 mars 2012 à 16:56 -0800, Mickael R problem a écrit : > Hello everybody, > I don't give up the fight, but it's hard. I have finded a solution for the > ligature with a best converter wich tranlated more precisely PDF to plain > text. But a new problem has occured. In french particulary,

Re: [R] TM reader with text

2012-03-01 Thread Milan Bouchet-Valat
Le jeudi 01 mars 2012 à 07:07 -0800, Mickael R problem a écrit : > Hi Richard, > clearly there is a problem with latin ligature because the word resulting > from my ask with findFreqTerms give me some words > "n" > > "nancement" > >> "nancier" "nancière""nancières" >

Re: [R] memory management

2012-02-29 Thread Milan Bouchet-Valat
Le mercredi 29 février 2012 à 11:42 -0500, Sam Steingold a écrit : > > * William Dunlap [2012-02-28 23:06:54 +]: > > > > You need to walk through the objects, checking for environments on > > each component or attribute of an object. > > so why doesn't object.size do that? > > > > f <- fun

Re: [R] Interpreting the Results of GLM

2012-02-29 Thread Milan Bouchet-Valat
Le mardi 28 février 2012 à 02:48 -0800, sazzle a écrit : > Hi, I'm wondering if you can help me, this is a really simple query but I > keep getting confused. I have run a GLM to see how boldness varies over > time following a particular treatment. The results are as follows... > > Call: glm(for

Re: [R] tm_map help

2012-02-27 Thread Milan Bouchet-Valat
Le lundi 27 février 2012 à 10:47 +1100, Sachinthaka Abeywardana a écrit : > Hi all, > > I am trying to do some text mining with twitter and I am getting the error: > > Error in structure(names(sapply(possibleCompletions, "[", 1)), names = x) : > 'names' attribute [1] must be the same length as

Re: [R] Installing rgl

2012-02-22 Thread Milan Bouchet-Valat
Le mercredi 22 février 2012 à 14:00 -0500, R. Michael Weylandt a écrit : > I haven't been following this thread so I may be off base, but are you > sure you don't mean plot(ca(table))? > > ca is a function from the ca package -- you want to plot the output of > the function, not the function itsel

Re: [R] Query: list within a list

2012-02-22 Thread Milan Bouchet-Valat
Le mercredi 22 février 2012 à 16:17 +0100, Stefano Sofia a écrit : > Dear R users, > I have difficulty to create a list within a list. > Example: with > > > A <- vector(mode="list", 4) > > I create a list of 4 elements: > > A > [[1]] > NULL > > [[2]] > NULL > > [[3]] > NULL > > [[4]] > NULL >

Re: [R] Loop

2012-02-22 Thread Milan Bouchet-Valat
Le mercredi 22 février 2012 à 05:40 -0800, Florian Weiler a écrit : > Thanks for the answer, and sorry if I was not clear. > > So I run the data imputation using mice with 10 chains and then I get a > mids-object. From that object I can then extract 10 data sets using the > complete(imp, n) comman

Re: [R] Installing rgl

2012-02-22 Thread Milan Bouchet-Valat
Le mercredi 22 février 2012 à 04:51 -0800, aoife a écrit : > Because for example I've done this: > > I made a simple table: > > A B C > G11 34 231 > G2231 1 0.1 > G312 0.0223 > > > and ran a correspondance analysis on it using the ca p

Re: [R] read.csv error: invalid multibyte string

2012-02-19 Thread Milan Bouchet-Valat
Le samedi 31 décembre 2011 à 07:05 -0800, Dennis Fisher a écrit : > R version: 2.13.1 > OS X > > Colleagues, > > I am working with a CSV file; for testing purposes, I created an XLS version > of the file. > When I read these files using read.xls (gdata) or read.csv, I encounter an > error: >

Re: [R] R-help Digest, Vol 108, Issue 13

2012-02-13 Thread Milan Bouchet-Valat
Le lundi 13 février 2012 à 19:48 +0800, 丁飞 a écrit : > dear: > i want to know how to get a survival curve of the Cox proportional risk > regression, thank you. See the relevant part of the "Survival" Task View here: http://cran.r-project.org/web/views/Survival.html And more specifically, see the

[R] Tr: Re: how to pass weka classifier options with a meta classifier in RWeka?

2012-02-09 Thread Milan Bouchet-Valat
Le jeudi 09 février 2012 à 15:31 +0200, Kari Ruohonen a écrit : > Hi, > I am trying to replicate a training of AttributeSelectedClassifier with > CFsSubsetEval, BestFirst and NaiveBayes that I have initially done with > Weka. Now, I am trying to use RWeka in R. > > I have a problem of passing argu

Re: [R] Problem with Snowball & RWeka

2012-02-06 Thread Milan Bouchet-Valat
Le jeudi 12 janvier 2012 à 15:18 -0800, plecto a écrit : > Thanks! > I read your "shoer term" solution and thanks to it was able to make stemming > working in R for Mac OS X. > I actually used Sys.setenv(NOAWT=TRUE) instead of Sys.setenv("NOAWT", > "true"), as the latter produces the following err

Re: [R] sapply help

2012-02-04 Thread Milan Bouchet-Valat
Le vendredi 03 février 2012 à 18:51 +, William Dunlap a écrit : > Instead of colSums(t(aMatrix)), why not the more > direct rowSums(aMatrix)? Because I felt it was more didactic. The question was about counting occurrences per column, so using rowSums() could be a little confusing without an ex

Re: [R] sapply help

2012-02-03 Thread Milan Bouchet-Valat
Le vendredi 03 février 2012 à 18:27 +0100, Ernest Adrogué a écrit : > 3-02-2012, 08:37 (-0800); Filoche escriu: > > Hi every one. > > > > I'm learning how to use sapply (and other function of this family). > > > > Here's what I'm trying to do. > > > > I have a vector of lets say 5 elements. I al

Re: [R] While loop working with TRUE/FALSE?

2012-02-01 Thread Milan Bouchet-Valat
Le mercredi 01 février 2012 à 07:55 -0800, Chris82 a écrit : > Hi R users, > > is there any possibilty that a while loop is working like that: > > z <- c(0,1,2,3,4,5,6,7,8,9) > r <- 7 > >while(w == T) { > for ( i in 1:10 ){ > w <- r == z[i] > print(w)

Re: [R] handling a lot of data

2012-01-30 Thread Milan Bouchet-Valat
Le lundi 30 janvier 2012 à 09:54 +0100, Petr Kurtin a écrit : > Hi, > > I have got a lot of SPSS data for years 1993-2010. I load all data into > lists so I can easily index the values over the years. Unfortunately loaded > data occupy quite a lot of memory (10Gb) - so my question is, what's the >

Re: [R] how to select columns

2012-01-30 Thread Milan Bouchet-Valat
Le lundi 30 janvier 2012 à 08:30 +0100, David Studer a écrit : > Hello, > I have the following question: > > when creating a data.frame > a1<-c(1,2,3) > a2<-c(1,2,3) > c<-data.frame(a1,a2) > I can select columns using an index like: > c[,1:2] > Is this possible too when using column-names? (som

Re: [R] about "undefined columns selected"

2012-01-30 Thread Milan Bouchet-Valat
Le dimanche 29 janvier 2012 à 21:50 -0500, xiaocong zuo a écrit : > Hi,all, > > when I run the below code,there is an error occured. could you please tell > me how to treat it? > > pdf('covariate.pdf') > > par(mfrow=c(1,1)) > > pairs(data2[,c("ID","TYPE","AGE","GNDR","HT")], > + panel=function(x,y

Re: [R] tm package: handling contractions

2012-01-27 Thread Milan Bouchet-Valat
Le vendredi 27 janvier 2012 à 09:50 -0500, Michael Friendly a écrit : > I tried making a wordcloud of Obama's State of the Union address using > the tm package to process the text > > sotu <- scan(file="c:/R/data/sotu2012.txt", what="character") > sotu <- tolower(sotu) > corp <-Corpus(VectorSourc

Re: [R] formula error inside function

2012-01-25 Thread Milan Bouchet-Valat
Le mardi 24 janvier 2012 à 23:02 -0800, moli a écrit : > I want use survfit() and basehaz() inside a function, but it doesn't work. > Could you take a look at this problem. Thanks for your help. Following is my > codes: > Error in formula.default(object, env = baseenv()) : invalid formula > >

Re: [R] How do I compare 47 GLM models with 1 to 5 interactions and unique combinations?

2012-01-25 Thread Milan Bouchet-Valat
Le mardi 24 janvier 2012 à 20:41 -0800, Jhope a écrit : > Hi R-listers, > > I have developed 47 GLM models with different combinations of interactions > from 1 variable to 5 variables. I have manually made each model separately > and put them into individual tables (organized by the number of vari

Re: [R] conversion of string

2012-01-23 Thread Milan Bouchet-Valat
Le lundi 23 janvier 2012 à 00:35 -0800, uday a écrit : > I new in R programming language. > > I have some time data > > time > [1] "2005-01-03 05:11:39 UTC" "2005-01-03 06:36:02 UTC" "2005-01-03 > 06:36:55 UTC" > [4] "2005-01-03 06:37:00 UTC" "2005-01-03 06:38:04 UTC" "2005-01-03 > 06:38:04

Re: [R] GUI

2012-01-18 Thread Milan Bouchet-Valat
Le mercredi 18 janvier 2012 à 16:23 +0100, Poul Kristensen a écrit : > How differs Rstudio from RKward? They seem to be quite similar, but their feature seats are somewhat different. I don't know RStudio enough to tell. > I am not aware of the frequence of releases in R but I think it should > be

<    1   2   3   >