[R] Writing list object to a file

2008-04-22 Thread Arun Kumar Saha
Hi all, I am wondering how to write a 'list' object to a file. I already gone through some threads like http://mail.python.org/pipermail/python-list/2001-April/080639.html, however could not trace out any reliable solution. I tried following : > write.table(calc, file="c:/data.csv") Error in data

Re: [R] k-means: should columns in dataset be in same scale?

2008-04-22 Thread Prof Brian Ripley
k-means uses Euclidean distance, so scaling of the variables does matter. Whether you want to standardize depends on the example (as it does in most multivariate analysis problems, e.g. PCA has the same issues). On Tue, 22 Apr 2008, Johan Jackson wrote: > Hi all, > > Simple question re k-means.

[R] multidim package

2008-04-22 Thread TEBBI FATIMA
hi, if any one know from where we can download multidim package thanks in advance __ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/

[R] R 2.7.0 in Ubuntu

2008-04-22 Thread Vincent Goulet
The R 2.7.0 packages for Ubuntu on i386 and amd64 are on their way to CRAN. Please note the new release support policy: we now support all stable Desktop releases of Ubuntu until their official end of life date. As of Thursday (we're a day or two ahead, here), these are Hardy Heron (8.04),

Re: [R] nth step transition matrices

2008-04-22 Thread Brad Lukoskie
Thanks for the reply. This isn't a homework problem, its just part of a project I am working on. I will give it a try. I know from experience programming c++ and c# that learning by doing is the best way. Could you explain what the % * % is doing to the matrix? Is this similar to a "mod"

[R] data for metaMDS (diagnostic tips) please help

2008-04-22 Thread stephen sefick
I have a large data.frame rows=sites, column=species. Being a species matrix it is very sparse and I have found that there are no site rows that are = 0 and no species = 0 and I am getting and error that reads x = read.table("shit.txt", sep="\t",header=T, row.names=1) x.m <- as.matrix(x) x.t <- t

Re: [R] difftime result in years?

2008-04-22 Thread Gabor Grothendieck
Try this: fmt <- "%d/%m/%Y" d1 <- as.Date("20/11/1962", fmt) d2 <- as.Date("20/5/1964", fmt) julian(d2, d1)/365.25 On Tue, Apr 22, 2008 at 8:25 PM, Worik R <[EMAIL PROTECTED]> wrote: > I would like to know how many years (including partial years) are between > two dates. > > So difftime("20/11/

Re: [R] Incrementing Dates

2008-04-22 Thread Gabor Grothendieck
Try: Sys.Date() + 1 seq(Sys.Date(), length = 2, by = "month")[2] seq(Sys.Date(), length = 2, by = "year")[2] R News 4/1 has an article on dates. On Tue, Apr 22, 2008 at 8:17 PM, Worik R <[EMAIL PROTECTED]> wrote: > How can I increment the value of a Date class? > > I want to add a day, month or

Re: [R] Incrementing Dates

2008-04-22 Thread Dirk Eddelbuettel
On Wed, Apr 23, 2008 at 12:17:55PM +1200, Worik R wrote: > How can I increment the value of a Date class? > > I want to add a day, month or year to a date. As the shoe company from Portland would say, "just do it". The key is knowing that the seq() function has a variant operating on the Date cl

[R] k-means: should columns in dataset be in same scale?

2008-04-22 Thread Johan Jackson
Hi all, Simple question re k-means. If I have a data set with columns that are on different scales (say col 1 has var=100 and col2 var=2), will this make a difference to the k-means algorithm? It seems as though it does. If so, should we first standardize the columns of the dataset so that each co

[R] difftime result in years?

2008-04-22 Thread Worik R
I would like to know how many years (including partial years) are between two dates. So difftime("20/11/1962", "20/5/1964", units="years") would be about 1.5 But units of years are not available. cheers Worik [[alternative HTML version deleted]]

[R] Incrementing Dates

2008-04-22 Thread Worik R
How can I increment the value of a Date class? I want to add a day, month or year to a date. cheers Worik [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] nth step transition matrices

2008-04-22 Thread Rolf Turner
(a) Is this a homework question? (b) Your value of P^2 is very rough --- only 2 decimal places. (c) The answer to the question ``Is there a way ...?'' is ``Of course!'' There is always a way in R. (d) In this case I would write a function, say ``matpow(M,n)'' to calculate the n-th p

[R] nth step transition matrices

2008-04-22 Thread Brad Lukoskie
Hello, I have a question in regards to markov chains and transition probabilities. I am trying to figure out a way to calculate the "kth-step transition matrix" of a given matrix. Say for example I have a single step 2x2 matrix: 1 2 P= 1 .95 .05 2 .01. 99 If I were to

[R] Comparing kendall's tau values?

2008-04-22 Thread Ashton, Gail
I have 3 variables relating to the successful introductions of species to 95 different areas: introduction frequency; number of successes pre 1906; number of successes post 1906 The data are not normal, nor homo-skedatic, so I am using non-parametric statistics. I have calculated Kendall's tau be

Re: [R] Ubuntu vs. Windows

2008-04-22 Thread Prof Brian Ripley
On Tue, 22 Apr 2008, Peter Dalgaard wrote: > Doran, Harold wrote: >> Dear List: >> >> I am very much a unix neophyte, but recently had a Ubuntu box installed >> in my office. I commonly use Windows XP with 3 GB RAM on my machine and >> the Ubuntu machine is exactly the same as my windows box (e.g.

Re: [R] estimate of overdispersion with glm.nb

2008-04-22 Thread Ben Bolker
Markus Loecher gmail.com> writes: > > Dear R users, > I am trying to fully understand the difference between estimating > overdispersion with glm.nb() from MASS compared to glm(..., family = > quasipoisson). > It seems that (i) the coefficient estimates are different and also (ii) the > summary(

Re: [R] levels in dataframes

2008-04-22 Thread Peter Alspach
Georg One way is to call factor() on the subsetted object. > georg <- factor(LETTERS[1:4]) > summary(georg) A B C D 1 1 1 1 > georg <- georg[georg!='A'] > summary(georg) # the level is still there A B C D 0 1 1 1 > georg <- factor(georg) > summary(georg) # now it is gone B C D 1 1 1 HTH ..

Re: [R] Ubuntu vs. Windows

2008-04-22 Thread Peter Dalgaard
Doran, Harold wrote: > Dear List: > > I am very much a unix neophyte, but recently had a Ubuntu box installed > in my office. I commonly use Windows XP with 3 GB RAM on my machine and > the Ubuntu machine is exactly the same as my windows box (e.g., > processor and RAM) as far as I can tell. > > No

[R] levels in dataframes

2008-04-22 Thread Georg Ehret
Dear R community, I wish to ask a short question concerning factor-data in dataframes: When I subset the data and get rid of all data for one level, I still retain the level name (obtained by levels(dataframe$variablename) ). Is there a convenient way to get rid of the levels for which all data

Re: [R] optimization setup

2008-04-22 Thread Ray Brownrigg
On Wed, 23 Apr 2008, threshold wrote: > Hi, here comes my problem, say I have the following functions (example > case) # > function1 <- function (x, theta) > {a <- theta[1] ( 1 - exp(-theta[2]) ) * theta[3] ) > b <- x * theta[1] / theta[3

[R] R-Forge vs. RForge

2008-04-22 Thread Derek Ogle
I have two packages that I use locally and have been curious about moving them to "R Forge" to take advantage of SVN, builds, etc. In looking into this I stumbled across two different sites. The apparent official "R Forge" site at http://r-forge.r-project.org/ and a seemingly "unofficial" sit

Re: [R] Ubuntu vs. Windows

2008-04-22 Thread Abhijit Dasgupta
My naive understanding of this (I switched to Ubuntu a year ago from WinXP for similar reasons) is that Ubuntu as an OS uses less memory than WinXP, thus leaving more memory for computation, swap space, etc. In other words, Ubuntu is "lighter" than XP on system resources. Abhijit Doran, Harold

[R] lmer model building--include random effects?

2008-04-22 Thread Ista Zahn
Hello, This is a follow up question to my previous one http://tolstoy.newcastle.edu.au/R/e4/help/08/02/3600.html I am attempting to model relationship satisfaction (MAT) scores (measurements at 5 time points), using participant (spouseID) and couple id (ID) as grouping variables, and time (ye

[R] Ubuntu vs. Windows

2008-04-22 Thread Doran, Harold
Dear List: I am very much a unix neophyte, but recently had a Ubuntu box installed in my office. I commonly use Windows XP with 3 GB RAM on my machine and the Ubuntu machine is exactly the same as my windows box (e.g., processor and RAM) as far as I can tell. Now, I recently had to run a very lar

Re: [R] Using the 'by' function within a 'for' loop

2008-04-22 Thread jim holtman
One of the things that is probably happening is that the 'by' is producing all possible combinations and in some cases 'x' is size zero. Put a check in the function within the 'by' to check for this condition and just return a NULL. Another approach that I use is to "split(seq(nrow(df), condition

Re: [R] Using the 'by' function within a 'for' loop

2008-04-22 Thread jim holtman
After talking about it, I forgot to put the drop=TRUE in the 'split' call: x.index <- split(seq(nrow(dat)), dat[,c("tx","day")], drop=TRUE) results <- lapply(x.index, function(.indx){ mn <- mean(dat$k[.indx]) .. data.frame() }) On Tue, Apr 22, 2008 at 1:30 PM, Judith Flores <[EMA

Re: [R] Getting rid of borders on semi-transparent plotting symbols

2008-04-22 Thread Prof Brian Ripley
On Tue, 22 Apr 2008, Dieter Menne wrote: > Karl Ove Hufthammer math.uib.no> writes: > >> >> R version 2.7.0 RC (2008-04-20 r45403) >> >> When using semi-transparent filled plotting symbols, the border of the >> symbol has a different (darker) colour than the interior: >> >> plot(0, 0, pch=19, col

Re: [R] Choice of notch size in R

2008-04-22 Thread hadley wickham
On Tue, Apr 22, 2008 at 2:00 PM, Alex Reynolds <[EMAIL PROTECTED]> wrote: > Many thanks to you and Peter Dalgaard for your advice. Instead of > notches on a classic box plot, I have elected to draw a more > "minimalized" box plot along the lines suggested by Tufte, and overlap a > custom signifi

Re: [R] Choice of notch size in R

2008-04-22 Thread Alex Reynolds
Many thanks to you and Peter Dalgaard for your advice. Instead of notches on a classic box plot, I have elected to draw a more "minimalized" box plot along the lines suggested by Tufte, and overlap a custom significance region on this. As a statistical question, if I log-transform my data, can

Re: [R] Using the 'by' function within a 'for' loop

2008-04-22 Thread hadley wickham
Hi Judith, Could you provide a copy of your data as well? (Either as a csv file, or by copying and pasting the output of dput(my.data.frame) or by generating a data.frame of random numbers with the same structure as your data). That will help people to see what your code does and suggest improve

[R] optimization setup

2008-04-22 Thread threshold
Hi, here comes my problem, say I have the following functions (example case) # function1 <- function (x, theta) {a <- theta[1] ( 1 - exp(-theta[2]) ) * theta[3] ) b <- x * theta[1] / theta[3]^2 return( list( a = a, b = b )) } #

Re: [R] how to read in multiple files with unequal number of columns

2008-04-22 Thread John Kane
You might want to have a look at the merge_all function in the reshape package. --- Tania Oh <[EMAIL PROTECTED]> wrote: > Dear all, > > I want to read in 1000 files which contain varying > number of columns. > For example: > > file[1] contains 8 columns (mixture of characters > and numbers) > f

Re: [R] Getting rid of borders on semi-transparent plotting symbols

2008-04-22 Thread Dieter Menne
Karl Ove Hufthammer math.uib.no> writes: > > R version 2.7.0 RC (2008-04-20 r45403) > > When using semi-transparent filled plotting symbols, the border of the > symbol has a different (darker) colour than the interior: > > plot(0, 0, pch=19, col="#FF22") > Same R version, Window, the prob

Re: [R] bootstrap for confidence intervals of the mean

2008-04-22 Thread Robert A LaBudde
See the help for boot(). The function in the 2nd argument has to be of a special form. You need to define such a form, as in: fmean<- function (x, i) mean(x[i]) #use data x[] and indices i and then boot.out<- boot(d, fmean, R=1000, sim='permutation') At 12:59 PM 4/22/2008, stephen sefick wrot

[R] Using the 'by' function within a 'for' loop

2008-04-22 Thread Judith Flores
Dear R experts, I am sorry for sending this email again. I would imagine yesterday and maybe today, have been very busy days with the release of R v 2.7.0. I join all the R users who are very gratful for your contant work and efforts, specially knowing that you are doing this for the sake of

Re: [R] bootstrap for confidence intervals of the mean

2008-04-22 Thread Gavin Simpson
On Tue, 2008-04-22 at 12:59 -0400, stephen sefick wrote: > d = c(0L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 0L, 0L, 7375L, > NA, NA, 17092L, 0L, 0L, 32390L, 2326L, 22672L, 13550L, 18285L) > > boot.out <-boot(d, mean, R=1000, sim="permutation") > > Error in mean.default(data, original, ...) : >

[R] intervention analysis for time series

2008-04-22 Thread Michael Wolf
Dear all, I am wondering how/if it is possible to implement the general methodology of Box and Tiao: "Intervention analysis with applications to economic and environmental problems" (JASA, 1975, pages 70-79) in R? This question has been posted before but without a positive response (at the

[R] bootstrap for confidence intervals of the mean

2008-04-22 Thread stephen sefick
d = c(0L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 0L, 0L, 7375L, NA, NA, 17092L, 0L, 0L, 32390L, 2326L, 22672L, 13550L, 18285L) boot.out <-boot(d, mean, R=1000, sim="permutation") Error in mean.default(data, original, ...) : 'trim' must be numeric of length one I know that I am missing somethi

Re: [R] cloud plot has white(transparent?) background

2008-04-22 Thread Deepayan Sarkar
On 4/22/08, Karin Lagesen <[EMAIL PROTECTED]> wrote: > > > I am using the code example from the R graph gallery to look at a > cloud plot: > > require(lattice) > data(iris) > print(cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris, > groups = Species, screen = list(z = 2

Re: [R] Documentation General Comments

2008-04-22 Thread Duncan Murdoch
On 4/22/2008 11:46 AM, Dr. Jeff Miller wrote: > Bert, > > I don't think the documentation in of itself is the core of the problem > presented in the original post about this. The problem is one of > organization. I commented about it possibly being time for an exhaustive R > Guide (similar to thos

Re: [R] cloud plot has white(transparent?) background

2008-04-22 Thread Deepayan Sarkar
On 4/22/08, David Winsemius <[EMAIL PROTECTED]> wrote: > Karin Lagesen <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > > > > I am using the code example from the R graph gallery to look at a > > cloud plot: > > > > require(lattice) > > data(iris) > > print(cloud(Sepal.Length ~ Petal

Re: [R] subset and boxplots

2008-04-22 Thread Sebastian P. Luque
On Tue, 22 Apr 2008 07:55:41 -0800, "Marlin Keith Cox" <[EMAIL PROTECTED]> wrote: > R users, This should be simple, but I cannot figure it out. I import > test.csv, then create a subset for "brook_dis". When I plot (week, R) > I get a nice boxplot, but along the x axis, there are weeks a, b, c >

Re: [R] logit GLM without intercept

2008-04-22 Thread Gavin Simpson
On Tue, 2008-04-22 at 17:04 +0200, [EMAIL PROTECTED] wrote: > Hi Robert, > > you can exclude the intercept by including "-1" in the formula: > > value <- as.numeric(runif(20)<.4) > ppm <- rnorm(20) > glm(value~ppm-1,family=binomial) Note that 0+ppm is the same thing, try it: glm(value ~ 0 + ppm

Re: [R] Getting rid of borders on semi-transparent plotting symbols

2008-04-22 Thread hadley wickham
But is this behaviour a bug or by design? Hadley On Tue, Apr 22, 2008 at 10:47 AM, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > plot(0, 0, pch=21, bg="#FF22", col="#FF01") > > may be (close to) what you are looking for. > > > > On Tue, 22 Apr 2008, Karl Ove Hufthammer wrote: > > > R v

[R] subset and boxplots

2008-04-22 Thread Marlin Keith Cox
R users, This should be simple, but I cannot figure it out. I import test.csv, then create a subset for "brook_dis". When I plot (week, R) I get a nice boxplot, but along the x axis, there are weeks a, b, c along with h and nh. Thank you ahead of time. keith rm(list=ls()) cond.exp1<-read.csv("

Re: [R] logit GLM without intercept

2008-04-22 Thread Prof Brian Ripley
On Tue, 22 Apr 2008, [EMAIL PROTECTED] wrote: > Hi Robert, > > you can exclude the intercept by including "-1" in the formula: > > value <- as.numeric(runif(20)<.4) > ppm <- rnorm(20) > glm(value~ppm-1,family=binomial) Yes, but that is the same as 0 + ppm, which I tend to think is more intuitive

Re: [R] Documentation General Comments

2008-04-22 Thread Dr. Jeff Miller
Bert, I don't think the documentation in of itself is the core of the problem presented in the original post about this. The problem is one of organization. I commented about it possibly being time for an exhaustive R Guide (similar to those huge books put out for commercial software) that compile

Re: [R] Use of recordPlot

2008-04-22 Thread Greg Snow
You seem to be confusing several issues. First, being object oriented does not mean that it matches C++ syntax or that every object is guarenteed to have specific methods. What lead you to think that a recordedplot would have a metafile method? Nothing else has that method, and the only function

Re: [R] Getting rid of borders on semi-transparent plotting symbols

2008-04-22 Thread Prof Brian Ripley
plot(0, 0, pch=21, bg="#FF22", col="#FF01") may be (close to) what you are looking for. On Tue, 22 Apr 2008, Karl Ove Hufthammer wrote: > R version 2.7.0 RC (2008-04-20 r45403) > > When using semi-transparent filled plotting symbols, the border of the > symbol has a different (darker) co

Re: [R] Research Notes

2008-04-22 Thread mel
Tom Chr Backer Johnsen a écrit : > What has become more and more obvious to me after I started using R > about two years ago is that I have collected a large number of data > files, scripts, and workspaces (.Rdata files) in several catalogs on my > computer. It is also obvious that my memory i

Re: [R] Modeling presence only data in R

2008-04-22 Thread milton ruser
Hi Rubén, It also work for "presence-only" data? I haven´t absence data. Thanks a lot. miltinho On 4/22/08, Rubén Roa-Ureta <[EMAIL PROTECTED]> wrote: > > milton ruser wrote: > > > Dear All, > > > > I have a set of environental maps and presence-only points for some > > species. > > How can I

Re: [R] Documentation General Comments

2008-04-22 Thread Bert Gunter
FWIW: I consider the documentation of Core R to be one of its great strengths: it is terse (read: to the point), detailed, and accurate. I find it eminently useful and helpful. Indeed, it was why I made the decision some years ago to switch from S-Plus to R (I readily acknowledge that S-Plus may h

[R] Feed list of vectors to vioplot()?

2008-04-22 Thread Johannes Graumann
Hi, I have a list of vectors and am trying to coerce them into something that vioplot will take as groups of data to be plotted independently. Can someone nudge me into the right direction? Thanks, Joh __ R-help@r-project.org mailing list https://stat.

Re: [R] Documentation General Comments

2008-04-22 Thread Greg Snow
This is a case of you can't please everyone. A while back there was some complaint that "Introduction to R" spent to much time on talking about the different types of variables, just the opposite complaint of yours. There are several other sources of documentation (look under the books link on th

Re: [R] Modeling presence only data in R

2008-04-22 Thread Rubén Roa-Ureta
milton ruser wrote: > Dear All, > > I have a set of environental maps and presence-only points for some species. > How can I generate distributions models on R using these presence-only data? > What packages and functions can I use to do so? > > Kind regards, > > Miltinho > Brazil If you have l

Re: [R] logit GLM without intercept

2008-04-22 Thread gorgasal
Hi Robert, you can exclude the intercept by including "-1" in the formula: value <- as.numeric(runif(20)<.4) ppm <- rnorm(20) glm(value~ppm-1,family=binomial) HTH Stephan > Dear Statisticians, > > I would like to analyse my data with a GLM with binomial error distribution > and logit link fun

[R] Modeling presence only data in R

2008-04-22 Thread milton ruser
Dear All, I have a set of environental maps and presence-only points for some species. How can I generate distributions models on R using these presence-only data? What packages and functions can I use to do so? Kind regards, Miltinho Brazil [[alternative HTML version deleted]] ___

Re: [R] UTF-8 or Unicode on Windows PC

2008-04-22 Thread Hans-Joerg Bibiko
On 21 Apr 2008, at 12:33, Prof Brian Ripley wrote: >> Is it possible to download a compiled snapshot of 2.7.0 for Windows >> XP? > Yes, http://cran.r-project.org/bin/windows/base/rtest.html > And it is due for release tomorrow. I played with 2.7.0 on Windows XP. I can do things which couldn't

[R] Bar Chart help!

2008-04-22 Thread john.hogan
Hi there, Im working with a bar chart. I want to create a bar chart using the followinf file: gender relationship Male Manage Male Manager Male Manager Male Manager Male Clerical Male Manager Male Manager Male Manager Male Manager Im trying to represe

[R] Getting rid of borders on semi-transparent plotting symbols

2008-04-22 Thread Karl Ove Hufthammer
R version 2.7.0 RC (2008-04-20 r45403) When using semi-transparent filled plotting symbols, the border of the symbol has a different (darker) colour than the interior: plot(0, 0, pch=19, col="#FF22") (Saving this as a PDF and looking at it magnified may make it easier to see.) This is prett

Re: [R] cloud plot has white(transparent?) background

2008-04-22 Thread David Winsemius
Karin Lagesen <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > I am using the code example from the R graph gallery to look at a > cloud plot: > > require(lattice) > data(iris) > print(cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris, > groups = Species, screen =

Re: [R] optFederov/AlgDesign - help avail?

2008-04-22 Thread paulandpen
of yeah, and your design needs to account for main effects and interactions if you intend to model them, so make sure to program that into algdesign as well - Original Message - From: "zubin" <[EMAIL PROTECTED]> To: Sent: Monday, April 21, 2008 9:59 PM Subject: [R] optFederov/AlgDesig

Re: [R] how to read in multiple files with unequal number of columns

2008-04-22 Thread Tania Oh
Thanks Ingmar, but when I used merge in : all <- merge(all, tmp), I get an error: Error in rep.int(rep.int(seq_len(nx), rep.int(rep.fac, nx)), orep) : invalid 'times' value is the error because of the way I initialised 'all'? what is the correct way of using merge in this case? thanks ta

Re: [R] optFederov/AlgDesign - help avail?

2008-04-22 Thread paulandpen
I would suggest reading this attachment below. http://support.sas.com/techsup/technote/ts722d.pdf OptFedreov is the go for you, you are correct. I don't know of anybody who has come up with design principles in choice modelling that apply to logit and probit models etc. We all assume that what

Re: [R] R 2.7.0 is released

2008-04-22 Thread Jens Oehlschlägel
Many thanks to the core team for an impressive list of new improvements ... > o strwidth() and strheight() gain 'font' and 'vfont' arguments and accept in-line pars such as 'family' in the same way as text() does. (Longstanding wish of PR#776) ... and for not having forgotten an 8 year old wish!

Re: [R] Multidimensional contingency tables

2008-04-22 Thread hadley wickham
On Tue, Apr 22, 2008 at 8:24 AM, hadley wickham <[EMAIL PROTECTED]> wrote: > On Mon, Apr 21, 2008 at 9:46 PM, Robert A. LaBudde <[EMAIL PROTECTED]> wrote: > > How does one ideally handle and display multidimenstional contingency > > tables in R v. 2.6.2? > > > > E.g.: > > > > > prob1<- da

Re: [R] Research Notes

2008-04-22 Thread Marc Schwartz
> Tom Chr Backer Johnsen wrote: >> I can at best say that this question is related to R. >> >> What has become more and more obvious to me after I started using R >> about two years ago is that I have collected a large number of data >> files, scripts, and workspaces (.Rdata files) in several cat

Re: [R] Research Notes

2008-04-22 Thread Thibaut Jombart
Barry Rowlingson wrote: > I use a thing called 'Plain Text File'... > > Basically I keep a file called 'NOTES.txt' in each project directory I > work in and keep it updated as I work. I keep note of where data comes > from, what I do to it, what various functions do and so on. Then I can > u

Re: [R] Research Notes

2008-04-22 Thread Barry Rowlingson
JRG wrote: > You might consider Treepad Lite (www.treepad.com). It's a tiny, free-form > tree-structured > notebook/database/text editor. It stores stuff as plain text, so you can > easily copy/paste to > other software. It's available for Windows and Linux, and it's free --- > though mor

[R] Vector format importation from R to OpenOffice

2008-04-22 Thread Philippe Grosjean
Hello Agustin, hi all, There was a recent discussion about how to import R graphs in vector format into OpenOffice. For Microsoft Word under Windows, there is no problems: the EMF format (Windows Enhanced Metafile) is completely supported. However, importing the same .emf file into OpenOffice l

Re: [R] Research Notes

2008-04-22 Thread hadley wickham
> I wouldn't dream of using a proprietary tool with a proprietary and > closed format for this kind of thing EVER. If you want something more > sophisticated than my Plain Text File solution then keep a 'NOTES.tex' > file then you can include equations and graphics. Plus it's then trivial > t

Re: [R] Multidimensional contingency tables

2008-04-22 Thread hadley wickham
On Mon, Apr 21, 2008 at 9:46 PM, Robert A. LaBudde <[EMAIL PROTECTED]> wrote: > How does one ideally handle and display multidimenstional contingency > tables in R v. 2.6.2? > > E.g.: > > > prob1<- data.frame(victim=c(rep('white',4),rep('black',4)), > + perp=c(rep('white',2),rep('black',2),r

Re: [R] Research Notes

2008-04-22 Thread JRG
> Tom Chr Backer Johnsen wrote: > > I can at best say that this question is related to R. > > > > What has become more and more obvious to me after I started using R > > about two years ago is that I have collected a large number of data > > files, scripts, and workspaces (.Rdata files) in sever

Re: [R] Documentation General Comments

2008-04-22 Thread Beck, Kenneth (STP)
Good comments, I agree that better cross referencing would help immensely. I would like to contribute in some way, but not sure how to start. I can always send $$ but that seems too simple. -Original Message- From: Duncan Murdoch [mailto:[EMAIL PROTECTED] Sent: Monday, April 21, 2008 5:4

Re: [R] Research Notes

2008-04-22 Thread Richard . Cotton
> What has become more and more obvious to me after I started using R > about two years ago is that I have collected a large number of data > files, scripts, and workspaces (.Rdata files) in several catalogs on my > computer. It is also obvious that my memory is not up to the task of > keeping

Re: [R] Documentation General Comments

2008-04-22 Thread Beck, Kenneth (STP)
This looks really good, thanks. -Original Message- From: Robert Baer [mailto:[EMAIL PROTECTED] Sent: Monday, April 21, 2008 6:53 PM To: esmail bonakdarian; Beck, Kenneth (STP); r-help@r-project.org Subject: Re: [R] Documentation General Comments >> I realize the R developers are probabl

Re: [R] Research Notes

2008-04-22 Thread Barry Rowlingson
Tom Chr Backer Johnsen wrote: > I can at best say that this question is related to R. > > What has become more and more obvious to me after I started using R > about two years ago is that I have collected a large number of data > files, scripts, and workspaces (.Rdata files) in several catalogs

Re: [R] how to read in multiple files with unequal number of columns

2008-04-22 Thread Ingmar Visser
you may be looking for ?merge hth, Ingmar On 22 Apr 2008, at 15:05, Tania Oh wrote: > Dear all, > > I want to read in 1000 files which contain varying number of columns. > For example: > > file[1] contains 8 columns (mixture of characters and numbers) > file[2] contains 16 columns etc > > I'm rea

Re: [R] Documentation General Comments

2008-04-22 Thread Beck, Kenneth (STP)
Well, I don't think I will live for the rest of my days in a pub, but thanks to all so far for comments. I actually am willing to help, though not sure in what capacity. -Original Message- From: Rolf Turner [mailto:[EMAIL PROTECTED] Sent: Monday, April 21, 2008 7:03 PM To: r-help Cc: Bec

[R] how to read in multiple files with unequal number of columns

2008-04-22 Thread Tania Oh
Dear all, I want to read in 1000 files which contain varying number of columns. For example: file[1] contains 8 columns (mixture of characters and numbers) file[2] contains 16 columns etc I'm reading everything into one big data frame and when I try rbind, R returns an error of "Error in rbind

Re: [R] Trend test for survival data

2008-04-22 Thread Terry Therneau
> Hello, > is there a R package that provides a log rank trend test > for survival data in >=3 treatment groups? > Or are there any comparable trend tests for survival data in R? The log-rank test is equivalent to a Cox model with a factor variable as the predictor. To do a trend test, simply

[R] Research Notes

2008-04-22 Thread Tom Chr Backer Johnsen
I can at best say that this question is related to R. What has become more and more obvious to me after I started using R about two years ago is that I have collected a large number of data files, scripts, and workspaces (.Rdata files) in several catalogs on my computer. It is also obvious tha

[R] cloud plot has white(transparent?) background

2008-04-22 Thread Karin Lagesen
I am using the code example from the R graph gallery to look at a cloud plot: require(lattice) data(iris) print(cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris, groups = Species, screen = list(z = 20, x = -70), perspective = FALSE, key = list(

Re: [R] spline

2008-04-22 Thread Henrique Dallazuanna
Try: set.seed(2315468168) library(mgcv) attach(SG2) modele3 <- gam(J15STATUS~SWANG1+s(AGE)+ s (SP2),data=SG2,family=binomial) > > On Tue, Apr 22, 2008 at 8:18 AM, kende jan <[EMAIL PROTECTED]> wrote: > dear all, > I have a problem about "spline", when I send this: > library(mgcv) > attach(SG2)

[R] spline

2008-04-22 Thread kende jan
dear all, I have a problem about "spline", when I send this: library(mgcv) attach(SG2) modele3 <- gam(J15STATUS~SWANG1+s(AGE)+ s  (SP2),data=SG2,family=binomial) it doesen't work et it says: Erreur dans get(".Random.seed",envir=.GlobalEnv) variable".Random.seed" introuvable Thanks a lot

Re: [R] jpeg legend space issues

2008-04-22 Thread Jim Lemon
Georg Ehret wrote: > Dear R community, I am printing a jpeg file (using plot) and my y-axis > label becomes partly cut (at the left) by a very close margin of document. > See example: http://www.igm.jhmi.edu/~gehret/progr_collect_data/beta.jpg > Can you please help me fix this? I tried "din" an

Re: [R] removing zero rows from matrix/table

2008-04-22 Thread Dimitris Rizopoulos
try this: mat <- sample(0:1, 49, TRUE) dim(mat) <- c(7, 7) mat[c(1,4), ] <- 0 ind <- rowSums(mat == 0) != ncol(mat) mat[ind, ] I hope it helps. Best, Dimitris Dimitris Rizopoulos Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuv

Re: [R] "spreadsheet" in plot

2008-04-22 Thread Jim Lemon
Stephan Ripke wrote: > Hello, > how can I print a table (lets say my table xtable contains 3 rows and 3 > Columns, the fileds consists of text) directly in a plot? when I use > mtext(xtable), he tries to write everything on the same place. Hi Stephan, I think the addtable2plot function in the plot

Re: [R] optimization and gradient

2008-04-22 Thread Prof Brian Ripley
You can cache the results for reuse in the gradient call (most easily by sharing an environment between them). I don't think nlmin exists in R (nlm does), but doing it that way wastes gradient computations where they would not be used. Your usage may be exceptional, but for most usages the gra

[R] Downweighting of cases in GLM

2008-04-22 Thread Eva77
Dear all, I want to model presence/absence data of tree occurrence using a number of predictor variables. Absences of some sample points are probably wrongly specified (they should be presences) due to land use which can not be incorporated as a predictor because of some sort of arbitrariness. So

Re: [R] bar-chart help

2008-04-22 Thread Richard . Cotton
> I have a table like below outside R environment > > Varible_Name > Labels > Bad_Percent > Good_Percent > Var1_Postal_Code_Availibility > 1 > 0,149367931 > 0,850632069 > > 0 > 0,19709687 > 0,80290313 > > Variable_Name column contains a single entry, the variable name, this is >

Re: [R] Trend test for survival data

2008-04-22 Thread Heinz Tuechler
Dear Markus! Since I did not see an answer yet, my suggestion is to use coxph with the groups variable numerically coded as the only independent variable. Heinz At 13:39 21.04.2008, Markus Kreuz wrote: >Hello, >is there a R package that provides a log rank trend test >for survival data in >=3 t

Re: [R] rbugs on linux and wine

2008-04-22 Thread Uwe Ligges
Gregor Gorjanc wrote: > Hi Alexander! > > You are mixing WinBUGS and OpenBUGS. R package Rbugs works with OpenBUGS, but > the later does not work with Rbugs under Linux! Are you talking about rbugs or BRugs, Gregor? Uwe > > Gregor > > __ > R-help@

Re: [R] rbugs on linux and wine

2008-04-22 Thread Gorjanc Gregor
> Gregor Gorjanc wrote: >> Hi Alexander! >> >> You are mixing WinBUGS and OpenBUGS. R package Rbugs works with OpenBUGS, but >> the later does not work with Rbugs under Linux! > > Are you talking about rbugs or BRugs, Gregor? Ouch. Thank you Uwe! You are right, there are two R packages: rbugs and

Re: [R] optimization and gradient

2008-04-22 Thread Gabor Grothendieck
Check out: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/83547.html On Tue, Apr 22, 2008 at 5:50 AM, Ardia David <[EMAIL PROTECTED]> wrote: > Dear all, > I am using the functions 'optim' and 'nlminb'. For both, you can provide > a function which computes the gradient of the objective function (

Re: [R] removing zero rows from matrix/table

2008-04-22 Thread Gabor Csardi
See ?apply M2 <- M[ apply(M!=0, 1, any), , drop=FALSE] Gabor On Tue, Apr 22, 2008 at 11:52:08AM +0200, Patrick Zimmermann wrote: > Dear R-community, > I have matrices/tables of different sizes which may contain rows with > only zeros. Now I would like to delete these zero lines or create new > m

[R] removing zero rows from matrix/table

2008-04-22 Thread Patrick Zimmermann
Dear R-community, I have matrices/tables of different sizes which may contain rows with only zeros. Now I would like to delete these zero lines or create new matrices composed only of the non-zero lines. Columns only containing zeros I want to preserve. Here an example: [,1] [,2] [,3] [,4] [,5] [,

[R] optimization and gradient

2008-04-22 Thread Ardia David
Dear all, I am using the functions 'optim' and 'nlminb'. For both, you can provide a function which computes the gradient of the objective function (to enhance speed and precision). In my case, both the objective function and the gradient take time to be computed and share many common computati

[R] bar-chart help

2008-04-22 Thread Emre Unal
Hi, I have a table like below outside R environment Varible_Name Labels Bad_Percent Good_Percent Var1_Postal_Code_Availibility 1 0,149367931 0,850632069 0 0,19709687 0,80290313 Variable_Name column contains a single entry, the variable name, this is the title of the graphic I w

  1   2   >