Re: [R] histogram-like plot - multiple bars side by side *solved*

2008-09-29 Thread Jörg Groß
Thanks! That helped a lot. Am 29.09.2008 um 22:13 schrieb Greg Snow: Do you mean something like this: x <- 0:14 y1 <- dbinom(x,14,0.7) y2 <- dbinom(x,14,0.5) y3 <- dbinom(x,14,0.3) barplot( rbind(y1,y2,y3), names=x, beside=TRUE) Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical

Re: [R] R-2.7.2 infected?

2008-09-29 Thread Dave DeBarr
For what it's worth, Computer Associates updated their signatures; and eTrust no longer reports the installation program for the Windows version of R-2.7.2 as infected. I found it surprisingly difficult to learn about how the Win32/Adclicker.JO virus operates, and how eTrust detects it. I coul

Re: [R] Bug in "is" ?

2008-09-29 Thread Michael Grant
Tie a rock to the 7 and tie another rock of equal mass to the 7.0. Throw them both into opposite ends of a large pond on the first Tuesday after after a new moon. If the former number floats it is not the integer 10. If the latter floats it likely is not the larger integer 13. This is because o

Re: [R] example - export a data frame to an XML file

2008-09-29 Thread Paul Murrell
Hi Is this what you are after ... ? data <- read.csv(textConnection('"date","UYG.Open","UYG.High","UYG.Low","UYG.Close","UYG.Volume","UYG.Adjusted" "2007-02-01",71.32,71.34,71.32,71.34,200,69.23 "2007-02-02",72.2,72.2,72.2,72.2,200,70.06 "2007-02-05",71.76,71.76,71.76,71.76,5100,69.63 "2007-02-0

Re: [R] FW: logistic regression

2008-09-29 Thread Frank E Harrell Jr
Greg Snow wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] project.org] On Behalf Of Frank E Harrell Jr Sent: Saturday, September 27, 2008 7:15 PM To: Darin Brooks Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [R] FW: logistic regressi

[R] SET_VECTOR_ELT() and mkChar()

2008-09-29 Thread snoweye
Dear R's friends, I have a C code with a lot of SEXP objects and I want to return them as a list. Does any function I can use in SET_VECTOR_ELT() as mkChar() in SET_STRING_ELT()? For example, this is my code, SEXP my_code(){ int i; SEXP a1, a2, a3, res, res_names; char *names[3] = {"a1", "a

[R] Logistic Regression using optim() give "L-BFGS-B" error, please help

2008-09-29 Thread ashky
Sorry, I deleted my old post. Pasting the new query below. Dear R Users/Experts, I am using a function called logitreg() originally described in MASS (the book 4th Ed.) by Venebles & Ripley, p445. I used the code as provided but made couple of changes to run a 'constrained' logistic regression,

Re: [R] count data with a specific range

2008-09-29 Thread jim holtman
> data<-c(2,6,13,26,19,25,18,11,22,25) > table(cut(data, breaks=c(0,10,20,30))) (0,10] (10,20] (20,30] 2 4 4 On Mon, Sep 29, 2008 at 5:41 PM, sandsky <[EMAIL PROTECTED]> wrote: > > Hi there, > > The data is > > data<-c(2,6,13,26,19,25,18,11,22,25) > > I want to count data for

Re: [R] box-whisker plot from pre-summarized data?

2008-09-29 Thread hadley wickham
On Mon, Sep 29, 2008 at 4:27 PM, Avram Aelony <[EMAIL PROTECTED]> wrote: > Hello, > > Although my summary descriptives are generated outside of R (dataset is > huge), I would like to produce a box-whisker plot using bxp or perhaps a > function from the ggplot2 library using the precomputed summarie

[R] Simple question about extracting a subset of data

2008-09-29 Thread Josh B
Hello all, I have a (hopefully) simple question. If I have a data table (named "x") such as this: daylengthleavesflowering.datefruits LD1.90055581.64353250.76668986 LD-0.9399410-1.2592968-0.60141837 LD1.0222946-0.9697459 -0.60141837 SD-0.2668132-0.9697459-0.47363322 SD -1.5892393-0.70540660.6646

Re: [R] count data with a specific range

2008-09-29 Thread Peter Alspach
Kia ora ?hist in particular the breaks argument and set plot=FALSE. HTH ... Peter Alspach > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of sandsky > Sent: Tuesday, 30 September 2008 10:42 a.m. > To: r-help@r-project.org > Subject: [R] count dat

Re: [R] Double integration - Gauss Quadrature

2008-09-29 Thread Earl F. Glynn
"Susanne Pfeifer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I would like to solve a double integral of the form > > \int_0^1 \int_0^1 x*y dx dy > > using Gauss Quadrature. OK, I felt guilty for using a for loop, so here's something that should be close to what you wan

Re: [R] Hazard plot

2008-09-29 Thread Dieter Menne
Laura Bonnett googlemail.com> writes: > I am looking at a continuous variable, age. I am looking at time to > 12-month remission and can calculate the HR and 95% confidence interval are > follows: > coxfita = coxph(Surv(rem.Remtime,rem.Rcens)~nearma$all.age,data=nearma) > exp(coxfita$coefficient

Re: [R] adding labels to tapply results

2008-09-29 Thread Dieter Menne
eric lee gmail.com> writes: > How do I get labels onto the output from tapply? I need the labels to merge > the output with another data frame. Thanks. > > eric > > d <- data.frame(cbind(x=1:3, y=1:10)) > a <- with(d, tapply(y, x, sum)) > By taking the warning seriously. > d <- data.frame

Re: [R] Double integration - Gauss Quadrature

2008-09-29 Thread Earl F. Glynn
"Susanne Pfeifer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I would like to solve a double integral of the form . . . > but I would like to use Gauss Quadrature to do it. > I have written the following code (using R's statmod package) which > works fine for one integral

[R] count data with a specific range

2008-09-29 Thread sandsky
Hi there, The data is data<-c(2,6,13,26,19,25,18,11,22,25) I want to count data for these rages: [0~10]: [11~20]: [21-30]: Is anyone can help me? Thank you in advance -- View this message in context: http://www.nabble.com/count-data-with-a-specific-range-tp19732290p19732290.html Sent from

Re: [R] quantile

2008-09-29 Thread Ted Harding
On 29-Sep-08 20:09:14, liujb wrote: > Hello, > I need to assign a number to each x[i], i=1:100, based on the > value of x[i] and where they are in the distribution of x[i]. > For example 1 for x[4] means x[4] is below 25%. I can obtain > the quantile using quantile command, and just loop through th

[R] box-whisker plot from pre-summarized data?

2008-09-29 Thread Avram Aelony
Hello, Although my summary descriptives are generated outside of R (dataset is huge), I would like to produce a box-whisker plot using bxp or perhaps a function from the ggplot2 library using the precomputed summaries. My dataset currently contains 10 rows (one row per week) with the fo

Re: [R] quantile

2008-09-29 Thread jim holtman
?quantile ?cut > x <- runif(10) > y <- quantile(x, prob=seq(0,1,.25)) > y 0%25%50%75% 100% 0.06178627 0.29216247 0.60098370 0.83899171 0.94467527 > cut(x, breaks=y, include.lowest=TRUE) [1] [0.0618,0.292] (0.292,0.601] (0.292,0.601] (0.839,0.945] [0.0618,0.

Re: [R] replicating dataframe rows

2008-09-29 Thread David Huffer
On Monday, September 29, 2008 1:59, Dimitris Rizopoulos wrote: > On Monday, September 29, 2008 1:26, milton ruser wrote: > > ...I have a data.frame like... > >place<-c("place1", "place2", "place3", "place4", "place5") > >population<-c(100,200,300,50,30) > >my.df<-data.frame(cbi

[R] quantile

2008-09-29 Thread liujb
Hello, I need to assign a number to each x[i], i=1:100, based on the value of x[i] and where they are in the distribution of x[i]. For example 1 for x[4] means x[4] is below 25%. I can obtain the quantile using quantile command, and just loop through the 1:100 and assign the correct number. But I

Re: [R] persistence of model in R to a file

2008-09-29 Thread Sharma, Dhruv
Thanks. I will replicate the error and post an example. Dhruv -Original Message- From: Greg Snow [mailto:[EMAIL PROTECTED] Sent: Monday, September 29, 2008 4:02 PM To: Sharma, Dhruv; r-help@r-project.org Subject: RE: persistence of model in R to a file See ?save for one way to save m

Re: [R] histogram-like plot - multiple bars side by side

2008-09-29 Thread Greg Snow
Do you mean something like this: x <- 0:14 y1 <- dbinom(x,14,0.7) y2 <- dbinom(x,14,0.5) y3 <- dbinom(x,14,0.3) barplot( rbind(y1,y2,y3), names=x, beside=TRUE) Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] 801.408.8111 > --

[R] x axis label overlap

2008-09-29 Thread CLERC Thomas
Hello, On the figure produced by this code: ## # données Bacher 2001 y .bacher = c (69,18,13,12,5,4,3,3,13,9,7,6,4,2,69,19,12,40,5,2,2,2,51,18,8,31,9,3,2,2 ) x.bacher=c(seq(1:6),8,9,seq(9,13), 15,15,16,17,17,18,19,20,22,22,23,25,25,26,27,28,30) # graphe #quartz(width=2.12,height=2.

[R] histogram-like plot - multiple bars side by side

2008-09-29 Thread Jörg Groß
Hi, I found this example for producing multiple histograms; require(plotrix) l <- list(rnorm(50),rnorm(50,sd=2),rnorm(50,mean=3)) multhist(l) Now I want something like that, for creating multiple density distributions (in one plot). But I have two variables for one density distribution

Re: [R] persistence of model in R to a file

2008-09-29 Thread Greg Snow
See ?save for one way to save models for later re-reading. I don't fully understand your next question, many of the modeling functions have options for saving the data (see ?lm), but can you give an example for your A, B, and C example? Then we will have a better chance of telling you what is h

Re: [R] Integrating functions in R

2008-09-29 Thread Jorge Ivan Velez
Dear Kim, Yes. Take a look at the Ryacas vignette { http://cran.r-project.org/web/packages/Ryacas/vignettes/Ryacas.pdf}, section 5.7. HTH, Jorge On Mon, Sep 29, 2008 at 3:52 PM, <[EMAIL PROTECTED]> wrote: > I want to integrate the function (sin^7*x)*(cos^8*x)dx. I do not have > values to in

Re: [R] Simple question about extracting a subset of data

2008-09-29 Thread rmailbox
It's hard to read your table, but I think this could be your problem: daylength = "long.day" is always TRUE Testing for equality uses "==" so daylength == "long.day" may or may not always be TRUE - Original message - From: "Josh B" <[EMAIL PROTECTED]> To: "R Help" Date: Mon, 29 Sep 20

[R] Integrating functions in R

2008-09-29 Thread kvest
I want to integrate the function (sin^7*x)*(cos^8*x)dx. I do not have values to integrate between. I just want R to give me the integral of the function. For example R takes the derivative of the function by d1=D(expression(x^2*(cosh*(x^3))), "x"). Is there a similar function available in R to

[R] persistence of model in R to a file

2008-09-29 Thread Sharma, Dhruv
Hi, Is there a way to save R models (glm, lm , rpart etc) in a file that be read in later? I noticed models take up space. by space them off and removing them from memory it seems that would be useful. Also why do the models keep a copy of all columns in the original data set even

Re: [R] How to remove columns of table in R recursively

2008-09-29 Thread Patrick Connolly
On Tue, 30-Sep-2008 at 12:37AM +1000, Jason Lee wrote: |> Hi R-list, |> |> I would like to know how to perform any elimination of attribute (column) in |> R. |> |> E.g I have:- |> |> 20,21,22,23,24,25,normal |> 1,2,3,4,5,5,normal |> 0,1,0,2,3,4,abnormal |> ... |> |> I intend to do a checking

[R] Testing this significance of a factor in a mixed-model "ANCOVA"

2008-09-29 Thread Jesse Young
R-users - I must preface this question by saying that I'm a relative newbie to both R and mixed-modeling. I'm using lme fit an ANCOVA-like model. My data consist of bone length measurements for a developmental series of two capuchin monkey species. I'm interested in whether the rate of bo

[R] Sweave and UTF8/Win XP

2008-09-29 Thread Jacques Ropers
Hi, I would like to feed Sweave with an UTF8 encoded file, and obtain an UTF8 TeX file (so that I can use XeTeX and its font handling facilities). I'm under Win XP. I guess this is a matter of locale config but I can't find the proper way. Thanks Jacques _

[R] Testing this significance of a factor in a mixed-model "ANCOVA"

2008-09-29 Thread Jesse Young
R-users - I must preface this question by saying that I'm a relative newbie to both R and mixed-modeling. I'm using lme fit an ANCOVA-like model. My data consist of bone length measurements for a developmental series of two capuchin monkey species. I'm interested in whether the rate of bo

Re: [R] ggplot 2 - editing in the "panel_1_1" viewport

2008-09-29 Thread rmailbox
Not an answer, but, I hope, more of an almost-the-same question... I want to divide up the text grobs for the key labels into two different (text) grobs (each) and put them back into the space occupied by the original text grob. I've worked with grobs enough to think this should be easy, but I

[R] snowfall and lam4-dev

2008-09-29 Thread Erin Hodgess
Dear R People: I was looking at the vignette for the snowfall package and it references lam4-dev. There is a command for Debian Linux, but not other flavors of Linus. Does anyone know the right command for SUSE10.1, please/ thanks, Erin -- Erin Hodgess Associate Professor Department of Compu

Re: [R] replicating dataframe rows

2008-09-29 Thread Dimitris Rizopoulos
try this: place <- c("place1", "place2", "place3", "place4", "place5") population <- c(100, 200, 300, 50, 30) my.df <- data.frame(place, population) my.df[rep(row.names(my.df), my.df$population), ] I hope it helps. Best, Dimitris milton ruser wrote: Dear all, I have a data.frame like the

Re: [R] replicating dataframe rows

2008-09-29 Thread Henrique Dallazuanna
Try this: my.df <- data.frame(Place = rep(place, population), Population = rep(population, population)) On Mon, Sep 29, 2008 at 2:26 PM, milton ruser <[EMAIL PROTECTED]> wrote: > Dear all, > > I have a data.frame like the sample below, and I would > like to expand my data.frame using "population"

[R] confident interval on Coxme analysis

2008-09-29 Thread Jue!
Hi everyone I perform analyses using coxme function of Kinship packages. Currently, I obtain the following output Cox mixed-effects model fit by maximum likelihood Data: seal n= 26565 Iterations= 6 73 NULL Integrated Penalized Log-likelihood -244068.0 -

Re: [R] adding labels to tapply results

2008-09-29 Thread Greg Snow
Try using aggregate instead of tapply. If that does not answer your question, then try restating it or showing what your desired output would look like (see the posting guide referenced at the bottom of every post). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcar

Re: [R] histogram-like plot with two variables

2008-09-29 Thread Greg Snow
An added note, if you use this approach, then you should probably set the lend parameter as well (becomes more important with wider lines). See ?par and scroll down to lend for options/details. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] 80

[R] replicating dataframe rows

2008-09-29 Thread milton ruser
Dear all, I have a data.frame like the sample below, and I would like to expand my data.frame using "population" variable. So, for each line of my data.frame I would like that the new data.frame have many rows as the population collumn. place<-c("place1", "place2", "place3", "place4", "place5") p

Re: [R] turning comma separated string from multiple choices into flags

2008-09-29 Thread Henrique Dallazuanna
Try this: table(rep(x$age, unlist(lapply(strsplit(x$favorite_magazine, ","), length))), unlist(strsplit(x$favorite_magazine, ","))) On Mon, Sep 29, 2008 at 11:45 AM, June Kim <[EMAIL PROTECTED]> wrote: > Hello, > > I use google docs' Forms to conduct surveys online. Multiple choices > que

Re: [R] FW: logistic regression

2008-09-29 Thread Greg Snow
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > project.org] On Behalf Of Frank E Harrell Jr > Sent: Saturday, September 27, 2008 7:15 PM > To: Darin Brooks > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: Re: [R] FW: logistic regression

Re: [R] multiple page pdf file using pdf()

2008-09-29 Thread Kyle Matoba
Peter, Ah, I was under the impression that I had to 'dev.off()' after every plot. Naturally I had wondered about that strange argument that did not seem to do anything... Problem solved, thanks everyone. Many thanks, Kyle On Mon, Sep 29, 2008 at 9:43 AM, Peter Dalgaard <[EMAIL PROTECTED]>wrote

Re: [R] efficient code - yet another question

2008-09-29 Thread Kevin Wright
You should also have a look at the pcaMethods package (on Bioconductor). I did some code optimization for the NIPALS algorithm in that package which sped up the algorithm by at least a factor of two. Kevin Wright On Wed, Apr 30, 2008 at 10:56 PM, steven wilson <[EMAIL PROTECTED]> wrote: > Dear

Re: [R] superimpose histogram on biplot

2008-09-29 Thread Kevin Wright
I know that this is a late follow-up, but I just found this posting today while searching for something else. Two of my colleagues and myself have explored the use of Mosaic plots for displaying the amount of variation captured by each axis. See the following paper: @Article{Laffont2007, autho

Re: [R] multiple page pdf file using pdf()

2008-09-29 Thread Peter Dalgaard
Kyle Matoba wrote: > List, > > I am currently producing a series of charts using multiple calls to pdf() > but, rather than having 'n' single plot files, would like them all to go > into one 'n'-page pdf file. Would someone be so kind as to explain how, if > at all, I might go about doing this from

Re: [R] Trend graph

2008-09-29 Thread Greg Snow
Try this: pre <- c(1,2,3,4,5) post <- c(2,5,7,2,3) plot( 1:2, range(pre,post), type='n', xlab='', ylab='CRP (mg/dl)', xaxt='n') segments(1,pre,2,post) axis(1, at=1:2, labels=c('Pre','Post')) ### or one way to label the lines par(mar=c(5,4,4,4)+0.1) plot( 1:2, range(pre,post), type='n', xlab=''

[R] multiple page pdf file using pdf()

2008-09-29 Thread Kyle Matoba
List, I am currently producing a series of charts using multiple calls to pdf() but, rather than having 'n' single plot files, would like them all to go into one 'n'-page pdf file. Would someone be so kind as to explain how, if at all, I might go about doing this from within R? I have only ever pr

Re: [R] adjusting textsize and spacing in mosaic (vcd package)

2008-09-29 Thread Richard . Cotton
> I'm trying to find a way to change the font size in a mosaic plot (the > grid version, not the base graphics one). > > Here's an example to demonstrate: > #Basic plot > library(vcd) > mosaic(HairEyeColor, shade = TRUE) > > #Bad first guess: this stops the default cell colouring, and doesn't >

[R] Sending Notes email out of R under windows

2008-09-29 Thread popsmelove
Hi, I'm trying to send a mail out of R with my lotus Notes mailing box. I've find the object "Notes.NotesSession", but when I use comGetObjectInfo to know wich method I can Use there is nothing (on ly return NULL) Then I don't know how to send an E-mail with R script. Have you an idea ? Th

[R] ggplot 2 - editing in the "panel_1_1" viewport

2008-09-29 Thread Pedro Barros
Hi All, I am trying to find out how to access the components of a ggplot plot, and I found this reply from Paul Murrel http://www.nabble.com/navigating-ggplot-viewports-tt14826352.html#a15056223. I tried it, and it works. However, I am trying to develop some functions that will do the drawing "au

Re: [R] turning comma separated string from multiple choices into flags

2008-09-29 Thread Peter Dalgaard
June Kim wrote: > Thank you. The misspelling of Harvard wasn't intended. The data are > spelled consistently. > OK. One other potential problem: If the strings are substrings of eachother (as in "Science" and "Statistical Science") then you may need more care. And I misremembered: It is probabl

[R] Acceptance rate in metrop

2008-09-29 Thread Xia Wang
Hi I am using metrop in MCMC library.  Since some times the prior density is 0 and the log prior density would be –Inf, I ask the return value for loglikelihood equal to Min.log, which is defined as log(.Machine$double.xmin)-400, whenever a –Inf occurs to the logdensity.  However, I noticed if

Re: [R] turning comma separated string from multiple choices into flags

2008-09-29 Thread June Kim
Thank you. The misspelling of Harvard wasn't intended. The data are spelled consistently. 2008/9/30 Peter Dalgaard <[EMAIL PROTECTED]>: > June Kim wrote: >> Hello, >> >> I use google docs' Forms to conduct surveys online. Multiple choices >> questions are coded as comma separated values. >> >> For

Re: [R] density estimate

2008-09-29 Thread Eik Vettorazzi
The calculation of the Kullback Leibler measure depends on the scale of your probability function. If it is discrete, the formula with "sum" term applies. In the continuous case "sum" is replaced by "intgrate". you may have a look at http://finzi.psych.upenn.edu/R/library/flexmix/html/KLdiv.html

Re: [R] ariable Importance Measure in Package RandomForest

2008-09-29 Thread Liaw, Andy
The randomForest package is based on Breiman & Cutler's original code, which grows trees using the CART algorithm. The Gini criterion for splitting nodes is hard-coded in the Fortran. If you want info gain as measure of variable importance, you should be growing trees using that as the splitting

Re: [R] turning comma separated string from multiple choices into flags

2008-09-29 Thread Peter Dalgaard
June Kim wrote: > Hello, > > I use google docs' Forms to conduct surveys online. Multiple choices > questions are coded as comma separated values. > > For example, > > if the question is like: > > 1. What magazines do you currently subscribe to? (you can choose > multiple choices) > 1) Fast Company

[R] Script for dose proportionality assessment using power model and confidence interval criteria

2008-09-29 Thread Jean-Louis Abitbol
Dear R-Helpers Has anyone written a script for the dose proportionality assessement using the power model and the confidence interval criteria as described in - Gough at al. Assessment of dose proportionality: report from the statisticians in the pharmaceutical industry in Drug Information Journa

[R] turning comma separated string from multiple choices into flags

2008-09-29 Thread June Kim
Hello, I use google docs' Forms to conduct surveys online. Multiple choices questions are coded as comma separated values. For example, if the question is like: 1. What magazines do you currently subscribe to? (you can choose multiple choices) 1) Fast Company 2) Havard Business Review 3) Busine

[R] How to remove columns of table in R recursively

2008-09-29 Thread Jason Lee
Hi R-list, I would like to know how to perform any elimination of attribute (column) in R. E.g I have:- 20,21,22,23,24,25,normal 1,2,3,4,5,5,normal 0,1,0,2,3,4,abnormal ... I intend to do a checking on each column:- If the column sum of abnormal is 0 but the column sum of normal is nonzero, i

Re: [R] Cross-tabulation Question

2008-09-29 Thread Gabor Grothendieck
Try this: > with(unique(x), table(V2, V3)) V3 V2Apple Cake One 21 On Mon, Sep 29, 2008 at 4:54 AM, Shubha Vishwanath Karanth <[EMAIL PROTECTED]> wrote: > Hi R, > > > > This is a cross tabulation question. Suppose that, > > > >> d=read.table("clipboard",header=F) > > > >> d > >

Re: [R] Problem with R on dual core under Linux - can not execute mpi.spawn.Rslaves()

2008-09-29 Thread Rainer M Krug
I looked at snow and makeSOCKcluster(c("localhost", "localhost")) and it perfectly suits my needs. In addition, I want to work on a "real cluster" which uses MPI, so these two will not interfere. I plan to use snowSOCKcluster(...) then for the usage of the cores, and MPI (on the level of the whole

Re: [R] Bug in "is" ?

2008-09-29 Thread Lucke, Joseph F
Stefan You are right. Briefly put, the existence of 7 requires only Peano's axiom for successive integers. Strictly speaking, 7 is not an integer but a natural number. But natural numbers can be embedded in the integers which can be embedded in the rationals which can be embedded the reals which

Re: [R] does there any function like sumif in excel?

2008-09-29 Thread John Kane
There are several ways to subset the dataframe ?select will give you one. or mydata[mydata$A=value]<- mydata then apply sum() I do not think there is one single command equivalent to sumif() --- On Sun, 9/28/08, caocheng曹成 <[EMAIL PROTECTED]> wrote: > From: caocheng曹成 <[EMAIL PROTECTED]> >

Re: [R] Cross-tabulation Question

2008-09-29 Thread John Kane
?aggregate or have a look at the reshape package. --- On Mon, 9/29/08, Shubha Vishwanath Karanth <[EMAIL PROTECTED]> wrote: > From: Shubha Vishwanath Karanth <[EMAIL PROTECTED]> > Subject: [R] Cross-tabulation Question > To: [EMAIL PROTECTED] > Received: Monday, September 29, 2008, 4:54 AM > Hi

[R] nomogram function (design library)

2008-09-29 Thread Gondrie, M.
Dear colleagues, I hope someone can help me with my problem. I have fitted a cox model with the following syntax: # cox01def <-cph(Surv(TEVENT,EVENT) ~ ifelse(AGE>50, (AGE-50)^2,0) + BMI + # HDL+DIABETES +HISTCAR2 + log(CREAT)+ as.factor(ALBUMIN)+STENOSIS+IMT,data # = XC, x=T, y=T, surv=T) *

Re: [R] Problem with R on dual core under Linux - can not execute mpi.spawn.Rslaves()

2008-09-29 Thread Rainer M Krug
On Mon, Sep 29, 2008 at 3:05 PM, Luke Tierney <[EMAIL PROTECTED]> wrote: > Look at the configure output below: configure is finding mpi.h in > /usr/lib/mpich/include, soit is using mpich, not lam. You may be able > to tell Rmpi specifically where to look for LAM stuff or you may need > to uninstal

Re: [R] Located Latent Class Analysis (Uebersax)

2008-09-29 Thread Robert A LaBudde
Ubersax includes an ".exe" file in his zip package. This should solve your problem, if you use Windows. If you use linux, you should be able to easily find a free FORTRAN compiler. At 07:24 AM 9/29/2008, Karen Chan wrote: Dear list members I am new to the list and would be much appreciated if

Re: [R] Problem with R on dual core under Linux - can not execute mpi.spawn.Rslaves()

2008-09-29 Thread Luke Tierney
Look at the configure output below: configure is finding mpi.h in /usr/lib/mpich/include, soit is using mpich, not lam. You may be able to tell Rmpi specifically where to look for LAM stuff or you may need to uninstall mpich (almost surely that can be avoided but it may be easier if you don't rea

Re: [R] Running mean for spatial data

2008-09-29 Thread Roger Bivand
Isaac Tetteh yahoo.com> writes: > > Dear All, > Please can anyone help me with codes for performing running mean for > my 3-D/4-D gridded (Spatial ) data sets( x,y,t, and x,y,z, t, > respectively). Have you reviewed the Spatial Task View on CRAN, and considered posting on the R-sig-geo list?

Re: [R] Problem with R on dual core under Linux - can not execute mpi.spawn.Rslaves()

2008-09-29 Thread Rainer M Krug
On Mon, Sep 29, 2008 at 12:19 AM, Martin Morgan <[EMAIL PROTECTED]> wrote: > "Rainer M Krug" <[EMAIL PROTECTED]> writes: > >> Hi >> >> I am trying to utilize my dual core processor (and later a >> High-performance clusters (HPC) ) by using the Rmpi, snow, snowfall, >> ... packages, but I am struggl

[R] adding labels to tapply results

2008-09-29 Thread eric lee
Hi, How do I get labels onto the output from tapply? I need the labels to merge the output with another data frame. Thanks. eric d <- data.frame(cbind(x=1:3, y=1:10)) a <- with(d, tapply(y, x, sum)) [[alternative HTML version deleted]] __ R

Re: [R] Cross-tabulation Question

2008-09-29 Thread jim holtman
> x V1 V2V3 1 A One Apple 2 A One Cake 3 A One Cake 4 B One Apple 5 B One Apple 6 B One Apple > tapply(x$V1, list(x$V2, x$V3), function(z) length(unique(z))) Apple Cake One 21 > On Mon, Sep 29, 2008 at 4:54 AM, Shubha Vishwanath Karanth <[EMAIL PROTECTED]> wrote: > Hi R

Re: [R] GamSetup

2008-09-29 Thread Gavin Simpson
On Mon, 2008-09-29 at 09:57 +0200, Michela Leone wrote: > Hello, > someone knows which function has replaced the GamSetup function in mgcv? > With R 1.6 version we have GamSetup but this function doesn't exist with R > 2.7.2 version Check out the Changelog: 1.0-0 * Function GAMsetup() h

Re: [R] Bug in "is" ?

2008-09-29 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > > you see, there seems to be a confusion of *numbers* and their > *representations*. > but of course the integer 7 is *the same* number as the real number 1.0, > even if we refer to it using two different representations. > the literal '7' might, in some system, cause the

Re: [R] Bug in "is" ?

2008-09-29 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > Peter Dalgaard wrote: > >> Stefan Evert wrote: >> >> >>> ... am I the only one who thinks that the integer 7 is something >>> entirely different from the real number 7.0? (The latter most likely >>> being an equivalence class of sequences of rational number

Re: [R] example - export a data frame to an XML file

2008-09-29 Thread zubin
Duncan, thanks for the note - the schema looks like this - is this what your asking for? 2007-02-01 71.32 71.34 71.32 71.34 200 69.23 2007-02-02 72.2 72.2 72.2 72.2 200 70.06 Duncan Temple Lang wrote: Hi Zubin. The first thing is to send us a link to the schema that the

Re: [R] histogram-like plot with two variables

2008-09-29 Thread Philipp Pagel
On Mon, Sep 29, 2008 at 04:02:05AM +0200, Jörg Groß wrote: > Hi, > > I want to plot a binomial propability distribution. > > I know how to generate the data; > >x <- seq(from=0, to=14, by=1) >y <- dbinom(x, 14, 0.7, log = FALSE) > > I tried: > plot(x,y, type="h") > but the bars are ve

Re: [R] FW: logistic regression

2008-09-29 Thread Frank E Harrell Jr
Gavin Simpson wrote: On Sun, 2008-09-28 at 21:23 -0500, Frank E Harrell Jr wrote: Darin Brooks wrote: I certainly appreciate your comments, Bert. It is abundantly clear that I Darin Brooks Darin, I think the point is that the confidence you can assign to the "best available variables"

Re: [R] density estimate

2008-09-29 Thread Eik Vettorazzi
Hi Lavan, a continuous density is not restricted to be within [0, 1]. Its only bound to have an integral of 1. For example dnorm(0,sd=.1) is a very common density and gives 3.989423. A density function is not a probability function! If you think your data x is discrete than you can assign the c

Re: [R] Bug in "is" ?

2008-09-29 Thread Wacek Kusnierczyk
Peter Dalgaard wrote: > Stefan Evert wrote: > >> >> ... am I the only one who thinks that the integer 7 is something >> entirely different from the real number 7.0? (The latter most likely >> being an equivalence class of sequences of rational numbers, but that >> depends on your axiomatis

[R] Located Latent Class Analysis (Uebersax)

2008-09-29 Thread Karen Chan
Dear list members I am new to the list and would be much appreciated if you could help me. I am very interested in applying Latent Class Model for analysing multiple raters agreement data. I have recently found a paper by Uebersax, J. (1993) which described a method in a form of Located Latent

Re: [R] Dream of a wiki GUI for R

2008-09-29 Thread Philippe Grosjean
Hello, Just to add to what Ajay said: the http://wiki.r-project.org does not execute R code from within wiki pages. This is a choice for security reasons. However, there are ways to get R code from R wiki pages and run it in R: http://wiki.r-project.org/rwiki/doku.php?id=tips:misc:wikicode A

Re: [R] problem running Sweave as a web service with anti-virus software

2008-09-29 Thread Duncan Murdoch
On 29/09/2008 2:01 AM, [EMAIL PROTECTED] wrote: Hello R mailing list We are trying to use R and Sweave, running as a web service on a server to prepare statistical reports but are having problems with our anti-virus software apparently prohibiting execution due to what we think is Sweave trying

Re: [R] histogram-like plot with two variables

2008-09-29 Thread Jim Lemon
Jörg Groß wrote: Hi, I want to plot a binomial propability distribution. I know how to generate the data; x <- seq(from=0, to=14, by=1) y <- dbinom(x, 14, 0.7, log = FALSE) but what I don't know is how to plot this within a histogram like plot. Because the histogram function only accept

Re: [R] histogram-like plot with two variables

2008-09-29 Thread Duncan Murdoch
On 28/09/2008 10:02 PM, Jörg Groß wrote: Hi, I want to plot a binomial propability distribution. I know how to generate the data; x <- seq(from=0, to=14, by=1) y <- dbinom(x, 14, 0.7, log = FALSE) but what I don't know is how to plot this within a histogram like plot. Because the histog

[R] Hazard plot

2008-09-29 Thread Laura Bonnett
Hi All, This sounds a relatively simple query, and I hope it is! I am looking at a continuous variable, age. I am looking at time to 12-month remission and can calculate the HR and 95% confidence interval are follows: coxfita = coxph(Surv(rem.Remtime,rem.Rcens)~nearma$all.age,data=nearma) exp(co

Re: [R] GAMSetup

2008-09-29 Thread Simon Wood
Michela, `gam.setup' is probably the closest to a `GAMsetup' replacement. If you let me know what you need it for, I can probably help locate what you need in more detail (perhaps offline, if it's fairly specialized?) best, Simon On Monday 29 September 2008 10:20, Michela Leone wrote: > In the

Re: [R] Bug in "is" ?

2008-09-29 Thread Peter Dalgaard
Stefan Evert wrote: > Hi everyone! > > Sorry for taking an already overlong discussion thread slightly off- > topic, but ... > > >> quote: >> No doubt, 7.0 is integer in math. But if people can write 7 why >> people need to write 7.0 (I do not see any reason to do this). >> endquote >> >

Re: [R] Dream of a wiki GUI for R

2008-09-29 Thread Dr Eberhard Lisse
That's not the catch, the catch is that there is no editorial "control" (for the lack of a better word) or quality control, which allows every nincompoop to write "authoritative" knols as evidenced on the web site. I am also quite sure that they place and check cookies to increase their knowledge a

Re: [R] Bug in "is" ?

2008-09-29 Thread Stefan Evert
Hi everyone! Sorry for taking an already overlong discussion thread slightly off- topic, but ... > quote: > No doubt, 7.0 is integer in math. But if people can write 7 why > people need to write 7.0 (I do not see any reason to do this). > endquote > What is true in mathematics is not necessar

[R] GAMSetup

2008-09-29 Thread Michela Leone
In the mgcv package the GAMsetup() function has been removed, can you please tell me what the new function is? thanks Michela. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-hel

Re: [R] Dream of a wiki GUI for R

2008-09-29 Thread Ajay ohri
just search for the Google Docs plugin on my website www.decisionstats.com , its either on page 1 or page 2 i just gave the idea , and voila, some one just wrote the code on this list On Mon, Sep 29, 2008 at 2:32 PM, freerow <[EMAIL PROTECTED]> wrote: > Hi ohri: > > Thanks for your introduct

Re: [R] FW: logistic regression

2008-09-29 Thread Gavin Simpson
On Sun, 2008-09-28 at 21:23 -0500, Frank E Harrell Jr wrote: > Darin Brooks wrote: > > I certainly appreciate your comments, Bert. It is abundantly clear that I > > > > Darin Brooks > > Darin, > > I think the point is that the confidence you can assign to the "best > available variables" i

Re: [R] Dream of a wiki GUI for R

2008-09-29 Thread freerow
Hi ohri: Thanks for your introduction of knol. I am testing it now. I can't google out the "Google Docs plugin for sending R output directly to the Docs". Is it something like R(D)COM? My point is to adopt html FORM elements (input boxes, checks,...) into any wiki platform. R-php, R-cgi or others

[R] Cross-tabulation Question

2008-09-29 Thread Shubha Vishwanath Karanth
Hi R, This is a cross tabulation question. Suppose that, > d=read.table("clipboard",header=F) > d V1 V2V3 A One Apple A One Cake A One Cake B One Apple B One Apple B One Apple > table(d$V2,d$V3) Apple Cake One 42 Bu

Re: [R] FW: logistic regression

2008-09-29 Thread Gavin Simpson
On Sun, 2008-09-28 at 19:26 -0600, Darin Brooks wrote: > I certainly appreciate your comments, Bert. It is abundantly clear that I > won't be invited to any of the cocktail parties hosted by the "polite > circles". I am not a statistician. I am merely a geographer (in the field > of ecology) try

[R] GamSetup

2008-09-29 Thread Michela Leone
Hello, someone knows which function has replaced the GamSetup function in mgcv? With R 1.6 version we have GamSetup but this function doesn't exist with R 2.7.2 version [[alternative HTML version deleted]] __ R-help@r-project.org mailing list h

  1   2   >