Displaying 20 results from an estimated 20000 matches similar to: "Loading .Rdata within an R function"
2016 Dec 15
1
Parallel compression support for saving to rds/rdata files?
Hi,
I have tried to follow the instructions in the ``save`` documentation and
it doesn't seem to work (see below):
mydata <- do.call(rbind, rep(iris, 10000))
con <- pipe("pigz -p8 > fname.gz", "wb");
save(mydata, file = con); close(con) # This runs
R.utils::gunzip("fname.gz", "fname.RData", overwrite = TRUE)
load("fname.RData") #
2006 Aug 30
4
Suggestion for read.table()
First, I compliment you all
for such a useful project as R.
Suggestion: If read.table() could
take input from a character string,
then one could write
raw=
" x y z
1 2 3
4 5 6
"
df = read.table(raw,head=TRUE)
Of course, one can
cat() to write raw into a
temporary file,
and read.table() from that file.
However, direct reading
might be a good option?
Hope this is
2011 Mar 14
1
AOV() may misslabel random effects.
Greetings,
The aov() function may mislabel
the random effects as in the example below:
Has anybody else noticed this?
Cordially,
Giles Crane, MPH, ASA, NJPHA
gilescrane at verizon.net
> m2
Call:
aov(formula = y ~ ap + pe + Error(ju), data = d)
Grand Mean: 77.50667
Stratum 1: ju
Terms:
ap
Sum of Squares 4322.538
Deg. of Freedom 12
13 out of 25 effects not
2017 Aug 17
0
How to convert .Rdata file into .csv or something else?
Welcome to the forum
.Rdata may contain many different objects.
I would suggest doing a? "ls()" to see what objects you have.
then have a look at ?write.table or ?write.csvThese commands will write many types of objects to a .csv file.
For example if I have a data.frame called "dat1" I can write it to a csv (text) file like this:
write.csv(dat1, "~/Rjunk/mydata.csv")
2013 Dec 16
1
External pointers and changing SEXPTYPE
Dear Developers,
I've been struggling through writing R extension in C. I've been using
an external pointer to store my data (please see sample below). I
encountered a very weird erroneous behaviour: when I tried to use my
external pointer to a structure holding several types of data,
including SEXPs, I discovered that SEXPs change their types between
returning from initialization
2017 Aug 17
3
How to convert .Rdata file into .csv or something else?
Dear mailing list members,
I am a beginner of this community.
I would like to analyze data in a .rdata file.
I ran the following code, but the object "d" remained empty.
d <- load("~/docdis/input/ch2/WV6_Data_R_v_2016_01_01.rdata")
I would like to know how to convert this file format into .csv or .txt.
I suppose this question is very basic, but I could not find solutions
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
2008 Feb 26
1
wrapper for save function
Hello -
I would like to create a wrapper to the 'save' function in the base
package, but have a small problem with the name of the object that is
getting saved in the file. Below is a simple example illustrating my
problem.
## BEGIN SAMPLE R CODE
##################################################
## Here is the wrapper for the save function
2006 Mar 24
1
Subdirectory 'data' contains no data sets.
Hi
R CMD check is giving me the following error
* checking package subdirectories ... WARNING
Subdirectory 'data' contains no data sets.
This is not true. That subdirectory contains the file myData.Rdata (I
have tried .rda format too, same result). There is also a myData.Rd in
the man subdirectory. If I remove the .Rd and the data directory R CMD
check executes normally. I am using
2005 Feb 01
1
RData loading weirdness
I've just had an interesting thing happen to one of our students. He's
using R 1.9.1 on Linux, and so I dont expect bugfixes, I'm just
reporting this out of interest in case anyone else has had this happen.
Starting R caused a seg fault shortly after "[Previously saved
workspace restored]". Running "R --no-restore-data" worked fine so I
suspected a corrupted
2005 Feb 01
1
RData loading weirdness
I've just had an interesting thing happen to one of our students. He's
using R 1.9.1 on Linux, and so I dont expect bugfixes, I'm just
reporting this out of interest in case anyone else has had this happen.
Starting R caused a seg fault shortly after "[Previously saved
workspace restored]". Running "R --no-restore-data" worked fine so I
suspected a corrupted
2004 Feb 08
1
APE: compar.gee( )
Dear all,
I don't understand the following behaviour: Running compar.gee (in
library ape ) with and without the option 'data', it give me different
results
Example:
.... Start R ....
> load("eiber.RData")
> ls()
[1] "gee.na" "mydata" "mytree"
> library(ape)
> # runnig with the option data= mydata
> compar.gee(alt ~ R,
2010 Aug 15
1
Trouble loading "saved" Rdata
In the particular application I have I save "test.Rdata" to a sub directory
dir<-"Example"
dir.create(dir)
test<-data.frame(a=c(1,2,3),b=c(3,4,5)
full<-file.path(dir,"test.Rdata,fsep=.Platform$file.sep)
save(test,file=full)
load(full)
returns NULL
it works fine when the object is saved to the working directory, but fails
when saved to a sub directory.
The Rdata
2012 Feb 10
1
Bug with memory allocation when loading Rdata files iteratively?
Dear list,
when iterating over a set of Rdata files that are loaded, analyzed and
then removed from memory again, I experience a *significant* increase in
an R process' memory consumption (killing the process eventually).
It just seems like removing the object via |rm()| and firing |gc()| do
not have any effect, so the memory consumption of each loaded R object
cumulates until
2008 Nov 19
1
paste() retains quotes (PR#13304)
Full_Name: Giles L Crane
Version: 2.8.0 2008-10-20
OS: Windows XP
Submission from: (NULL) (71.168.215.186)
paste(rep(" ",10),sep="")
[1] " " " " " " " " " " " " " " " " " " " "
As I read the documentation for paste(),
this should have produced
" "
that is,
2012 Dec 14
1
Problem loading .Rdata file
Dear all,
I'm having troubles migrating a large matrix from one system to another.
#system 1: Ubuntu 12.04, 64-bit, running R 2.15.2
# do some simulations
# save the simulations
> save(Output, file = "Simulations.Rdata")
#Output is a numeric matrix with 6 columns and about 2M rows.
Use ftp to transfer the Simulations.Rdata file to system 2
#system2: Windows XP, 32-bit running
2001 Jul 20
1
loading .RData on distributed system
Hi, all.
I'm running R on a beowulf system, with software that can take a list of
single-processor jobs and parcel them out over the system. (In case it's
of interest, they're dual pentium 866 machines connected by fast
ethernet.) The administrators of the system found that I was causing a
huge load on the file server, and when they investigated it turned out
that each process was
2010 Dec 06
1
Loading .RData from Internet
Dear All,
Can you please suggest me a correct way to load the following R data frame
from the internet and save it to the hard drive?
The following is what I tried:
> raceprofiling <-
> read.table("http://rss.acs.unt.edu/Rdoc/library/twang/data/raceprofiling.RData")
> save(raceprofiling, file = 'raceprofiling.RData')
However, when I used dim() to check the dataset,
2010 Apr 22
2
How to insert gridlines in lattice density plot
Greetings.
How can I insert gridlines
in the following density plot call?
Must one compose a panel function?
'data.frame': 46 obs. of 2 variables:
$ fallrates: num 5.2 7.1 7.1 9.8 3.7 7.5 5 6.2 1.5 2.9 ...
$ prepost : Factor w/ 2 levels "post","pre": 2 2 2 2 2 2 2 2 2 2 ...
library(lattice)
densityplot(~fallrates, groups = prepost,
2005 Apr 07
2
Zipping Rdata Files
Saving Rdata files in a zip archive form can in some cases save a
considerable amount of disk space. R has the zip.file.extract function to
extract files from zip archives, but appears not to have any corresponding
function to save in zipped form. (At least I have not been able to find
anything in the help files or through searching the mail archives.) The
system function can be used to call gzip