Re: [R] Plot multiple datasets on a VCD ternary graph

2008-07-12 Thread Jim Lemon
On Fri, 2008-07-11 at 13:38 -0700, theBenjamin wrote: I need to plot multiple sets of data, on one Ternary plot (from the VCD package). Since they all need to be formatted differently, I can't just coerce them into one matrix, I need three separate calls. Is there a way to do this? Thanks

Re: [R] plotting granular data

2008-07-12 Thread Jim Lemon
On Fri, 2008-07-11 at 13:25 -0500, Neil Gupta wrote: Hello R users, I would apprecaite any help to my current problem. I wanted to plot the following data: ... Hi Neil, I just read the data in (as zoop), invoked plot(zoop) and got quite a respectable looking scatterplot. If you are

Re: [R] data summerization etc...

2008-07-12 Thread hadley wickham
On Sat, Jul 12, 2008 at 7:44 AM, sj [EMAIL PROTECTED] wrote: Hello, I am trying to do some fairly straightforward data summarization, i.e., the kind you would do with a pivot table in excel or by using SQL queires. I have a moderately sized data set of ~70,000 records and I am trying to

[R] [R-pkgs] ppls: version 1.02 including a new data set

2008-07-12 Thread Nicole Kraemer
Dear R users, an update of the package ppls - Penalized Partial Least Squares - is now available on CRAN. It implements the methods described in N. Krämer, A.-L. Boulesteix, G. Tutz Penalized Partial Least Squares with Applications to B-Spline Transformations and Functional Data Chem.

[R] Assoociative array?

2008-07-12 Thread rkevinburton
I have search the archive and I could not find what I need so I will try to ask the question here. I read a table in (read.table) a - read.table(.) The table has column names like DayOfYear, Quantity, and Category. The values in the row for Category are strings (characters). I want to

[R] Error of exp() in a dll from Fortran

2008-07-12 Thread Hao Ren Sr
Hi, I have an error happened when I use exp() in my Fortran code. My Fortran code is SUBROUTINE f(n,c) REAL, INTENT(IN) :: n(10) REAL, INTENT(OUT) :: c(10) INTEGER :: k DO k=1, 10 c(k) = exp( n(k) )

[R] Help with arima.sim

2008-07-12 Thread Christopher Gürke
Hey, as a bloddy beginner in R I want to simulate a Arima (2,1,0) process with R. My problem is, that I don't know how to specify the AR. For a ARIMA(1,1,0) I use the following syntax: S - arima.sim(list(order=c(1,1,0), ar=0.9), n=100). I think it is a stupid question with an easy answer. But

Re: [R] Another packaging question

2008-07-12 Thread Uwe Ligges
Johannes Huesing wrote: I am still trying to build a package. At the moment I am stuck with a file not found error message when processing R code from the tests subdirectory. What would be the accurate relative path for files in the tests directory to access files in the data directory? You

Re: [R] Error of exp() in a dll from Fortran

2008-07-12 Thread Duncan Murdoch
On 12/07/2008 3:56 AM, Hao Ren Sr wrote: Hi, I have an error happened when I use exp() in my Fortran code. My Fortran code is SUBROUTINE f(n,c) REAL, INTENT(IN) :: n(10) REAL, INTENT(OUT) :: c(10) INTEGER :: k DO k=1, 10

Re: [R] Another failed attempt to install an R package in Ubuntu

2008-07-12 Thread IAIN GALLAGHER
Hi Miklos. If you want to install R packages to the /usr/lib/R/library directory you need to start R with 'root' user privileges. Ordinary users do not have the appropriate permissions to write to this directory. At the command line type: sudo R type your password when prompted. You won't

Re: [R] Assoociative array?

2008-07-12 Thread jim holtman
Please provide commented, minimal, self-contained, reproducible code, or at least a before/after of what you data would look like. Taking a guess at what you are asking, here is one way of doing it: x - data.frame(cat=sample(LETTERS[1:3],20,TRUE),a=1:20, b=runif(20)) x cat a b 1

Re: [R] data summerization etc...

2008-07-12 Thread Gabor Grothendieck
See sqldf home page: http://sqldf.googlecode.com e.g. library(sqldf) set.seed(1) pti -rnorm(7,10) fid - rnorm(7,100) finc - rnorm(7,1000) # set is a reserved word in SQL so use sset sset - data.frame(fid,pti,finc) system.time(out - sqldf(select fid, sum(pti) from sset group by fid))

Re: [R] Position in a vector of the last value n - *SOLVED*

2008-07-12 Thread jim holtman
A slight modification gives the equivalent results instead of using 'tail' m - matrix(rexp(6e6,rate=0.05), nrow=600) # 5,000 cols m[m20] - 20 func1 - function(v,cut=20) max(which(v20)) func2 - function(v,cut=20) { + x - which(v20) + x[length(x)] + } system.time(apply(m, 2, func1))

[R] a warning message from lmer

2008-07-12 Thread Lan Wei
Hi all, I have a problem when running lmer. In my data set, Agree is a binary(0/1) response. WalkerID and ObsID is the identification number of the subjects. the description of the other variables are as follows: levels(regdat$Display) [1] Dynamic Static levels(regdat$Survey) [1] HM1_A HM1_B

Re: [R] a warning message from lmer

2008-07-12 Thread Douglas Bates
On Sat, Jul 12, 2008 at 6:23 AM, Lan Wei [EMAIL PROTECTED] wrote: Hi all, I have a problem when running lmer. In my data set, Agree is a binary(0/1) response. WalkerID and ObsID is the identification number of the subjects. the description of the other variables are as follows:

Re: [R] a warning message from lmer

2008-07-12 Thread Douglas Bates
By the way, did you notice that the levels of Emotion include both joy and joy . You may want to correct that. On Sat, Jul 12, 2008 at 7:47 AM, Douglas Bates [EMAIL PROTECTED] wrote: On Sat, Jul 12, 2008 at 6:23 AM, Lan Wei [EMAIL PROTECTED] wrote: Hi all, I have a problem when running lmer.

Re: [R] Help with arima.sim

2008-07-12 Thread Erin Hodgess
Hi Chris: Please try: ts.sim - arima.sim(list(order = c(2,1,0), ar = c(1.2,-0.4)), n = 200) Hope this helps! Sincerely, Erin On Sat, Jul 12, 2008 at 2:48 AM, Christopher Gürke [EMAIL PROTECTED] wrote: Hey, as a bloddy beginner in R I want to simulate a Arima (2,1,0) process with R. My

[R] Visualization of multiple alignments

2008-07-12 Thread schragas
Hello, I'm looking for a package/function which handles visualization of multiple sequence alignments. Does something like this exist? Thanks, Schraga Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Quick plotmath question

2008-07-12 Thread Mike Lawrence
Hi all, Worked looked around for a while on this to no avail. I'm trying to create a plotmath expression that achieves: Δi 0 and while: expression(Delta*i0) comes close, I'd prefer to have the (denoting very much greater than). Maybe is a non-standard expression and therefore not

Re: [R] ggplot2 book?

2008-07-12 Thread hpdutra
apparently he does https://stat.ethz.ch/pipermail/r-packages/2007/000298.html Felipe Carrillo wrote: Hi (Hadley): Do you still have the ggplot2 book being published this summer? Felipe D. Carrillo Fishery Biologist Department of the Interior US Fish Wildlife Service California,

Re: [R] specifying data

2008-07-12 Thread hpdutra
have you tried reshape package? library(reshape) dfm - melt(dataframe, m = date) You can find out more about reshape at http://had.co.nz/reshape sprohl wrote: Hello, I have to merge several serie by date. I used: cb-merge(cbds,cbbond,by=c(date),all=T). I have the daily and the high

Re: [R] Quick plotmath question

2008-07-12 Thread Christian Ritz
Hi Mike, try: plot(1:10, main=expression(paste(Delta*i, , 0))) Christian __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] Help with error in if then statement

2008-07-12 Thread John Kane
As the note at the bottom says provide commented, minimal, self-contained, reproducible code. It is difficult to comment on a loop when we have no code to read. --- On Fri, 7/11/08, Andrew Rominger [EMAIL PROTECTED] wrote: From: Andrew Rominger [EMAIL PROTECTED] Subject: [R] Help with

[R] shapiro wilk normality test

2008-07-12 Thread Bunny, lautloscrew.com
Hi everybody, somehow i dont get the shapiro wilk test for normality. i just can´t find what the H0 is . i tried : shapiro.test(rnorm(5000)) Shapiro-Wilk normality test data: rnorm(5000) W = 0.9997, p-value = 0.6205 If normality is the H0, the test says it´s probably not

Re: [R] Quick plotmath question

2008-07-12 Thread Gabor Grothendieck
This works on my Windows Vista system: plot(1, main = \u394i \u300b 0) See: http://www.fileformat.info/info/unicode/char/300b/index.htm http://www.fileformat.info/info/unicode/char/394/index.htm On Sat, Jul 12, 2008 at 10:12 AM, Mike Lawrence [EMAIL PROTECTED] wrote: Hi all, Worked looked

Re: [R] shapiro wilk normality test

2008-07-12 Thread Robert A LaBudde
At 11:30 AM 7/12/2008, Bunny, lautloscrew.com wrote: Hi everybody, somehow i dont get the shapiro wilk test for normality. i just can´t find what the H0 is . i tried : shapiro.test(rnorm(5000)) Shapiro-Wilk normality test data: rnorm(5000) W = 0.9997, p-value = 0.6205 If

Re: [R] shapiro wilk normality test

2008-07-12 Thread Bunny, lautloscrew.com
Hmm thanks, But on the other hand it just says i cant reject normality, which doesnt really mean it is normal. Wouldn´t be nice to test for non- normality ? if i´d reject that a high level i could be pretty sure it ´s normal... ?? thanks in advance matthias Am 12.07.2008 um 18:10 schrieb

Re: [R] Quick plotmath question

2008-07-12 Thread Gabor Grothendieck
And this gives a slightly different one: plot(1, main = \u394i \ubb 0) 2008/7/12 Gabor Grothendieck [EMAIL PROTECTED]: This works on my Windows Vista system: plot(1, main = \u394i \u300b 0) See: http://www.fileformat.info/info/unicode/char/300b/index.htm

Re: [R] Assoociative array?

2008-07-12 Thread rkevinburton
I am using a simple R statement to read in the file: a - read.csv(Sample.dat, header=TRUE) There is alot of data but the first few lines look like: DayOfYear,Quantity,Fraction,Category,SubCategory 1,82,0.390392720794458,(Unknown),(Unknown) 2,78,0.371349173438631,(Unknown),(Unknown) . .

Re: [R] Assoociative array?

2008-07-12 Thread Duncan Murdoch
On 12/07/2008 12:31 PM, [EMAIL PROTECTED] wrote: I am using a simple R statement to read in the file: a - read.csv(Sample.dat, header=TRUE) There is alot of data but the first few lines look like: DayOfYear,Quantity,Fraction,Category,SubCategory 1,82,0.390392720794458,(Unknown),(Unknown)

[R] Reading Multi-value data fields for descriptive analysis

2008-07-12 Thread Hohm, Dale
Hello, I'm looking for help on the best approach to get multi-value data fields into R for simple descriptive analysis. - I am new to this list and new to R, but I really want to get over the hump and get productive with it. Some help with how to best get

Re: [R] shapiro wilk normality test

2008-07-12 Thread Mark Leeds
There might be a test that uses not normal as the HO but I don't know of it. There's been a lot of discussion on this list in the past on the pitfalls associated with tests of normality in general so maybe you can find them in the archives. I think you should figure out why you are testing for

[R] Reading Multi-value data fields for descriptive analysis (resend)

2008-07-12 Thread Hohm, Dale
(I checked the archive and it seems the entire text of my post was 'scrubbed' - trying again) Hello, I'm looking for help on the best approach to get multi-value data fields into R for simple descriptive analysis. - I am new to this list and new to R, but

Re: [R] Reading Multi-value data fields for descriptive analysis

2008-07-12 Thread jim holtman
Can you provide a more complete example (say 10 lines) of what the input is like. Does each line have a unique index that can be related to it? Do you want to summarize all the multi1-n values of Col2? Do you want to know the percentage of input lines that have a Col3/multi-value4 on them? You

Re: [R] odfWeave problem in 7.1?

2008-07-12 Thread Prof Brian Ripley
On Fri, 11 Jul 2008, Dieter Menne wrote: y Jim Porzak jporzak at gmail.com writes: I just noticed that CRAN Package check Error for Windows Mac: http://www.r-project.org/nosvn/R.check/r-patched-windows-x86_64/odfWeave-00check.html I've run into a problem with odfWeave 0.7.5 running

Re: [R] shapiro wilk normality test

2008-07-12 Thread Robert A LaBudde
At 12:48 PM 7/12/2008, Bunny, lautloscrew.com wrote: first of all thanks yall. it´s always good to get it from people that know for sure. my bad, i meant to say it´s compatible with normality. i just wanted to know if it wouldnt be better to test for non-normality in order to know for sure. and

[R] R-outlet: Journal of Statistical Software

2008-07-12 Thread Jan de Leeuw
The Journal of Statistical Software was founded by Jan de Leeuw in 1996. Currently, there are 26 volumes with 260 aricles and the journal publishes about 4 new volumes per year. The web address is www.jstatsoft.org. All articles are pdf files, since 2005 all produced from JSS LaTeX templates.

[R] Excel Trend Function

2008-07-12 Thread Felipe Carrillo
Hi: I have a dataset and need to interpolate for missing days. In Excel I either average from sampled days from above and below the missing days or use the TREND function to make up for the missing values. I have been reading about na.approx, is this function similar to the TREND function?

[R] Installing RWinEdt

2008-07-12 Thread rkevinburton
From the R console I invoke: install.packages(RWinEdt) and get: Warning in install.packages(RWinEdt) : argument 'lib' is missing: using 'F:\Users\Kevin\Documents/R/win-library/2.7' --- Please select a CRAN mirror for use in this session --- trying URL

Re: [R] Assoociative array?

2008-07-12 Thread rkevinburton
I am sorry but if read.csv returns a dataframe and a dataframe is like a matrix and I have a set of input like below and a[1,] gives me the first row, what is the second index? From what I read and your input I am guessing that it is the column number. So a[1,1] would return the DayOfYear

[R] How to build a package which loads Rgraphviz (if installed)...

2008-07-12 Thread Søren Højsgaard
Dear List, I use Rgraphviz for display of graphs in some packages. Since Rgraphviz is no longer on CRAN it needs to be installed from Bioconductor and that is fine, but I have trouble figureing out the following: I create a plot method which - if Rgraphviz is installed - uses Rgraphviz for

Re: [R] Excel Trend Function

2008-07-12 Thread Daniel Malter
Hi, I would be careful with imputing values. Imputing is a disputed practice. Also, you seem to have huge variation in your data with a nonlinear trend. Since your data is time series data, you may consider modeling the time series and then to predict n-time periods ahead and use these predicted

Re: [R] Assoociative array?

2008-07-12 Thread rkevinburton
I think there is a problem with my file or with 'read.csv'. As you said, a[1,] returns the first row a[1,] DayOfYear Quantity Fraction Category SubCategory 1 1 82 0.390392720794458 (Unknown) (Unknown) a[2,] returns the second row a[2,] DayOfYear Quantity

Re: [R] Another failed attempt to install an R package in Ubuntu

2008-07-12 Thread Matti Pastell
Hello Miklos, Do you have the build-essential package installed in Ubuntu? If not try installing it, as it will install the basic tools needed for compiling things from source. Also as Iain pointed out run R with sudo R from the terminal if you want to install packages for all users i.e to

Re: [R] Assoociative array?

2008-07-12 Thread jim holtman
Yes. If you want read.csv to ignore quotes, the have as a parameter: quote= What is happening is that otherwise it assumes you have values enclosed in quotes because they might have spaces or the separator character in them. You data (7 Plate) looks like a quoted string starting after the 7.

Re: [R] How to build a package which loads Rgraphviz (if installed)...

2008-07-12 Thread William Revelle
Soren, When I had an almost identical problem last year. I also wanted to use Rraphviz but only if people had it. Kurt Hornik suggested that I replace a direct call to the function, foo, that uses Rgraphviz with if(require(Rgraphviz)) foo() Bill At 10:23 PM +0200 7/12/08, Søren

[R] A (not so) Short Introduction to S4

2008-07-12 Thread Christophe Genolini
Hi the list, After months of keen work (!), thousands of questions on the R-help (and on the French R forum GuR), I am pleased to announce the birth of new a tutorial on S4: *** A (Not So) short Introduction to S4 *** http://christophe.genolini.free.fr/webTutorial/index.html It

Re: [R] How to build a package which loads Rgraphviz (if installed)...

2008-07-12 Thread Søren Højsgaard
Bill, Thanks for the suggestion, but it does not solve the problem; I get the same warning from rcmd check. I suspect that rcmd check actually checks that any package referred to in require() is declared in the DESCRIPTION file. From the version numbers from your 'psych' package I guess you are

Re: [R] Assoociative array?

2008-07-12 Thread Duncan Murdoch
On 12/07/2008 3:59 PM, [EMAIL PROTECTED] wrote: I am sorry but if read.csv returns a dataframe and a dataframe is like a matrix and I have a set of input like below and a[1,] gives me the first row, what is the second index? From what I read and your input I am guessing that it is the column

Re: [R] How to build a package which loads Rgraphviz (if installed)...

2008-07-12 Thread Duncan Murdoch
On 12/07/2008 6:27 PM, Søren Højsgaard wrote: Bill, Thanks for the suggestion, but it does not solve the problem; I get the same warning from rcmd check. I suspect that rcmd check actually checks that any package referred to in require() is declared in the DESCRIPTION file. From the version

Re: [R] How to build a package which loads Rgraphviz (if installed)...

2008-07-12 Thread Søren Højsgaard
The tricky part is not getting it through the checks on my computer. It is when I upload to CRAN I get the problems, because their computers need Rgraphviz as well... (Suggests does not seem to be the solution...) Cheers Søren Fra: Duncan Murdoch

Re: [R] How to build a package which loads Rgraphviz (if installed)...

2008-07-12 Thread William Revelle
At 6:36 PM -0400 7/12/08, Duncan Murdoch wrote: On 12/07/2008 6:27 PM, Søren Højsgaard wrote: Bill, Thanks for the suggestion, but it does not solve the problem; I get the same warning from rcmd check. I suspect that rcmd check actually checks that any package referred to in require() is

Re: [R] Assoociative array?

2008-07-12 Thread rkevinburton
OK. Now I know that I am dealing with a data frame. One last question on this topic. a - read.csv() gives me a dataframe. If I have 'c - split(x, x$Category), then what is returned by split in this case? c[1] seems to be OK but c[2] is not right in my mind. If I run ci - split(nrow(a),

Re: [R] Assoociative array?

2008-07-12 Thread Duncan Murdoch
[EMAIL PROTECTED] wrote: OK. Now I know that I am dealing with a data frame. One last question on this topic. a - read.csv() gives me a dataframe. If I have 'c - split(x, x$Category), then what is returned by split in this case? c[1] seems to be OK but c[2] is not right in my mind. If I run

Re: [R] Assoociative array?

2008-07-12 Thread jim holtman
Is this something like what you were asking for? The output of a 'split' will be a list of the dataframe subsets for the categories you have specified. x - data.frame(g1=sample(LETTERS[1:2],30,TRUE), + g2=sample(letters[1:2], 30, TRUE), + g3=1:30) y - split(x, list(x$g1, x$g2)) str(y)

Re: [R] Another failed attempt to install an R package in Ubuntu

2008-07-12 Thread Vincent Goulet
MIklos, You may have missed this part of the Ubuntu README on CRAN: Users who need to compile packages should also install the r-base-dev package: sudo apt-get install r-base-dev This will fetch all the standard tools you need to compile packages. If you have more Ubuntu specific

Re: [R] Reading Multi-value data fields for descriptive analysis

2008-07-12 Thread Hohm, Dale
Thanks for the reply Jim. Here is a representation of the data I want to analyze - 10 records as requested. Each line can easily include an ID number as below. So I want to determine a frequency or percentage of respondents that bring each of the 5 foods (Hamburgers, Hot Dogs, Potato Salad,

Re: [R] Assoociative array?

2008-07-12 Thread rkevinburton
This is almost it. Maybe it is as good as can be expected. The only problem that I see is that this seems to form a Category/SubCategory pair where none existed in the original data. For example, A might have two sub-categories a and b, and B might have two categories c and d. As far as I can

Re: [R] Assoociative array?

2008-07-12 Thread rkevinburton
Thank you. This was very informative. When I run this command (str(y)), I get something like: $ WOMEN.X MEN 3 :'data.frame': 0 obs. of 5 variables: