Displaying 20 results from an estimated 30000 matches similar to: "Looping through data sets to change column from character to numeric"
2012 Nov 08
3
problem with package development and older defs earlier in search order
Hi,
I have a problem with a package I have developed in that functions do not get loaded due to older versions of the functions being in the .GlobalEnv? fetched from .Rdata files stored from previous saved workspaces. I need to be able to fix this somehow when I load the package. I do not want to mess up the search order to fix the problem.
How I got myself into this mess is that I started
2008 Aug 07
3
how to save an R object selectively?
Hi,
How to save an R object for example a matrix or vector and not all objects created in a session (which is usually performed by save.image or q("yes"))?
Best,
Carol
[[alternative HTML version deleted]]
2016 Jul 27
3
Model object, when generated in a function, saves entire environment when saved
In the below, I generate a model from an environment that isn't
.GlobalEnv with a large object that is unrelated to the model
generation. It seems to save the irrelevant object unnecessarily. In
my actual use case, I am running and saving many models in a loop that
each use a single large data.frame (that gets collapsed into a small
data.frame for estimation), so removing it isn't an
2016 Jul 27
2
Model object, when generated in a function, saves entire environment when saved
Another solution is to only save the parts of the model object that
interest you. As long as they don't include the formula (which is
what drags along the environment it was created in), you will
save space. E.g.,
tfun2 <- function(subset) {
junk <- 1:1e6
list(subset=subset, lm(Sepal.Length ~ Sepal.Width, data=iris,
subset=subset)$coef)
}
saveSize(tfun2(1:4))
#[1] 152
Bill
2004 Sep 24
5
using tcltk in R under ESS/XEmacs on Windows
Sorry for the cross-post. Not sure where the problem is...
A while back I posted an R function to R-help:
cd <- function (dir = tclvalue(tkchooseDirectory()), saveOld = FALSE,
loadNew = TRUE) {
stopifnot(require(tcltk))
if (saveOld)
save.image(compress = TRUE)
setwd(dir)
rm(list = ls(all = TRUE, envir = .GlobalEnv), envir = .GlobalEnv)
if (loadNew &&
2018 Mar 22
3
GlobalEnv error
Dear all
May I know how to solve this problem? I have encountered this problem after
I have logged out from Rstudio. Thank you
Warning: namespace ?caret? is not available and has been replaced
by .GlobalEnv when processing object ?fit.ann?
Warning: namespace ?ggplot2? is not available and has been replaced
by .GlobalEnv when processing object ?p1?
Warning: namespace ?plotly? is not available and
2012 Mar 07
4
add data from .RData file
I got two .RData file e.g data.2005.RData & data.2006.RData
I would like to combine these two different data set and make single RData
file.
in both file there are some NULL files are also available and I would like
to clear this NULL files also.
$ : NULL
$ : NULL
$ : num [1:43285, 1:8] -21.1 -21.1 -24.9 -24.9 -24.9 ...
..- attr(*, "dimnames")=List of 2
.. ..$ : NULL
..
2018 Mar 23
1
GlobalEnv error
Previously, the R software was perfectly run without error and I am not
sure why this happens. I have not installed any new R. If the *RData file
is the problem, what should I do?
Thank you
On Fri, Mar 23, 2018 at 7:58 AM, William Dunlap <wdunlap at tibco.com> wrote:
> You haven't given much context, but these error message can come from
> load() when loading a *.RData file that
2018 Mar 22
0
GlobalEnv error
You haven't given much context, but these error message can come from
load() when loading a *.RData file that contains objects reference packages
not installed in the current installation of R. When R starts it will load
a ".RData" file if one exists, this file is typically created when R shuts
down
and you ask it to save the current session. If you recently upgraded R you
the
2004 Jul 15
3
More on global environment
To follow up on my previous question, suppose a user R session wants to
unload one workspace and load another within an R session. Is the
following the correct sequence?
1. save.image() to save the current workspace as .Rdata in the current
working directory.
2. rm(list=ls()) to remove everything from the workspace.
3. setcwd("xxx") to set the new working directory.
4.
2012 May 03
6
Cannot read or write to file in Linux Ubuntu
I am the proud owner of a new laptop since my old one died the other day.
Currently I have a dual-boot Windows 7 Home and Ubuntu 12.04 . I'll leave the Windows problems for another post.
I know practically nothing about Linux so I am probably doing something stupid but ... at the moment I cannot seem read or write files in Ubuntu. I am not having any problem saving other documents to the
2007 Aug 22
3
tackle memory insufficiency for large dataset using save() & load()??
Hello List, i have been agonizing over this for days, any reply would be greatly appreciated!
Situation:___________________________________
My original dataset is a .csv dataset (w/ 2M records) with 4 variables:
job_id (Primary key, won't be used for analysis, just used for join tables),
sector_id (categorical variable, for 19 industry sectors),
sqft (con't variable for square
2010 Jan 06
1
MakeActiveBinding help needed
Hi,
I wanted a Q&D way to open a new graphics window but keep the focus in
the console window (under Windows and the Rgui), so I wrote a line into
my Rprofile.site file as follows:
invisible(makeActiveBinding('newdev', function(...)
dev.new(restoreConsole=T), .GlobalEnv))
(That is all on one line, incase the mailer re-parses it). This gives me
a command "newdev" which
2004 Sep 22
1
attaching to position 1
If an attempt is made to attach to position 1, it appears to work
(not even a warning) but in fact it doesn't work as many would
expect. "search" thinks that it gets placed in position 2, but nothing
is actually there (according to "ls").
This is guaranteed to be confusing (and annoying) to people who
are used to attaching to position 1 in S-PLUS.
I'm not clear on
2011 Jan 16
3
ODD ODD ODD stuff!!
Egregious,
look what just happened few minutes ago while opening up my program and
running the scripts
> A<-read.table("C:\\Documents and Settings\\
+ me\\Desktop\\TESI\\generale.txt",head=T)
Errore: non trovo la funzione "read.table" #CAN'T FIND read.table
FUNTION!!!??? ARE WE ok???
>
> B<-read.table("C:\\Documents and Settings\\
+
2007 Jan 25
3
Error in loadNamespace(name) (PR#9464)
Full_Name: Ross Darnell
Version: 2.4.1
OS: Linux
Submission from: (NULL) (130.102.133.33)
rdarnell at pc:~/Data$ ls -al .RData
-rwxrwxrwx 2 root root 13551 2006-12-06 08:58 .RData
rdarnell at pc:~/Data$ R
R version 2.4.1 (2006-12-18)
Copyright (C) 2006 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to
2000 Jun 02
1
problem loading packages (PR#559)
Dear R team,
I had a strange problem that appeared suddenly, and which I'd like to
to mention in case it is of interest (although I suspect that I
may have unwittingly done something dumb: if so please accept my apology)
> library(ctest) ## or any package other than "oz" that I tried
Error in as.character(table) : Object ".Dyn.libs" not found
> traceback()
[1]
2010 Oct 25
2
How to save R file into specific type
Hello everyone
Can you please teach me how to save my homework as .R file?
I write my code in RGui. When I tried to save my work, the RGui only allows
me to save it as .RData.
Is there any difference between .R and .RData?
By the way, after I save my work as .RData, I cannot reopen it. when I open
it, only one message comes out as following: "ARGUMENT_ignored_."
--
View this
2006 May 25
1
save() saves extra stuff if object is not evaluated
Hi,
it looks like save() is saving all contents of the calling
environments if the object to be saved is *not* evaluated, although it
is not that simple either. After many hours of troubleshooting, I'm
still confused. Here is a reproducible example (also attached) with
output. I let the code and the output talk for itself:
peek <- function(file, from=1, to=500) {
1998 Jul 08
1
Serious bug in save.image
I am using a package which tends to crash R, so I have been saving
my work at regular intervals with "save.image()". Unfortunately, this
overwrites .RData with an empty workspace, so when R crashed I lost
my workspace and a day's work.
The problem is easily fixed: "save.image" looks like this
function ()
save(list = ls(), file = ".RData")
The expression