Re: [R] how to make read-only data frames?

From: ONKELINX, Thierry <Thierry.ONKELINX_at_inbo.be>
Date: Fri, 11 Jan 2008 15:20:25 +0100

Dan,

You could write a function that just creates the data. And call this function each time you need the data.

HTH, Thierry




ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry.Onkelinx_at_inbo.be
www.inbo.be

Do not put your faith in what statistics say until you have carefully considered what they do not say. ~William W. Watt A statistical analysis, properly conducted, is a delicate dissection of uncertainties, a surgery of suppositions. ~M.J.Moroney

-----Oorspronkelijk bericht-----
Van: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] Namens Dan Kelley
Verzonden: vrijdag 11 januari 2008 15:13 Aan: r-help_at_r-project.org
Onderwerp: [R] how to make read-only data frames?

QUESTION: is there a way to make objects (e.g. data frames) read-only?

BACKGROUND: I am writing some functions that use a data frame
(frequencies

of tidal constituents) that I want to be read-only. I can see how to accomplish this within a single function (just define the data in the function), but I'm not sure how to share read-only values between
(un-nested) functions. Is there a more elegant method than duplicating
the
creation of the data frame in each function?

-- 
View this message in context:
http://www.nabble.com/how-to-make-read-only-data-frames--tp14756183p1475
6183.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_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.

______________________________________________
R-help_at_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.
Received on Fri 11 Jan 2008 - 14:23:57 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 Fri 11 Jan 2008 - 14:30:05 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive