Re: [R] Installing R in Linux: problems with JAVA packages (rJava, RWeka, ...) ?

2008-10-21 Thread Bernardo Rangel Tura
Em Ter, 2008-10-21 às 15:36 +0100, Paulo Cortez escreveu: > Hi, > > While in MacOS it is quite simple to install R and Java packages, the > same is not true for Linux. I surfed the web and it seems that other > users also have similar problems. Perhaps a nice FAQ answer or HOWTO > would help...

Re: [R] Staging area for data before read into R

2008-10-21 Thread Dr Eberhard W Lisse
I fully agree, with important or large data sets you can not be paranoid enough. linux and the mac allow you to easily write scripts that handle dumping, zipping, copying (locally and elsewhere) and verifying the data. Once written correctly and tested they can run fully automatic with cron. Been

[R] R v.2.7.1

2008-10-21 Thread Santosh
Dear R users, I am recently faced with a problem of "insufficient memory due to resizing"... or something similar. This happens when I try to plot several plots.. Earlier I used to plot 50+ plots (50 windows) without any problems. Now, I can't plot more than 15 odd plots(15 windows)..Exceeding 15 p

Re: [R] code works in R desktop but not iin RWeb - How do I modify to get it working in RWeb, please?

2008-10-21 Thread Yihui Xie
"c:/test8.txt" is in *your* local disk, so Rweb cannot read the data file! You should submit your data to Rweb using the button "Browse" which will "Select a local file to submit". Note the name of the data variable will be 'X' (instead of your 'happyguys'). Regards, Yihui -- Yihui Xie <[EMAIL PRO

[R] card games

2008-10-21 Thread Erin Hodgess
Dear R People: Are there any packages to play card games, please? In particular, poker or black jack? Thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: [EMAIL PROTECTED] _

Re: [R] ggplot scale limit and stat_smooth

2008-10-21 Thread hadley wickham
Hi Eric, > In the change log of ggplot2, version 0.7, I find this: > > "* scales: any point outside of limits is dropped (this was previously the > behaviour for discrete scales, but not continuous scales)" > > and that makes sense for some applications. But what about if I > want to summarize th

[R] ggplot scale limit and stat_smooth

2008-10-21 Thread rmailbox
In the change log of ggplot2, version 0.7, I find this: "* scales: any point outside of limits is dropped (this was previously the behaviour for discrete scales, but not continuous scales)" and that makes sense for some applications. But what about if I want to summarize the data with a smooth

[R] Complex Numbers and Bayesian Statistical Modelling.

2008-10-21 Thread Marcus Vinicius
Dear all, Is there anyone that may help me to use complex numbers and Bayesian Statistical Modelling? Thanks a lot. Best regards. Marcus Vinicius [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mail

Re: [R] convert into numeric variable

2008-10-21 Thread Gabor Grothendieck
Use readLines to read your data into Lines.in. Then delete percentages and right parens followed by replacing left parens followed by zero or more spaces with a minus. Then re-read using read.table. Lines <- "4.61%( 4.11%) 29.85% ( 1.27%) 16.04% 21.31% 14.09% 39.71% 4.61%( 4.11%) 29

Re: [R] Bootstrap

2008-10-21 Thread Daniel Malter
Two data frames, data.x and data.y with one random variable and one identifier variable each. Two methods to merge them, one the "brute force" approach, the other using R's merge() function: data.x=data.frame(rnorm(100,0,1),1:100) ##data.x is already orderer by id names(data.x)=c("x","x.id") dat

[R] convert into numeric variable

2008-10-21 Thread Young Cho
Hi, I have an accounting data with "%" at the end and "()" for negative. E.g. if I read in with read.table, then R reads in as a factor: [11625] 4.61%( 4.11%) 29.85% ( 1.27%) 16.04% 21.31% 14.09% 39.71% [11633] 3.03%17.39% 80.13% 6648 Levels: ( 0.00%) ( 0.03%) ( 0.04%) ( 0.05%)

[R] Bootstrap

2008-10-21 Thread Marcioestat
Hi listers, I've been work on a bootstrap estimator and I don't know how to make a certain manipulation at the data. As an example I have the following data and samples... I need now to identify the vector in wich I sampled the id, I mean that I have to merge the files having the key as the id of

Re: [R] R 2.8.0 is released

2008-10-21 Thread Jeroen Ooms
Yes I indeed explicitly compiled with --without-x. You were right, it was just a simple missing semicolon. I fixed it by adding a simicolon at the end of line 1657 in the file /src/main.platform.c: int X11 = FALSE; Something to fix in the new version, though. On Mon, Oct 20, 2008 at 10:39 PM, Dun

Re: [R] Staging area for data before read into R

2008-10-21 Thread Gabor Grothendieck
It was in Excel 2003 too so you must not have used Excel for years. On Tue, Oct 21, 2008 at 6:36 PM, Ted Byers <[EMAIL PROTECTED]> wrote: > Ah, OK. That is new since I used Excel last. > > Thanks > > On Tue, Oct 21, 2008 at 5:52 PM, Gabor Grothendieck > <[EMAIL PROTECTED]> wrote: >> You can creat

Re: [R] Staging area for data before read into R

2008-10-21 Thread Ted Byers
Ah, OK. That is new since I used Excel last. Thanks On Tue, Oct 21, 2008 at 5:52 PM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > You can create data entry forms without VB in Excel too. > > On Tue, Oct 21, 2008 at 5:09 PM, Ted Byers <[EMAIL PROTECTED]> wrote: >> >> I wasn't suggesting that t

Re: [R] R Help

2008-10-21 Thread Gabor Grothendieck
You can't mix character and numeric in a zoo object. Also note that lag.zoo can be used so you don't have to construct the lag yourself. library(zoo) set.seed(1) z <- zoo(rnorm(10), as.Date(1:10)) # these are the same except upmove is logical series # upmovenum is numeric series and move is a fac

Re: [R] pdf creation error

2008-10-21 Thread David Scott
On Tue, 21 Oct 2008, Stephan Kolassa wrote: Hi JD, do you have the pdf open in some app, e.g., Acrobat Reader? If the file is open, R can't write on it. My (German) errors in this case look like yours: Fehler in pdf(paste(pic.directory, "/full_map.pdf", sep = "")) : unable to start device p

Re: [R] Staging area for data before read into R

2008-10-21 Thread Gabor Grothendieck
You can create data entry forms without VB in Excel too. On Tue, Oct 21, 2008 at 5:09 PM, Ted Byers <[EMAIL PROTECTED]> wrote: > > I wasn't suggesting that the validation requires VB. > > Creating forms and handling form events does (unless MS has introduced new > utilities to hide all that since

Re: [R] R Help

2008-10-21 Thread Ben Bolker
Boyce, Morgan bankofamerica.com> writes: PS: it would be a good idea to use a more informative subject line (say, something like "problem with comparison in data frames"). Most of the e-mail that comes to the R help list is about "R Help" (oddly enough) ... Ben Bolker ___

Re: [R] Staging area for data before read into R

2008-10-21 Thread Ted Byers
No. Excel, like most spreadsheets, does what it designed for reasonably well. It is easy to find fault, but not so easy to satisfy all one's critics. There is no doubt that Excel has faults, but it provides significant modelling and analysis capability to users with no programming expertise or

Re: [R] R Help

2008-10-21 Thread Ben Bolker
Boyce, Morgan bankofamerica.com> writes: > > y.JIBqq[,1][y.JIBqq[,1]> y.JIBqq[,2]]<-'up move' > y.JIBqq[,1][y.JIBqq[,1]< y.JIBqq[,2]]<-'down move' Your first command above makes y.JIBqq[,1] into a character vector (rather than numeric), which then makes the subsequent comparison

Re: [R] Scatterplot Matrix

2008-10-21 Thread Greg Snow
The functions pairs (base) and splom (lattice) both accept panel arguments that do the actual plotting. In the case of pairs, the default panel function is points. Just write a function that does what you want using points, etc, then pass that function as the panel argument in pairs (similar p

[R] how to plot the histogram and the curve in the same graph

2008-10-21 Thread Carl Witthoft
Here is some code that more or less does what you want -- not a true histogram, but all else is in place. Feel free to modify, give away, etc. No copyright ;-) myhist<-function(data,breaks="Sturges",xlabel="data value",ylabel='counts',curve=TRUE, title="myhist.R made this fake histogram",sdf=

Re: [R] subscripting a one column matrix drops dimension

2008-10-21 Thread moacir
Thank you all. It's not easy to find the right keywords to search for some things. My problem was related to the cclust package, and I still think that the cclust code will not work for unidimensional data. I will fix the my copy of the cclust code according to your suggestion. Moacir Pedroso Jr

[R] Scatterplot Matrix

2008-10-21 Thread DISABATINO, LYDIA
Is there any way to make the points on my scatterplot matrix correspond to numbers instead of dots? I know how to do this on a regular 2-variable scatterplot but not on the matrix. Thanks! -Lydia [[alternative HTML version deleted]] __ R-h

Re: [R] Staging area for data before read into R

2008-10-21 Thread Ted Byers
I wasn't suggesting that the validation requires VB. Creating forms and handling form events does (unless MS has introduced new utilities to hide all that since last I used it). Some of the most interesting things I have seen done with Excel did involve VB, and there are better tools to do mos

Re: [R] ggplot2: how to combine position=stack and position=dodge in a single graph?

2008-10-21 Thread Elena Schulz
Hi Hadley, my problem is that I want to compare data for different years month by month. Each bar for a month is devided into two or more sections (-> stacking) By having all data of the same month right next to each other (-> dodging) comparision is much more easy than using faceting which d

[R] R Help

2008-10-21 Thread Boyce, Morgan
Hi, I have the following code and am using R 2.7.2: JIBqq <- (Jqrt.IB[2:length(Jqrt.IB)]/Jqrt.IB[1:(length(Jqrt.IB)-1)])-1 JIBqq <- cbind(zoo(JIBqq, Jqrt.time[2:length(Jqrt.time)])) y.JIBqq <- merge(JIBqq,lag(JIBqq,-1)) > y.JIBqq JIBqq l

Re: [R] subscripting a one column matrix drops dimension

2008-10-21 Thread Jeff Ryan
This is expected behavior: ?'[' Usage: x[i] x[i, j, ... , drop = TRUE] drop: For matrices and arrays. If 'TRUE' the result is coerced to the lowest possible dimension (see the examples). This only works for extracting elements, not for the replacement. See

Re: [R] Error in sample(colnames(B), 10) : invalid 'x' argument

2008-10-21 Thread Patrick Burns
What I would do (and I think a lot of people on this list) is to type: colnames(B) to see why 'sample' might not like it. There are debugging tools in R, this seems like a good opportunity to use them. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poe

Re: [R] GGPLOT/QPLOT Boxplot with summary

2008-10-21 Thread hadley wickham
Here's two quick thoughts: qplot(1, mpg, data=mtcars, geom="boxplot") + facet_grid(. ~ cyl, margins =T) qplot(factor(cyl), mpg, data=mtcars, geom="boxplot") + geom_boxplot(aes(x = "all"), width = 0.9) Hadley On Tue, Oct 21, 2008 at 12:41 PM, SalishSea <[EMAIL PROTECTED]> wrote: > > I'd like to g

Re: [R] Inserting a new row in a matrix

2008-10-21 Thread culpritNr1
Hi Alwx99, Nobody has answered your email, so, I am left with the honour of disappointing you. In R, matrices are not dynamically allocated. If you are a C/C++/Fortran/etc programmer you know what I am talking about. Lets assume that you are not such programmer. Inserting a row would tell R to

Re: [R] subscripting a one column matrix drops dimension

2008-10-21 Thread jim holtman
You need drop=FALSE: see ?'[' > x<- matrix(rnorm(100), ncol=1) > str(x) num [1:100, 1] -0.626 0.184 -0.836 1.595 0.330 ... > str(x[20:30,]) num [1:11] 0.5939 0.9190 0.7821 0.0746 -1.9894 ... > str(x[20:30,,drop=FALSE]) num [1:11, 1] 0.5939 0.9190 0.7821 0.0746 -1.9894 ... > On Tu

Re: [R] Inserting a new row in a matrix

2008-10-21 Thread jim holtman
What is 'insertRow'? Is it returning a value? It must be since you can not change the value of parameters. Maybe you need: Ave <- insertRow(Avg,i,colMeans(res)) On Tue, Oct 21, 2008 at 2:19 PM, Alex99 <[EMAIL PROTECTED]> wrote: > > Hi guys, > > I need to insert a row to a matrix in a for loop.

Re: [R] Staging area for data before read into R

2008-10-21 Thread Gabor Grothendieck
On Tue, Oct 21, 2008 at 3:18 PM, Ted Byers <[EMAIL PROTECTED]> wrote: > There are tradeoffs no matter what route you take. > You can do validation in Access as you can in Excel, but Excel is not > designed to manage data where Access is, and both are crippled by their > dependance on VB (a seriouus

Re: [R] Exclude rows in table

2008-10-21 Thread Philipp Pagel
On Tue, Oct 21, 2008 at 03:52:05PM +0200, Jim Gustafsson wrote: > I have the following type of table (with number of rows = 4765) and want > to exclude each row where Net=0. Could this be done in a simple way? subset(A, Net!=0) or A[A$Net!=0, ] See manual, section 2.7 cu Philipp --

Re: [R] subscripting a one column matrix drops dimension

2008-10-21 Thread Rolf Turner
On 22/10/2008, at 2:24 AM, Pedroso MOACIR wrote: Hi all, Why subscripting a one column matrix drops one dimension? x<- matrix(rnorm(100), ncol=1) str(x) num [1:100, 1] -0.413 -0.845 -1.625 -1.393 0.507 ... str(x[20:30,]) num [1:11] -0.315 -0.693 -0.771 0.448 0.204 ... str(x[20:

Re: [R] Getting names of variables without quotes

2008-10-21 Thread jim holtman
How about putting them to an output file: pdf("your file name.pdf") ts.plot(...) dev.off() On Tue, Oct 21, 2008 at 2:36 PM, Amarjit Singh Sethi <[EMAIL PROTECTED]> wrote: > Dear Menne/ Jorge > > Many thanks for the help rendered by you both. > > Now, may I augment my problem. > > While running th

Re: [R] Determine package version in R

2008-10-21 Thread Philipp Pagel
> I have two versions of the lattice package installed on my computer. > How can I check to make sure that this version gets loaded sessionInfo() cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihensteph

[R] subscripting a one column matrix drops dimension

2008-10-21 Thread moacir
Hi all, Well, I just sent a help msg to the list with this subject, but I think I figured out a way to solve my problem (although I still have no clue if the behavior I described is correct). What I did was to replace occurrences of (for example) cov(x[sub, ]) with

Re: [R] Determine package version in R

2008-10-21 Thread Dirk Eddelbuettel
Chris, On 21 October 2008 at 11:54, cddesjar wrote: | | I have two versions of the lattice package installed on my computer. One is | at /usr/local/lib/R/site-library and the other one is at /usr/lib/R/library. | The one at the former location is the newer version and the one that I want | to

Re: [R] Staging area for data before read into R

2008-10-21 Thread Rolf Turner
On 22/10/2008, at 8:18 AM, Ted Byers wrote: ... even with all the power and utility of Excel ... Is this some kind of joke? cheers, Rolf Turner ## Attention:\ This e-mail message

Re: [R] subscripting a one column matrix drops dimension

2008-10-21 Thread Charles C. Berry
Two solutions: 1) Follow the Posting Guide 2) Use the function help.request() [new to R-2.8.0] to figure how what steps to take. Each method leads to the solution here: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-my-matrices-lose-dimensions_003f

Re: [R] pdf creation error

2008-10-21 Thread Stephan Kolassa
Hi JD, do you have the pdf open in some app, e.g., Acrobat Reader? If the file is open, R can't write on it. My (German) errors in this case look like yours: Fehler in pdf(paste(pic.directory, "/full_map.pdf", sep = "")) : unable to start device pdf Zusätzlich: Warning message: In pdf(paste

Re: [R] unimodal VS bimodal normal distribution - how to get a pvalue?

2008-10-21 Thread Emmanuel Levy
Hi Duncan, I'm really stupid --- yes of course!! Thanks for pointing me out the (now) obvious. All the best, E 2008/10/21 Duncan Murdoch <[EMAIL PROTECTED]>: > On 10/21/2008 2:56 PM, Emmanuel Levy wrote: >> >> Dear All, >> >> I have a distribution of values and I would like to assess the >> un

Re: [R] plot the chi square distribution and the histogram in the same graph

2008-10-21 Thread Rubén Roa-Ureta
leo_wa wrote: In the previous post ,i ask how to plot the normal curve and the histogram in the same graph.if i want to know how to plot the chi square distribution to campare the data set ,how can i do that? You should make up your mind, is your random variable X (-inf,+inf) or Sum(X^2) (wh

Re: [R] Exclude rows in table

2008-10-21 Thread Bert Gunter
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Gustafsson Sent: Tuesday, October 21, 2008 6:52 AM To: [EMAIL PROTECTED] Subject: [R] Exclude rows in table Dear R-Help, I have the following type of table (with number of rows = 4765) and want to e

Re: [R] pdf creation error

2008-10-21 Thread Ray Brownrigg
You just don't have write access to the directory you are working in. That's what the second part of the message is telling you. HTH Ray Brownrigg Victoria University of Welington On Wed, 22 Oct 2008, j daniel wrote: > Hello - > > I am trying to create a pdf file in R, but I keep getting an er

Re: [R] Exclude rows in table

2008-10-21 Thread Peter Alspach
Tena koe Jim A[A[,'Net']!=0,] or A[!A[,'Net']%in%0,] Peter Alspach > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Jim Gustafsson > Sent: Wednesday, 22 October 2008 2:52 a.m. > To: [EMAIL PROTECTED] > Subject: [R] Exclude rows in table > > >

Re: [R] Staging area for data before read into R

2008-10-21 Thread Ted Byers
There are tradeoffs no matter what route you take. I worked on a project a few years ago, repairing an MS Access DB that had been constructed, data entry forms and all, by one of the consulting engineers. They supported that development because they found that even with all the power and utili

[R] GGPLOT/QPLOT Boxplot with summary

2008-10-21 Thread SalishSea
I'd like to generate a boxplot that has BOTH the overall distribution of a continuous variable (say age), and then a boxplot for each level of a stratifying variable (e.g. site). Does anyone have prototype code for this? Thanks, -- View this message in context: http://www.nabble.com/GGPLOT-QP

[R] Error in sample(colnames(B), 10) : invalid 'x' argument

2008-10-21 Thread Alex99
HI, I have a file named "s1"(which has 14 rows and 4 columns) which is in csv format. I import and call it "A" the file using: A <- read.csv(file="s1.csv",head=TRUE,sep=",") then I transpose it and call it "B"(which will have 4 rows and 14 columns) using: B=t(A) when I want to make 5 samples

Re: [R] pdf creation error

2008-10-21 Thread Duncan Murdoch
On 10/21/2008 2:06 PM, j daniel wrote: Hello - I am trying to create a pdf file in R, but I keep getting an error that says it cannot open the pdf device. Here is the code and output: pdf(file="test.pdf") Error in pdf(file = "test.pdf") : unable to start device pdf In addition: Warning messa

Re: [R] Simulation of data

2008-10-21 Thread Marcioestat
Hi Barry, As you explained I find out my mistake... I wasn't supposed to use a recursive formula! So, what I needed, it's just to use the proportion by the function mean to reach my results... Thanks, Márcio Barry Rowlingson wrote: > > 2008/10/21 Marcioestat <[EMAIL PROTECTED]>: >> >> Hi lister

Re: [R] Multi matrix row-wise mapply?

2008-10-21 Thread hadley wickham
On Tue, Oct 21, 2008 at 1:58 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi group! > > Suppose I have 2 matrices A and B of equal dimensions. > I want to apply a function f to all corresponding pairs of rows from A > and B in an efficient manner. > Basically, I want > > mapply(f, data.frame(

Re: [R] Extracting text from html code using the RCurl package.

2008-10-21 Thread Tony Breyal
Thank you for your response both Martin and Gabor, very much appreciated! In case anyone does a search for this topic, i thought i'd write a few comments below on what I have ended up doing: re: Internet Explorer (IE) - Finding out that R can access IE was a very pleasant surprise! This works ver

Re: [R] How to save/load RWeka models into/from a file?

2008-10-21 Thread Paulo Cortez
Kurt Hornik wrote: Paulo Cortez writes: Using a current version of rJava, you can register the Java side objects for serialization using .jcache(). E.g., m1 <- J48(Species ~ ., data = iris) .jcache(m1$classifier) then save/load will work as expected. Eventually, the above may happen auto

Re: [R] unimodal VS bimodal normal distribution - how to get a pvalue?

2008-10-21 Thread Duncan Murdoch
On 10/21/2008 2:56 PM, Emmanuel Levy wrote: Dear All, I have a distribution of values and I would like to assess the uni/bimodality of the distribution. I managed to decompose it into two normal distribs using Mclust, and the BIC criteria is best for two parameters. However, the problem is that

Re: [R] AR model classification

2008-10-21 Thread Erin Hodgess
It uses the minimum AIC. HTH, Sincerely, Erin On Tue, Oct 21, 2008 at 8:59 AM, Troy Tempest <[EMAIL PROTECTED]> wrote: > > Hello, > > Could anyone tell me what rules R uses to classify an autoregressive model > i.e. how it decides the number of AR parameters to use when the AR(data) > function i

Re: [R] distributions and glm

2008-10-21 Thread drbn
Thanks for your clear response, Ruben. I'm trying to fit the data of each year in a distribution because my data is truncated at fixed points to the right and to the left (each year). By fitting a truncate distribution I think I will be able to get an unbiased estimate of the yearly mean. But, a

[R] Installing R in Linux: problems with JAVA packages (rJava, RWeka, ...) ?

2008-10-21 Thread Paulo Cortez
Hi, While in MacOS it is quite simple to install R and Java packages, the same is not true for Linux. I surfed the web and it seems that other users also have similar problems. Perhaps a nice FAQ answer or HOWTO would help... But here is my situation: I have 2 linux servers, one with Fedora

[R] Inserting a new row in a matrix

2008-10-21 Thread Alex99
Hi guys, I need to insert a row to a matrix in a for loop. I have matrix named "Avg" which is a 5x4 matrix of zeros. I have a file named "A"(4 rows,14 columns) which I make a sample of it 5 times. each time I get the mean for each column and put the result in the "Avg" matrix. this is my code:

[R] Exclude rows in table

2008-10-21 Thread Jim Gustafsson
Dear R-Help, I have the following type of table (with number of rows = 4765) and want to exclude each row where Net=0. Could this be done in a simple way? Thanks in advance Jim > A Business.Unit Event1 Net Date 1General Fraud 170.000 2006-01-01 2Gen

[R] pdf creation error

2008-10-21 Thread j daniel
Hello - I am trying to create a pdf file in R, but I keep getting an error that says it cannot open the pdf device. Here is the code and output: > pdf(file="test.pdf") Error in pdf(file = "test.pdf") : unable to start device pdf In addition: Warning message: In pdf(file = "test.pdf") : cannot o

[R] code works in R desktop but not iin RWeb - How do I modify to get it working in RWeb, please?

2008-10-21 Thread Natalie O'Toole
Hi, How are you? I have a quick question I have code that works perfectly with R desktop, but does not work with RWeb. Could you please tell me how to modify the code below so it will work with RWeb? #Read in txt file happyguys<-read.table("c:/test8.txt", header=TRUE, row.names=1) #Subse

Re: [R] Multi matrix row-wise mapply?

2008-10-21 Thread Андрей Парамонов
Thanks for the replies! > sapply(1:nrow(A), function(i) f(A[i,],B[i,]) ) > Actually, this solution is even slower than the explicit for-loop :-( Andrey __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

Re: [R] Running R at a specific time - alternative to Sys.sleep() ?

2008-10-21 Thread Tony Breyal
Thank you kindly Jim, that works great for me! For anyone who does a search on this topic and finds this post, the two web pages I used to further investigate Jim's suggestion were the following (i did not know what a batch file was, or that you could use windows task scheduler on them): task sch

[R] subscripting a one column matrix drops dimension

2008-10-21 Thread Pedroso MOACIR
Hi all, Why subscripting a one column matrix drops one dimension? > x<- matrix(rnorm(100), ncol=1) > str(x) num [1:100, 1] -0.413 -0.845 -1.625 -1.393 0.507 ... > str(x[20:30,]) num [1:11] -0.315 -0.693 -0.771 0.448 0.204 ... > str(x[20:30]) num [1:11] -0.315 -0.693 -0.771 0.448 0.204 ..

[R] plot the chi square distribution and the histogram in the same graph

2008-10-21 Thread leo_wa
In the previous post ,i ask how to plot the normal curve and the histogram in the same graph.if i want to know how to plot the chi square distribution to campare the data set ,how can i do that? -- View this message in context: http://www.nabble.com/plot-the-chi-square-distribution-and-the-hist

[R] AR model classification

2008-10-21 Thread Troy Tempest
Hello, Could anyone tell me what rules R uses to classify an autoregressive model i.e. how it decides the number of AR parameters to use when the AR(data) function is applied? I understood that model classification was more or less based on inspection of the acf and pacf functions. Thanks TT

[R] Determine package version in R

2008-10-21 Thread cddesjar
I have two versions of the lattice package installed on my computer. One is at /usr/local/lib/R/site-library and the other one is at /usr/lib/R/library. The one at the former location is the newer version and the one that I want to make sure get's loaded for my class. The reason that I have two

[R] unimodal VS bimodal normal distribution - how to get a pvalue?

2008-10-21 Thread Emmanuel Levy
Dear All, I have a distribution of values and I would like to assess the uni/bimodality of the distribution. I managed to decompose it into two normal distribs using Mclust, and the BIC criteria is best for two parameters. However, the problem is that the BIC criteria is not a P-value, which I wo

Re: [R] Mclust problem with mclust1Dplot: Error in to - from : non-numeric argument to binary operator

2008-10-21 Thread Emmanuel Levy
Dear All, I haven't found a solution to the "variance" problem. However, I could solve the plotting problem by plotting the data myself. I think that the problem is due to a change in the data structure returned by the function Mclust. The web-page: http://www.childrensmercy.org/stats/weblog2006/

Re: [R] Getting names of variables without quotes

2008-10-21 Thread Amarjit Singh Sethi
Dear Menne/ Jorge Many thanks for the help rendered by you both. Now, may I augment my problem. While running the regressions (through 'for' loop), I tried to generate time series plots for each iteration. Although the summary results from regressions were saved in the output file (through si

Re: [R] SPSS to R conversion "error in iconv..."

2008-10-21 Thread Prof Brian Ripley
It looks like your SPSS file is of a format unknown to the writers of read.spss, but add argument reencode=FALSE to ignore the encoding specified The error is the direct result of the warning: it seems not to be a valid codepage in your iconv. On Tue, 21 Oct 2008, Maria Gouskova wrote: Dear

Re: [R] Dep setting for install of packages... Hopefully this is it this time

2008-10-21 Thread Gabor Grothendieck
Perhaps utils is not loaded at the time that the profile runs. Try adding library(utils) before the assignInNamespace command. On Tue, Oct 21, 2008 at 2:10 PM, Brian Lunergan <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck wrote: >> >> leaps is not in Depends or Imports for car. It is in Suggests

Re: [R] Staging area for data before read into R

2008-10-21 Thread Gabor Grothendieck
Excel has a data validation facility and also has data input forms to facilitate data entry. On Tue, Oct 21, 2008 at 1:45 PM, Greg Snow <[EMAIL PROTECTED]> wrote: > Stephen, > > One of the big problems with spreadsheets (other than the column limit in > some) is that the standard entry mode allow

Re: [R] Dep setting for install of packages... Hopefully this is it this time

2008-10-21 Thread Brian Lunergan
Gabor Grothendieck wrote: leaps is not in Depends or Imports for car. It is in Suggests and those don't get automatically pulled in when dependencies = NA. What you could do is to replace the builtin menuInstallPkgs with your own by running this: assignInNamespace("menuInstallPkgs", function (

Re: [R] Staging area for data before read into R

2008-10-21 Thread Christopher W. Ryan
this is also the sort of thing that EpiData does very well. That's what it was designed for: data entry with minimal errors. Also simplifies double data entry for error checking, if you need/want that. --Chris Christopher W. Ryan, MD SUNY Upstate Medical University Clinical Campus at Binghamto

Re: [R] how to plot the histogram and the curve in the same graph

2008-10-21 Thread Greg Snow
It is not clear what curve you want to plot, but this code may help get you started (the final plot will probably need the x and y limits expanded and maybe other options changed): x <- rnorm(100, rep( c(100,105), c(75,25)), 2 ) hist(x, probability=TRUE) lines( density(x), col='green' ) curve(

Re: [R] R command line

2008-10-21 Thread Raphael Saldanha
Hi! I think I find what I was looking for: http://sourceforge.net/projects/* tinn-r*/ On Tue, Oct 21, 2008 at 10:56 AM, baptiste auguie <[EMAIL PROTECTED]>wrote: > If I understand correctly, you could consider Kate on linux. It has syntax > highlighting, completion, shortcuts to comment selectio

Re: [R] Staging area for data before read into R

2008-10-21 Thread Greg Snow
Stephen, One of the big problems with spreadsheets (other than the column limit in some) is that the standard entry mode allows too much flexibility which does nothing to help you avoid data entry errors. The Webpage: http://www.burns-stat.com/pages/Tutor/spreadsheet_addiction.html has some e

Re: [R] Paddding an integer with zeros

2008-10-21 Thread culpritNr1
sprintf works like a charm. I feel rather embarrassed right now. I see that when I do ?format, at the very end of the documentation, sprintf is suggested as further reading. muito obrigado culpritNr1 Henrique Dallazuanna wrote: > > Try this: > > formatC(12, width = 5, flag = "0") > or > s

Re: [R] Paddding an integer with zeros

2008-10-21 Thread Henrique Dallazuanna
Try this: formatC(12, width = 5, flag = "0") or sprintf("%05d", 12) On Tue, Oct 21, 2008 at 3:24 PM, culpritNr1 <[EMAIL PROTECTED]> wrote: > > Hello List, > > Can anybody point me to a number-to-string formatting function? > > I need to convert, say, 12 to 00012. > > I tried format() but its too

[R] Paddding an integer with zeros

2008-10-21 Thread culpritNr1
Hello List, Can anybody point me to a number-to-string formatting function? I need to convert, say, 12 to 00012. I tried format() but its too stubborn: it seems to only pad with spaces. Thank you, Your culpritNr1 -- View this message in context: http://www.nabble.com/Paddding-an-integer-w

Re: [R] Categorical Response Query

2008-10-21 Thread Greg Snow
The second case also needs the argument: weight=n Then all 3 models should give the same general fit (same coefficients, same predicted values). The differences are subtle and may not be of interest. Conceptually think about: did you run 10 trials under a set of conditions (age=x, sex=y, class

Re: [R] Using an image background with graphics

2008-10-21 Thread Waichler, Scott R
Dr. Ripley, Thank you, yes, it's the anti-aliasing thing again. I'm using Redhat EL4, R-2.8.0, and pdf(). I had the problem with images displayed in xpdf, even with xpdf -aa no. I do not get the problem in Adobe Reader 7.0 for Linux. I'll try harder to remember this point. Scott Waichler Pac

[R] SPSS to R conversion "error in iconv..."

2008-10-21 Thread Maria Gouskova
Dear R users, I am trying to get R to read an .sav data file generated in SPSS 17 for Mac. Here is the command and the error message: > data = read.spss('/Users/userdir/Desktop/filename.sav') Error in iconv(names(rval), cp, "") : unsupported conversion In addition: Warning message: In read.spss(

Re: [R] Mclust problem with mclust1Dplot: Error in to - from : non-numeric argument to binary operator

2008-10-21 Thread Emmanuel Levy
After playing with the data, I figured out what the problem is: I've got many zeros in the dataset, which probably induces the algorithm to determine a gaussian with variance=0. If I remove the zeros it works, but then the decomposition is not as it should be Any idea on how to solve this wo

Re: [R] pass longer arguments to adj of text()

2008-10-21 Thread Charles C. Berry
On Mon, 20 Oct 2008, Thomas Steiner wrote: Brian, thank you for your reply. Why do you expect this to be vectorized when the help page clearly says otherwise? Sure, it's in line with the help, no problem there. I just asked if this feature is somehow possible. I expected it, because "pos" do

Re: [R] Zero mean correlation Matrix

2008-10-21 Thread Charles C. Berry
On Mon, 20 Oct 2008, AliR wrote: Hi,, I want to use the existing cor function in R but with a different way to compute the correlation method.. basically zero mean correlation. The forumula I have is 'D' <- function(c1, c2) sum(c1*c2, na.rm=T)/(sqrt(sum(c1*c1, na.rm=T))*sqrt(sum(c2*c2, na.r

Re: [R] plot - central limit theorem

2008-10-21 Thread Greg Snow
I was just making a suggestion, feel free to act on it or ignore it at will. My problem with the p-values is that as the sampling distribution becomes more normal with the increased sample size, the p-values do not converge to a value, but to a distribution (the uniform) and I don't expect that

Re: [R] For loop - how to assign "i" when it is not an element of an index?

2008-10-21 Thread Bert Gunter
1. Thanks for the reproducible example. It makes the issue clear. 2. Your error reflects a profound confusion about how programming works in general, and R in particular. I think the following is a correct technical explanation (I am not a trained programmer, so corrections from those who are wou

[R] Please use a meaningful subject [Was: Re: Question about glm using R]

2008-10-21 Thread Giovanni Petris
And what has this to do with the subject of your post? R-help has become a heavy traffic list and the subject line should help readers to screen posts. Thanks, Giovanni Petris > Date: Tue, 21 Oct 2008 13:44:43 +0200 > From: malcolm croucher <[EMAIL PROTECTED]> > Sender: [EMAIL PROTECTED] > Pre

[R] Major Axis residuals

2008-10-21 Thread C. E. Timothy Paine
I am having trouble extracting residuals from Major Axis and Standardized Major Axis fits, using the smatr package. I wish to understand the relationship between density of wood in twigs and trunks, and how the slope of their relationship varies among sites, among families, and with tree si

Re: [R] odfTable in loop

2008-10-21 Thread Max Kuhn
> But when I try to run this within a for-loop, the XML-output is suppressed > and only the table caption is written: You'll need to wrap it in a print. I'll make a note in the man file. -- Max __ R-help@r-project.org mailing list https://stat.ethz.

[R] odfTable in loop

2008-10-21 Thread SJ
Dear list I try to create a report with several (an unknown number of) tables via odfTable. The following code results in the expected XML structure: ## scores.1=new.env() scores.1$cont.tab=rbind(c(3,5),c(6,8)) scores.2=new.env() scores.2$cont.tab=rbind(c(2,9),c(7,6))

Re: [R] R command line

2008-10-21 Thread Paul Hiemstra
Hi, I use a standard linux bash shell in combination with R and this supports tab-completion and a quick search seems to indicate that bash might also include text highlighting. This doesn't really help if you're not using linux... cheers, Paul Raphael Saldanha wrote: Hi! Is there a Gui f

Re: [R] calculating mean for samples

2008-10-21 Thread Chuck Cleland
On 10/21/2008 8:41 AM, stephen sefick wrote: > Yeah, I realized that after the fact, and haven't been able to figure > out how to get it to work - The replicate function looks promising, > but i could not get it to work in the couple of minutes that i played > around with it. I will think about

Re: [R] calculating mean for samples

2008-10-21 Thread stephen sefick
Yeah, I realized that after the fact, and haven't been able to figure out how to get it to work - The replicate function looks promising, but i could not get it to work in the couple of minutes that i played around with it. I will think about it- if you figure it out send me along the solution.

  1   2   >