[R] R.dll Reg.,

2009-06-02 Thread RamaR Guru
Sir, I am working in R language currently.I want to link R.dll with VISUAL BASIC in order to create GUI FRONT END.But i couldnt link because of that file is copyrighted by "R Development Core Team 1995-2008". Please give R.dll file to complete my project. With Wishes, RamaR.K

[R] Wiring or Arduino package/scripts

2009-06-02 Thread Jorge Cornejo
Hi, I am looking any way to communicant with Arduino (http://www.arduino.cc/) Wiring (http://www.wiring.org.co) boards and read data generate with sensor on these. If anyone know how to do it, I will appreciate if could give some advice. Thanks in advance

[R] FW: R.dll Reg.,

2009-06-02 Thread RamaR Guru
From: techzone2...@hotmail.com To: r-h...@stat.math.ethz.ch; r-help-requ...@stat.math.ethz.ch Subject: R.dll Reg., Date: Wed, 3 Jun 2009 11:57:52 +0530 Sir, I am working in R language currently.I want to link R.dll with VISUAL BASIC in order to create GUI FRONT END.But i coul

Re: [R] Question on implementing RandomForest

2009-06-02 Thread Uwe Ligges
Nallan Suresh wrote: Hi - I am new to RandomForest and want to be able to predict for a set of values outside of R. So for example, if I create the model in R and want to get the prediction for an observation in a database, is there a way I can get the algorithm for the trees and final pred

Re: [R] Data Clean of Character variables

2009-06-02 Thread Uwe Ligges
Chris Anderson wrote: I am new to R, and I need to do some simple data cleaning. In the example below I have 164 rows of data with a missing value. I want to convert these missing to unknown while keeping the other values as is. summary(ABIClinical$HasSkinBreakdown) no unknown

Re: [R] Converting Multiple Columns of Data Frame to Date

2009-06-02 Thread Uwe Ligges
John Bodley wrote: Hi, I have a data frame which has a subset of columns containing character representations of dates. The data frame is obtained via the DBI::fetch(rs, ...) method. I would like to convert all the columns which were originally dates in the database to R dates. I can obtain a

[R] Data Clean of Character variables

2009-06-02 Thread Chris Anderson
I am new to R, and I need to do some simple data cleaning. In the example below I have 164 rows of data with a missing value. I want to convert these missing to unknown while keeping the other values as is. summary(ABIClinical$HasSkinBreakdown) no unknown yes 164 914

[R] Validity of Pearson's Chi-Square for Large Tables

2009-06-02 Thread dsimcha
Is Pearson's Chi-Square test for contingency tables asymptotically unbiased for large tables (large degrees of freedom) regardless of the expected values in each cell? The rule of thumb is that Pearson's Chi-square should not be used when large numbers of cells have expected values < 5. However,

Re: [R] Most used R editors

2009-06-02 Thread Wensui Liu
i'd like to use emacs, both on windows and unix. very powerful toy. besides writing R, i also like to use emacs to write sas and to access oracle db. On Tue, Jun 2, 2009 at 3:06 AM, Martial Sankar wrote: > > Hi, > > I am a little lonely as R users in my group. So, I would like to know which > ed

Re: [R] Most used R editors

2009-06-02 Thread Tom H
On Tue, 2009-06-02 at 07:06 +, Martial Sankar wrote: > Hi, > > I am a little lonely as R users in my group. So, I would like to know which > editor is the most used in the R community. > This post is some kind of survey. Hi, I have been enjoying using statET - http://www.walware.de/goto/st

Re: [R] Return variable assignments from a function

2009-06-02 Thread Ronggui Huang
I don't know why you want to do this. But you can try _assign_ simple <- function(m,n) { assign("A",matrix(c(3,3,2,3),2,2),env=.GlobalEnv) assign("B",m,env=.GlobalEnv) assign("c",1:n,env=.GlobalEnv) } > simple(5,4) > A [,1] [,2] [1,]32 [2,]33 > B [1] 5 Ronggui 2009/6/3 Sc

Re: [R] insert and count missing data

2009-06-02 Thread Gabor Grothendieck
Try this: > Lines <- "No Year month rain + 1398 198510 104.2 + 1399 198511 138.0 + 1400 198512 120.4 + 1401 1986 1 12.6 + 1402 1986 2 19.4 + 1403 1986 3 1.0 + 1404 1986 4 58.8 + 1405 1986 5 98.4 + 1406 1986 6 56.6 + 1407 1986 7 280.4 + 1408 19

[R] Return variable assignments from a function

2009-06-02 Thread Scott Hyde
I'd like to perform return variable assignments like matlab. For example, the following function would return A, B, and c to the script that called it. = function [A,B,c] = simple(m,n) A=[ 3 2; 3 3] B=m c=1:n = I'd like to do simil

[R] insert and count missing data

2009-06-02 Thread Roslina Zakaria
Hi R-users, I have missing data for the month. My question is how do I insert the missing month and fill up the cell with 'na' for the rain amount?  Then I would like to count the percentage of missing data. No Year month rain 1398 1985    10 104.2 1399 1985    11 138.0 1400 1985    12

Re: [R] Table of Summaries

2009-06-02 Thread milton ruser
Hi there, It is not so many ellegant, but can works. df<-read.table(stdin(), head=T, sep=",") Name,Fraction Harry,335/335 Harry,124/506 Harry,124/506 Dick,133 Tom,335/335 Tom,335/335 df.freq<-data.frame(table(df)) df.freq df.freq.wide<-reshape(df.freq, v.names="Freq", idvar="Name", timevar="Fract

[R] Converting Multiple Columns of Data Frame to Date

2009-06-02 Thread John Bodley
Hi, I have a data frame which has a subset of columns containing character representations of dates. The data frame is obtained via the DBI::fetch(rs, ...) method. I would like to convert all the columns which were originally dates in the database to R dates. I can obtain a logical index of column

[R] Table of Summaries

2009-06-02 Thread sedm1000
Apologies for the novice question, but this is likely beyond my google searching range.. I am trying to create a table from the summaries of a file. The 2 column data table looks like; Harry 335/335 Harry 124/506 Harry 124/506 Dick 133 Tom335/335 Tom335/3

Re: [R] Most used R editors

2009-06-02 Thread Wayne F
Are you looking for more of an R IDE or simply an editor? In the Mac GUI-version of R, there's a built-in editor (File->New Document) with some simple features, including the ability to highlight and press CMD-Return to execute. I also use Smultron, a free Mac-based text editor with a reasonable

Re: [R] Still can't find missing data - How do I get NA in xtabs with factors?

2009-06-02 Thread hadley wickham
>> Let's see if I understand this.  Do I iterate through >>    x <- factor(x, levels(c(levels(x), NA), exclude=NULL) >> for each of the few hundred variables (x) in my data frame? > > > Yes, for all being factors. Wouldn't addNA() be the preferred method? To do it for all variables is pretty simp

Re: [R] how to checking whether elements of a vector changed or not.

2009-06-02 Thread David Winsemius
The point was that I thought you had reversed the intent of the t/f values. Looking back at the OP's request I see that it was probably me that was doing the reversal. Pardon me. -- David Winsemius On Jun 2, 2009, at 9:40 PM, Gabor Grothendieck wrote: Its not clear to me what your point i

Re: [R] how to checking whether elements of a vector changed or not.

2009-06-02 Thread Gabor Grothendieck
Its not clear to me what your point is. Perhaps you could elaborate. On Tue, Jun 2, 2009 at 4:32 PM, David Winsemius wrote: > Gabor; > > Did you perhaps get an undesired doubling of "!"? > >> x1 <-c("A", "A", "B", "B", "B", "A") >> x1[2:length(x1)] == x1[1:(length(x1)-1)] > [1]  TRUE FALSE  TRUE

Re: [R] Problem downloading webpages using batchfiles and RCurl from command line in Vista Basic - couldn't connect to host

2009-06-02 Thread Gabor Grothendieck
On Tue, Jun 2, 2009 at 12:42 PM, Tony Breyal wrote: > Hi Gabor, > > Thank you kindly for your response. > > Re: Don't need to set PATH -- When I read the batchfiles page, the > opening paragraph says "just place any or all of them anywhere in your > Windows path and you will be able to access them

Re: [R] Still can't find missing data - How do I get NA in xtabs with factors?

2009-06-02 Thread Rolf Turner
On 3/06/2009, at 12:03 PM, Farley, Robert wrote: The problem here is Table doesn't seem to have a way to weigh the data. ToyData Data1 Data2 Data3 Weight 101 Sam Red Banana1.1 102 Sam Green Banana2.1 103 Sam Blue Orange2.1 104 Fred Red Orange2.1 105 Fred G

Re: [R] Still can't find missing data - How do I get NA in xtabs with factors?

2009-06-02 Thread Farley, Robert
The problem here is Table doesn't seem to have a way to weigh the data. > ToyData Data1 Data2 Data3 Weight 101 Sam Red Banana1.1 102 Sam Green Banana2.1 103 Sam Blue Orange2.1 104 Fred Red Orange2.1 105 Fred Green Guava2.1 106 Fred Blue Guava2.1 107

[R] Question on implementing RandomForest

2009-06-02 Thread Nallan Suresh
Hi - I am new to RandomForest and want to be able to predict for a set of values outside of R. So for example, if I create the model in R and want to get the prediction for an observation in a database, is there a way I can get the algorithm for the trees and final prediction for this model pri

Re: [R] Error:non-numeric argument in my function

2009-06-02 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > > interestingly, > > as.complex('0i') > # NA > but as.complex('0+0i') # 0+0i so that while just 0i is valid as a complex literal, '0i' is not valid as a string representing a complex. easy to learn and use. of course, eval(parse(text='0i'))

Re: [R] Error:non-numeric argument in my function

2009-06-02 Thread Wacek Kusnierczyk
Stavros Macrakis wrote: > I agree that it's inconsistent that > 1:'2' --> 1:2 # this doesn't seem to be documented in ? seq > 1+ '2' --> error > 1+factor(2) --> NA (with a warning) > 1 : factor(4) --> 1 (uses as.numeric/unclass of factor) > > > >> ...i'd expect ...

Re: [R] lattice: horizontal alignment of labels in key

2009-06-02 Thread Paul Murrell
Hi Thomas Zumbrunn wrote: Dear R users I have problems horizontally aligning labels in keys of lattice plots when the labels make use of plotmath. Here's a self-contained example: dat <- data.frame(x = rnorm(10), y = rnorm(10), z = factor(rep(c("a", "b"),

[R] Adding a method to a generic in another package

2009-06-02 Thread Jeffrey J. Hallman
I am the maintainer of the 'tis' package. One of the functions in my package is 'nberShade'. A user wants to make nberShade generic, with the old version renamed as nberShade.default, all of which is fine with me. And he wants to add a new method, nberShade.ggplot, which works for objects of cla

Re: [R] Most used R editors

2009-06-02 Thread Philippe Grosjean
Ronggui Huang wrote: Yes, Tinn-R is great for windows users. However, if you work under different OS, it would be great to have an OS-independent editor. Try SciViews-K (http://www.sciviews.org/SciViews-K). Works the same on Windows, Mac OS X and Linux. Best, Philippe Ronggui 2009/6/2 Bos

Re: [R] getting elements out of list automatically

2009-06-02 Thread stephen sefick
yes sorry for not being clearer. Thank you very much. regards, Stephen Sefick On Tue, Jun 2, 2009 at 4:37 PM, jim holtman wrote: > Is this what you want: > >> x <- lapply(o, function(z) c(P.value=z$p.value, W=z$statistic)) >> do.call(rbind,x) >     P.value   W.W > sand.silt 

Re: [R] Package for Clustering - Query

2009-06-02 Thread Ingmar Visser
hi Lars, a number of packages do this: flexmix does latent class regression, depmix does lca on mixed variables, depmixS4 does lca regression on mixed variables. hth, Ingmar On 28 May 2009, at 23:53, Lars Bishop wrote: Dear R users, Is there any package for Latent Class Analysis (to be used in

Re: [R] montly mean temp plot

2009-06-02 Thread Gavin Simpson
On Tue, 2009-06-02 at 15:31 -0400, jim holtman wrote: > THe problem is that when you read the data in, 'month' was converted to a > factor. Try the following to get it converted to a factor, but in the order > you want for processing: That doesn't need to be a problem, an alternative that works w

[R] all.equal(0,0i)

2009-06-02 Thread Stavros Macrakis
> all.equal(0,0i) [1] "Modes: numeric, complex" [2] "target is numeric, current is complex" > all.equal(1,1+0i) [1] "Modes: numeric, complex" [2] "target is numeric, current is complex" Is this the intended behavior? In general, all.equal is strict about argument mode, thus TRUE/1 and 1/'1' do n

Re: [R] getting elements out of list automatically

2009-06-02 Thread jim holtman
Is this what you want: > x <- lapply(o, function(z) c(P.value=z$p.value, W=z$statistic)) > do.call(rbind,x) P.value W.W sand.silt 0.047883577 185.0 gravel 0.528568587 249.5 cobble 0.19523 340.0 boulder.bedrock 0.019343358 368.0 fine.root 0.01

Re: [R] how to checking whether elements of a vector changed or not.

2009-06-02 Thread David Winsemius
Gabor; Did you perhaps get an undesired doubling of "!"? > x1 <-c("A", "A", "B", "B", "B", "A") > x1[2:length(x1)] == x1[1:(length(x1)-1)] [1] TRUE FALSE TRUE TRUE FALSE > !!diff(c(factor(x1))) [1] FALSE TRUE FALSE FALSE TRUE (Your trick of computing differences of the underlying factor

Re: [R] Barplot: annotations at tips of each bar?

2009-06-02 Thread Greg Snow
This is the second post on this topic today. Is this part of an assignment or something? You should read the discussion/thread that follows this post: http://tolstoy.newcastle.edu.au/R/e2/help/07/08/22858.html The answer to your question and to other questions that you should be asking are in

Re: [R] R constrict digits number after point precision?

2009-06-02 Thread Wacek Kusnierczyk
jim holtman wrote: > ?sprintf # for output > ?round > ... and sprintf(round(...)) for correct output vQ __ 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.

Re: [R] Nested variables

2009-06-02 Thread Mark Difford
Hi Daniel, >> I read the chapter and it says that I can nest B in A by writing A/B. But >> it doesnt seem to >> work properly. Then you need to read it again, and you need to play with some simple models, so that you learn how to specify a model properly, using the formula interface. (Achim Zei

[R] getting elements out of list automatically

2009-06-02 Thread stephen sefick
o <- (structure(list(sand.silt = structure(list(statistic = structure(185, .Names = "W"), parameter = NULL, p.value = 0.0478835773838087, null.value = structure(0, .Names = "location shift"), alternative = "two.sided", method = "Wilcoxon rank sum test with continuity correction", data.n

Re: [R] How to convert blanks to NA

2009-06-02 Thread Henrique Dallazuanna
Try this: sapply(x, function(f){is.na(f)<-which(f == '');f}) On Tue, Jun 2, 2009 at 4:14 PM, Mark Na wrote: > Hi R-helpers, > > I have imported data from Excel using the following code: > > library(xlsReadWrite) > data <- read.xls(data,colClasses=c("character")) > > and this results in all of t

[R] Barplot: annotations at tips of each bar?

2009-06-02 Thread tsunhin wong
Dear R-users, I have searched through examples of barplot in R. But there seems to be no advanced annotation options in R for their barplot. What I am trying to do is to do some annotations at the tip of each bar in a barplot, similar to the graph below: http://www.lakesuperiorstreams.org/understa

Re: [R] How to convert blanks to NA

2009-06-02 Thread John Kane
Does this do what you want x <- data.frame(1,"" , 5) x[x==""] <- NA x where x is substituted for your 'data'? - Original Message From: Mark Na To: r-help@r-project.org Sent: Tuesday, June 2, 2009 3:14:00 PM Subject: [R] How to convert blanks to NA Hi R-helpers, I have imported d

Re: [R] R constrict digits number after point precision?

2009-06-02 Thread jim holtman
?sprintf # for output ?round On Tue, Jun 2, 2009 at 3:12 PM, Xiaogang Yang wrote: > R constrict digits number after point precision? > >[[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/ma

Re: [R] how to checking whether elements of a vector changed or not.

2009-06-02 Thread Linlin Yan
> c(x[1], x[-length(x)]) != x [1] FALSE FALSE FALSE TRUE TRUE FALSE TRUE On Mon, Jun 1, 2009 at 11:57 PM, liujb wrote: > > Hello, > > I have a vector: > x <- c("A", "A", "A", "B", "A", "A", "C") > > I'd like to compare each of elements of vector x from its previous element > (except for the 1s

Re: [R] montly mean temp plot

2009-06-02 Thread Greg Snow
Without a reproducible example (we don't have month and X1999) it is hard to tell for sure, but my guess is that month is an (unordered) factor without the ordering specified, so it defaults to alphabetic. Change it to a factor with the months properly ordered and the plot should match what you

Re: [R] Plot with different x axis

2009-06-02 Thread Greg Snow
Try: xpts <- 2^(0:4) x <- 2^runif(100, 0,4) y <- rnorm(100) plot( log(x, base=2), y, xlab='x', xaxt='n' ) axis(1, at=log(xpts, base=2), lab=xpts) plot(x,y) # for comparison see ?par and ?axis for details -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s

[R] How to convert blanks to NA

2009-06-02 Thread Mark Na
Hi R-helpers, I have imported data from Excel using the following code: library(xlsReadWrite) data <- read.xls(data,colClasses=c("character")) and this results in all of the empty (blank) cells in the imported Excel file also being empty (blank) in the resulting dataframe. I am not used to havi

Re: [R] montly mean temp plot

2009-06-02 Thread jim holtman
THe problem is that when you read the data in, 'month' was converted to a factor. Try the following to get it converted to a factor, but in the order you want for processing: x <- read.table(yourFile, ..., as.is=TRUE, na.strings="DNA") # prevent conversion to factor x$month <- factor(x$month, le

[R] Conducting data modelling on weighted data using R

2009-06-02 Thread Harding, Peter
Hello, I am starting to use R for various analyses, for example I use the ca package to do Correspondence Analysis. I am also looking to use packages such as: pls Partial Least Squares plspmPartial Least Squares Path Modelling However, although I can use packages such as these on un-w

[R] R constrict digits number after point precision?

2009-06-02 Thread Xiaogang Yang
R constrict digits number after point precision? [[alternative HTML version deleted]] __ 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.htm

Re: [R] montly mean temp plot

2009-06-02 Thread Emmanuel Charpentier
Le mardi 02 juin 2009 à 16:32 +, ms.com a écrit : > Dear all > i got a problem in monthly mean temperature. here i am attaching the data set > as well as the plot i got with the following command > plot(month,type='n') > plot(month,X1999) > > this command gave the plot where the month names a

Re: [R] Problem downloading webpages using batchfiles and RCurl from command line in Vista Basic - couldn't connect to host

2009-06-02 Thread Tony Breyal
Hi Gabor, Thank you kindly for your response. Re: Don't need to set PATH -- When I read the batchfiles page, the opening paragraph says "just place any or all of them anywhere in your Windows path and you will be able to access them in any Windows console session". My interpretation of this was t

[R] montly mean temp plot

2009-06-02 Thread ms.com
Dear all i got a problem in monthly mean temperature. here i am attaching the data set as well as the plot i got with the following command plot(month,type='n') plot(month,X1999) this command gave the plot where the month names are in alphabetic order, i want the plot in monthly sequence could

[R] Plot with different x axis

2009-06-02 Thread Irina Foss
dear, I am trying to plot a standard plot, but I want the x axis to be 1,2,4,8,16 with equal intervals between them on plot. I will appreciate some help. Thank you, Irina Irina Foss Environmental Research Institute North Highland College UHI Millennium Institute Castle Street Thurso, Caithn

Re: [R] C++ to R : 64bit to 32bit problem.

2009-06-02 Thread Thomas Lumley
On Tue, 2 Jun 2009, H c wrote: Hi, I'm new to calling C++/C programs from R and am having some trouble getting started. Following Sigal Blay (Simon Fraser University)'s instructions, I have a .c file called "useC1.c": /* useC1.c*/ void useC(int *i) { i[0] = 11; } This pr

[R] lattice: horizontal alignment of labels in key

2009-06-02 Thread Thomas Zumbrunn
Dear R users I have problems horizontally aligning labels in keys of lattice plots when the labels make use of plotmath. Here's a self-contained example: dat <- data.frame(x = rnorm(10), y = rnorm(10), z = factor(rep(c("a", "b"), each = 5))) xyplot(y ~ x, dat,

Re: [R] Most used R editors

2009-06-02 Thread Ian Fiske
If you are developing packages, the Eclipse plugin StatET is excellent. You get all of the fancy coding features of Eclipse plus many useful tools specifically for R package building. Combining this with the SVN plugin subclipse has been a fantastic combination for me. Ian Fiske -- View this m

Re: [R] RKWard: R backend requests information

2009-06-02 Thread AG
Romain Francois wrote: Hi, rkward has its own mailing list where people will be able to help you. https://lists.sourceforge.net/lists/listinfo/rkward-users Romain AG wrote: Hello List I've decided to dive into R and found a useful GUI for GNU/Linux (Debian testing/ Squeeze) called RKWard.

Re: [R] Creating a plot with an image as background

2009-06-02 Thread Greg Snow
The RgoogleMaps package does something similar to this, you could look at the code to see how those functions work and if they can be modified to work with your graphic. The general idea is to load the picture and plot it (the rimage package reads and plots jpeg images, there are some other fun

[R] C++ to R : 64bit to 32bit problem.

2009-06-02 Thread H c
Hi, I'm new to calling C++/C programs from R and am having some trouble getting started. Following Sigal Blay (Simon Fraser University)'s instructions, I have a .c file called "useC1.c": /* useC1.c*/ void useC(int *i) { i[0] = 11; } This produces a .o file : "useC1.o" in a

Re: [R] bigmemory - extracting submatrix from big.matrix object

2009-06-02 Thread Jay Emerson
Thanks for trying this out. Problem 1. We'll check this. Options should certainly be available. Thanks! Problem 2. Fascinating. We just (yesterday) implemented a sub.big.matrix() function doing exactly this, creating something that is a big matrix but which just references a contiguous subset

[R] allEffects() with lm

2009-06-02 Thread Mikhail Spivakov
Dear John Fox and everyone, I have been using the effects library with glms and have found it very useful. Now I'm trying it with lms and I'm not sure if the results of the allEffects() are as expected. I've got a model that looks like this: mymodel = lm(formula = A ~ B + C + D + B:D + C:D)

[R] Correlation structure in AR(2) and ARMA(p,q)

2009-06-02 Thread FMH
Hi, Let theta be the coefficient in AR(1) model, the components of the correlation structure is equal to 1 for times s = t, and theta^|t-s| for t > s. Could someone do me a favour to give some ideas on the correlation structure in AR(2) model and correlation structure of ARMA(p,q), as well? T

Re: [R] how to add value on the bar ploted by barplot()

2009-06-02 Thread Greg Snow
I would suggest reading the discussion that follows the post at: http://tolstoy.newcastle.edu.au/R/e2/help/07/08/22858.html It includes the answer to your question as well as the answers to other questions that you did not ask, but probably should. Hope this helps, -- Gregory (Greg) L. Snow Ph

Re: [R] RKWard: R backend requests information

2009-06-02 Thread Romain Francois
Hi, rkward has its own mailing list where people will be able to help you. https://lists.sourceforge.net/lists/listinfo/rkward-users Romain AG wrote: Hello List I've decided to dive into R and found a useful GUI for GNU/Linux (Debian testing/ Squeeze) called RKWard. However, when I fire it

[R] RKWard: R backend requests information

2009-06-02 Thread AG
Hello List I've decided to dive into R and found a useful GUI for GNU/Linux (Debian testing/ Squeeze) called RKWard. However, when I fire it up a dialog box appears with the statement "R backend requests information". I have tried entering the path to the R libraries (e.g. /usr/bin/R; /etc/R

Re: [R] Axis label spanning multiple plots

2009-06-02 Thread Greg Snow
You will need to tell mtext something about where to position the text (at least until the esp package becomes available). Sometimes using the adj argument gives a good enough result, if not then you will need to use the at argument, the grconvertY function (and grconvertX) is one way to find

Re: [R] Help deciding on data format for sales data (newbie)

2009-06-02 Thread Daniel Malter
Depending on what you want to do, the second format (wide) maybe useful; but it can get very clumsy if there are many potential items. You may think about the long format: OrderNo Customer Item 1 1 a 1 1 b 1 1 c 2 1 d

[R] Help deciding on data format for sales data (newbie)

2009-06-02 Thread jonathanbriggs
Dear All Beginning data mining and need some help working out the best way to represent data. I have searched here and online and not found any real help. Imagines that I have a file of order(sales) data OrderNo CustomerNo ItemsInOrder 1 1a,b,c 2 1

[R] ggplot2-legend overlaps with strip

2009-06-02 Thread Felipe Carrillo
Hi: See the attached pdf graphic. The legend overlaps a little bit with the strip. Is there a way to move it over a half a cm? Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish & Wildlife Service California, USA Europe.pdf Description: Adobe PD

Re: [R] Problem downloading webpages using batchfiles and RCurl from command line in Vista Basic - couldn't connect to host

2009-06-02 Thread Gabor Grothendieck
On Tue, Jun 2, 2009 at 7:09 AM, Tony Breyal wrote: > Dear all, > > I am having a problem downloading webpages through R when i run it in > the DOS window under Windows Vista Basic. I have downloaded the > batchfiles from http://code.google.com/p/batchfiles/ and have > successfully set the PATH. Y

Re: [R] Sample size calculation proportions with EpiR: Discrepancy to other calculators

2009-06-02 Thread Karl Knoblick
Thanks for the answers. Does anybody have more examples than in the help of epiR? After the experience of "proportion" and "cohort" I am somehow uncertain. Karl - Ursprüngliche Mail Von: Thomas Lumley An: Chuck Cleland CC: Karl Knoblick ; r-h...@stat.math.ethz.ch Gesendet: Dienst

Re: [R] What do you think about my function?

2009-06-02 Thread Mike Lawrence
It would help to explain the problem that the function is designed to solve. On Tue, Jun 2, 2009 at 9:35 AM, Grześ wrote: > > Hello, > I want to know what do you think about my function. I know that it isn't > briliant :/ but what do you think? What I should do that my function will be > better?

[R] Changing state in ODE

2009-06-02 Thread Paul Hutson
I am trying to fit data from human and animal pharmacokinetic studies in which drug concentrations have been determined over time over the course of several doses. In this case, the data are expected to be fit by a saturable (Michaelis-Menton) process. I can get the ode routine to run with on

Re: [R] Plots automatically closing when using RScript

2009-06-02 Thread Rhizomorph
Gabor, thanks for the quick reply. Yeah, I know that I can always save the output to a file, but the goal was to be able to leave the window up and allow the user a chance to inspect/resize it before they saved it. Gabor Grothendieck wrote: > > Try this: > > Rscript -e "png('abc.png');plot(1:1

[R] What do you think about my function?

2009-06-02 Thread Grześ
Hello, I want to know what do you think about my function. I know that it isn't briliant :/ but what do you think? What I should do that my function will be better? (now is very slow and not ideal, sometimes I also get a mistake!) ## My function ##

[R] Problem downloading webpages using batchfiles and RCurl from command line in Vista Basic - couldn't connect to host

2009-06-02 Thread Tony Breyal
Dear all, I am having a problem downloading webpages through R when i run it in the DOS window under Windows Vista Basic. I have downloaded the batchfiles from http://code.google.com/p/batchfiles/ and have successfully set the PATH. I open up 'Command Prompt' in Vista and type (after the C:\...>

Re: [R] Nested variables

2009-06-02 Thread DanielWC
Hi again I read the chapter and it says that I can nest B in A by writing A/B. But it doesnt seem to work properly. The package I use is pscl, I am trying to model zero inflated data. Here is the full model: zip1<-zeroinfl(Visitation ~ Habitat/Site + Sps + TP + Resource + Sps*Habitat/Site + Sps*R

[R] bigmemory - extracting submatrix from big.matrix object

2009-06-02 Thread utkarshsinghal
I am using the library(bigmemory) to handle large datasets, say 1 GB, and facing following problems. Any hints from anybody can be helpful. _Problem-1: _ I am using "read.big.matrix" function to create a filebacked big matrix of my data and get the following warning: > x = read.big.matrix("

Re: [R] Sample size - proportion continuity correction

2009-06-02 Thread Frank E Harrell Jr
Karl Knoblick wrote: Hallo! Does anybody know how to calculate a sample size estimation for proportions with continuity correction? That would lose power. Frank I only found EpiR which seems to calculate without continuity correction: library(epiR) epi.studysize(treat = .65, control = .

Re: [R] Most used R editors

2009-06-02 Thread Joseph Magagnoli
on windows I use Rwinedt, and under linux I use SciViews-k ( http://www.sciviews.org/SciViews-K/index.html), works well for me joe On Tue, Jun 2, 2009 at 9:44 AM, Ronggui Huang wrote: > Yes, Tinn-R is great for windows users. However, if you work

[R] Sample size: epiR survival

2009-06-02 Thread Karl Knoblick
Hallo! Does anybody know what epiR calculates with method = "survival"? library(epiR) library(survival) epi.studysize(treat = .65, control = .50, n = NA, sigma = NA, power = 0.80, r = 1, conf.level = 0.95, sided.test = 2, method = "survival") Because I found out that method "proportion" does n

Re: [R] help on understanding a code

2009-06-02 Thread Mike Lawrence
You haven't provided us enough information. You should also provide examples where we can access all the called objects; for example, ttest() is not a built-in function, so we have no idea what it is. Same goes for dat and y. On Tue, Jun 2, 2009 at 11:43 AM, Hongyuan Cao wrote: > Dear R user, > >

Re: [R] R: subset dataframe/list

2009-06-02 Thread David Winsemius
Also look at the documentation for read.csv2(). -- David. On Jun 2, 2009, at 5:43 AM, Cecilia Carmo wrote: Thank you all!!! The problem was the decimal symbol! My data was saved in a txt file, so I’ve introduced the dec="," in «read.table» and it worked. What I’ve done was coeficient

[R] Sample size - proportion continuity correction

2009-06-02 Thread Karl Knoblick
Hallo! Does anybody know how to calculate a sample size estimation for proportions with continuity correction?   I only found EpiR which seems to calculate without continuity correction: library(epiR) epi.studysize(treat = .65, control = .50, n = NA, sigma = NA, power = 0.80, r = 1, conf.level

Re: [R] Most used R editors

2009-06-02 Thread Ronggui Huang
Yes, Tinn-R is great for windows users. However, if you work under different OS, it would be great to have an OS-independent editor. Ronggui 2009/6/2 Bos, Roger : > I have not seen Tinn-R mentioned so I will mention it.  Its worked great for > me.  Eclipse is a nice IDE, but its more complicated

[R] help on understanding a code

2009-06-02 Thread Hongyuan Cao
Dear R user, I am trying to understand this following code. Basically it's using a permutation method to calculate p value. But I would like to know exactly how the permutation works. #calculates null statistics tt0 <- 0 set.seed(123) B <- 100 for(i in 1:B) { v <- sample(y) tt0 <- c(tt0,ttest(dat

Re: [R] [ANN] ggplot2 + rggobi course. July 30-31, Washington DC

2009-06-02 Thread hadley wickham
Hi everyone, We still have places available for our two-day looking-at-data course: July 30-31 Washington DC Day one: static graphics with ggplot2 Day two: interactive graphics with rggobi and GGobi. You can attend one day (for $295) or both days (for $550). Student discounts are available. Al

Re: [R] Most used R editors

2009-06-02 Thread Bos, Roger
I have not seen Tinn-R mentioned so I will mention it. Its worked great for me. Eclipse is a nice IDE, but its more complicated that what is necessary for R programming. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Martial

Re: [R] variance does not equal serial covariance of lag zero?

2009-06-02 Thread Liviu Andronic
On Tue, Jun 2, 2009 at 3:34 PM, Thomas Lumley wrote: > The answers differ by a factor of 19/20, ie, (n-1)/n, so it is presumably > the choice of denominator for the variance that differs. > Same issue is present in ccf(): cov() != ccf(lag.max=0, type="covariance"). Liviu

Re: [R] GTK Tooltips under Linux

2009-06-02 Thread Ronggui Huang
Thanks, Michael. 2009/6/2 Michael Lawrence : > I think I've got the threaded event loop working. Uploaded it to CRAN as > 2.12.12. Should appear in a few days. > > Michael > > On Fri, May 29, 2009 at 11:24 AM, Ronggui Huang > wrote: >> >> Noted with thanks. >> >> Regards >> >> Ronggui >> >> 2009/

Re: [R] Most used R editors

2009-06-02 Thread Tomas Lanczos
On Tue, 2009-06-02 at 07:06 +, Martial Sankar wrote: > Hi, > > I am a little lonely as R users in my group. So, I would like to know which > editor is the most used in the R community. > This post is some kind of survey. > > Personally, I use Emacs with ESS, It permits to : > > - open more

Re: [R] Most used R editors

2009-06-02 Thread Tomas Lanczos
On Tue, 2009-06-02 at 07:06 +, Martial Sankar wrote: > Hi, > > I am a little lonely as R users in my group. So, I would like to know which > editor is the most used in the R community. > This post is some kind of survey. > > Personally, I use Emacs with ESS, It permits to : > > - open more

Re: [R] GTK Tooltips under Linux

2009-06-02 Thread Michael Lawrence
I think I've got the threaded event loop working. Uploaded it to CRAN as 2.12.12. Should appear in a few days. Michael On Fri, May 29, 2009 at 11:24 AM, Ronggui Huang wrote: > Noted with thanks. > > Regards > > Ronggui > > 2009/5/29 Michael Lawrence : > > > > > > On Thu, May 28, 2009 at 7:35 PM,

Re: [R] warning message when running quantile regression

2009-06-02 Thread jude.ryan
Thanks Rongui! I wasn't aware of this FAQ page. I will look at that page. Jude -Original Message- From: Ronggui Huang [mailto:ronggui.hu...@gmail.com] Sent: Monday, June 01, 2009 10:11 PM To: Ryan, Jude Cc: r-help@r-project.org Subject: Re: [R] warning message when running quantile regre

Re: [R] variance does not equal serial covariance of lag zero?

2009-06-02 Thread Thomas Lumley
The answers differ by a factor of 19/20, ie, (n-1)/n, so it is presumably the choice of denominator for the variance that differs. -thomas On Tue, 2 Jun 2009, Liviu Andronic wrote: Dear all, Does this make any sense: var() = cov() != acf(lag.max=0, type="covariance")? I have daily

Re: [R] RES: Most used R editors

2009-06-02 Thread Robert Kinley
# Not sure whether anyone has mentioned Crimson Editor (for windows) so far ... http://www.crimsoneditor.com/ In Linux/Unixland there is 'kate' Bob Kinley [[alternative HTML version deleted]] __ R-help@r-project.org mailing list htt

Re: [R] newbie help: simple operations in R

2009-06-02 Thread Wacek Kusnierczyk
Carletto Rossi wrote: > I'm sorry but i verify that Simon solution doesn't work. It makes only the > product between the corrispondent element of the columns (first with first, > second with seconds, etc,...) > These are the list of R commands: > > >> quattro <- read.csv('new_data.csv', header=T

[R] variance does not equal serial covariance of lag zero?

2009-06-02 Thread Liviu Andronic
Dear all, Does this make any sense: var() = cov() != acf(lag.max=0, type="covariance")? I have daily data of IBM for May 2005, and I'm using the logarithmic return: > ibm200505$LRAdj.Close [1] NA 0.0203152 0.0005508 -0.0148397 -0.0025182 0.0092025 -0.0013889 [8] 0.0098196 -0.0103757

  1   2   >