> perc.mktshare(df, "GoatChow") # error: "Undefined columns selected"
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-----
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf
> Of peter dalgaard
>
On Jun 20, 2012, at 16:45 , David Marx wrote:
> Hi,
>
> I've built a function to generate plots and would like to be able pass in
> column names as a parameter. Here's a boiled down version of what I have
> right now:
>
> pmts <- data.frame(date=c(1,2,3), all=c(5,6,7),maj=c(4,5,6),ind=c(3,4,5
"With" is designed for interactive use, so you are right that it is not the
answer.
You can use list indexing with column names within functions, though, like
df[[scaling.column]] or df[["all"]].
---
Jeff Newmiller
Hi,
I've built a function to generate plots and would like to be able pass in
column names as a parameter. Here's a boiled down version of what I have right
now:
pmts <- data.frame(date=c(1,2,3), all=c(5,6,7),maj=c(4,5,6),ind=c(3,4,5))
perc.mktshare <- function(df){
range1 <- floor(min(with
4 matches
Mail list logo