[Lme4-commits] r1748 - in pkg/lme4.0: . R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu May 17 03:43:55 CEST 2012
Author: bbolker
Date: 2012-05-17 03:43:54 +0200 (Thu, 17 May 2012)
New Revision: 1748
Added:
pkg/lme4.0/R/oldconv.R
pkg/lme4.0/inst/old_lme4_save.RData
pkg/lme4.0/man/convert_old_lme4.Rd
Modified:
pkg/lme4.0/NAMESPACE
Log:
added function to convert 'old' lme4 objects to lme4.0
Modified: pkg/lme4.0/NAMESPACE
===================================================================
--- pkg/lme4.0/NAMESPACE 2012-05-16 21:41:07 UTC (rev 1747)
+++ pkg/lme4.0/NAMESPACE 2012-05-17 01:43:54 UTC (rev 1748)
@@ -45,6 +45,8 @@
"VarCorr")
+export("convert_old_lme4")
+
exportClasses("lmList", "mer", "merMCMC", "summary.mer")
exportMethods(
Added: pkg/lme4.0/R/oldconv.R
===================================================================
--- pkg/lme4.0/R/oldconv.R (rev 0)
+++ pkg/lme4.0/R/oldconv.R 2012-05-17 01:43:54 UTC (rev 1748)
@@ -0,0 +1,6 @@
+convert_old_lme4 <- function(x) {
+ cc <- class(x)
+ attr(cc,"package") <- "lme4.0"
+ class(x) <- cc
+ x
+}
Added: pkg/lme4.0/inst/old_lme4_save.RData
===================================================================
(Binary files differ)
Property changes on: pkg/lme4.0/inst/old_lme4_save.RData
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: pkg/lme4.0/man/convert_old_lme4.Rd
===================================================================
--- pkg/lme4.0/man/convert_old_lme4.Rd (rev 0)
+++ pkg/lme4.0/man/convert_old_lme4.Rd 2012-05-17 01:43:54 UTC (rev 1748)
@@ -0,0 +1,35 @@
+\name{convert_old_lme4}
+\alias{convert_old_lme4}
+\title{
+ Convert old lme4 objects to lme4.0
+}
+\description{
+ Given a fitted model created by the old (<= 0.999375-42) \code{lme4} package,
+ convert it to be usable with the \code{lme4.0} package
+}
+\usage{
+convert_old_lme4(x)
+}
+\arguments{
+ \item{x}{
+ A fitted model from \code{lme4} (of class \code{mer})
+}
+}
+\details{
+ The function simply manipulates the \code{package} attribute of
+ the object's class to allow \code{lme4.0} to recognize it.
+}
+\value{
+ A \code{mer} object usable by \code{lme4.0}
+}
+\author{
+ Ben Bolker
+}
+\examples{
+## an example file containing old mer objects
+(L <- load(system.file("old_lme4_save.RData",package="lme4.0")))
+convert_old_lme4(fm1)
+convert_old_lme4(gm1)
+}
+\keyword{misc}
+
More information about the Lme4-commits
mailing list