More context would be useful, but my first guess is that you are
running into problems because both file and append are functions.
If you didn't explicitly set them to something else, R is using the
function.

What happens if you instead use:
filename <- "myfile.csv"
toappend <- FALSE
file(filename, ifelse(toappend, "a", "w"))

Sarah

On Fri, Sep 17, 2010 at 12:02 PM, lord12 <gaut...@yahoo.com> wrote:
>
> I get an error message:
>
> Error in file(file, ifelse(append, "a", "w")) : invalid 'open' argument
>
> How do I resolve this?
> --


-- 
Sarah Goslee
http://www.functionaldiversity.org

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to