The R Project SVN R

Rev

Rev 35450 | Rev 41593 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35450 Rev 36174
Line 63... Line 63...
63
                }
63
                }
64
                name
64
                name
65
            }
65
            }
66
        }
66
        }
67
 
67
 
68
        if (is.null(from) || is.environment(from)) {
68
        if (is.environment(from)) {
69
            if (! missing(variables))
69
            if (! missing(variables))
70
                vars <- variables
70
                vars <- variables
71
            else vars <- ls(from, all = TRUE)
71
            else vars <- ls(from, all = TRUE)
72
        }
72
        }
73
        else if (is.list(from)) {
73
        else if (is.list(from)) {
Line 76... Line 76...
76
                stop("source list must have names for all elements")
76
                stop("source list must have names for all elements")
77
        }
77
        }
78
        else stop("source must be an environment or a list");
78
        else stop("source must be an environment or a list");
79
 
79
 
80
        for (i in seq(along = vars)) {
80
        for (i in seq(along = vars)) {
81
            if (is.null(from) || is.environment(from))
81
            if (is.environment(from))
82
                key <- lazyLoadDBinsertVariable(vars[i], from, datafile,
82
                key <- lazyLoadDBinsertVariable(vars[i], from, datafile,
83
                                                ascii, compress,  envhook)
83
                                                ascii, compress,  envhook)
84
            else key <- lazyLoadDBinsertListElement(from, i, datafile, ascii,
84
            else key <- lazyLoadDBinsertListElement(from, i, datafile, ascii,
85
                                                    compress, envhook)
85
                                                    compress, envhook)
86
            assign(vars[i], key, env = varenv)
86
            assign(vars[i], key, env = varenv)