Re: [R] Calling functions

From: Toby Marthews <>
Date: Tue, 17 Jun 2008 13:44:42 +0200 (CEST)


Can't you just do source("Xtabs.R")? That will load in the definition.

Alternatively, instead of saving the R program, save the workspace on your network (e.g. Xtabs.RData), which will contain the function definition, and arrange a link so that R always starts with that workspace loaded?

Toby Marthews

Le Mar 17 juin 2008 13:32, Michael Pearmain a écrit :
> Another newbie question.
> I've written a function and saved the file as Xtabs.R, in a central place
> on
> a network so others will be able ot use the function,
> My question is how do i call this function?
> I've tried to chance the working directory, and tried to load it via;
>> library(Xtabs, lib.loc="//filer/common/technical/surveys/R_test")
> but neither seem to work? the function inside is called CrossTable.
> Mant thanks in advance mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 17 Jun 2008 - 12:21:25 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 17 Jun 2008 - 12:30:50 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive