search for: dget

Displaying 20 results from an estimated 104 matches for "dget".

Did you mean: bdget
2014 Jun 20
1
dget() much slower in recent R versions
Hello, I've noticed that dget() is much slower in the current and devel R versions than in previous versions. In 2.15 reading a 10000-row data.frame takes less than half a second: > (which.r <- R.Version()$version.string) [1] "R version 2.15.2 (2012-10-26)" > x <- data.frame(matrix(sample(letters, 100000,...
2018 Sep 29
1
Improvement to documentation in dput.Rd
If the "Matrix" package is attached, 'example(dget)' fails: > library(Matrix) > example(dget) dget> fil <- tempfile() dget> ## Write an ASCII version of function mean to our temp file dget> dput(mean, fil) dget> ## And read it back into 'bar' dget> bar <- dget(fil) Error in initialize(v...
2007 Oct 17
1
dget not restoring dput in R 2.6.0 (PR#10350)
Full_Name: David States Version: 2.6.0 OS: Windows XP64 Submission from: (NULL) (141.211.38.9) # The pair of commands # # dput(object, "file.dput") # object = dget("file.dput") # # should be a no op, but this is not working correctly for all objects. # # Simple example: # # make a simple object of class "hclust" cl = hclust(dist(matrix(nrow=4,ncol=4, c(1:16)))) # save it to a file using dput dput(cl, "cl.dput") # the following tw...
2004 Jul 15
1
dput and dget
I am seeking advice about dput() and dget(). We are using the ascii format supported by these functions as a way to write data from other programs that can be read into R easily. We are able to save complicated results (in the form of an R list) to a single file that can be read trivially into R or S-Plus. My question is whether that...
2007 Jan 04
1
littler+dget+stdin -> segmentation fault
Hi, I'm trying to write a series of pipes using littler, and I get the following behaviour: Sorry if I'm just doing something witless, I'm new to R. I'm using the latest versions from debian testing (2.4.0 and 0.0.8). $ r -e 'a<-dget(file=stdin()); print(a)' ?list(a=2) Segmentation fault In R itself this works: > dget(file=stdin()) ?list(a=2) $a [1] 2 As do (from the command line): $ cat >foo list(a=2) $ r -e 'a<-dget(file="foo"); print(a)' $a [1] 2 and (using littler and scan instead of dget...
2008 Aug 20
2
Reading in a value of .Random.seed in .Rprofile
For reasons that are best known to myself [ ;-) ] I have a value of .Random.seed saved (via dput()) in a file ``.Random.seed.save''. In my .Rprofile I have the lines: .Random.seed <- dget(".Random.seed.save") Junk <- dget(".Random.seed.save") print(all.equal(.Random.seed,dget(".Random.seed.save"))) print(all.equal(Junk,dget(".Random.seed.save"))) The two calls to all.equal() both return TRUE. However when I repeat the calls from the comma...
2007 Apr 22
1
dput/dget when a data frame has 2 rows (PR#9627)
This doesn't seem right; I'm using R version 2.4.1 (2006-12-18) on Mac OS and Win XP and find the same issue: > mydataframe <- data.frame(ppi=c(.5,.5),mmu=c(5,10)) > dput(mydataframe,"mydataframe.txt") > dget("mydataframe.txt") Error in attributes(.Data) <- c(attributes(.Data), attrib) : row names must be 'character' or 'integer', not 'double' > mydataframe3 <- data.frame(ppi=c(.5,.5,.5),mmu=c(5,10,15)) > dput(mydataframe3,"mydataframe3.txt") &...
1999 Feb 12
1
more on dput
...write data so that I can re-read it and reproduce results, preferably in both R and Splus. In the past when I have done this my data has been relatively simple and I've just scan()ed it. Now I have a fairly complicated structure I would like to preserve and I've been trying to use dput and dget. Is there a better way? If not, the following truncation by dput, which I mentioned yesterday, is causing me a fair amount of trouble. Suggestions on how to fix it would be appreciated. Paul Gilbert _______ R: > dput (1/3, "zot") > (1/3) - dget("zot") [1] 3.333333e-08...
2004 Aug 25
5
S <-> R
Hello! I would like to be able to read in list data objects in R/S created in R/S. (Ie R->S or S->R.) I have tried 'dput' and 'dump' in S, but neither of the created files could be read into R (with 'dget' nor 'source'). Is there any way that I can save a list object in S that can be read into R? Sincerely, Zachary Skrivanek, PhD Research Scientist Program Phase Statistics-Endocrine [[alternative HTML version deleted]]
2020 Oct 20
0
write.csv covert Åland to <c5>land
Hi there, Why the same string is displayed in different form? > abc[,1] [1] "?land" "Afghanistan" > abc name 1 <c5>land 2 Afghanistan And more... > dput(abc, "aa.txt") > dget("aa.txt") name 1 <c5>land 2 Afghanistan > dget("aa.txt")[,1] [1] "<c5>land" "Afghanistan" Best, Jinsong On 2020/10/20 17:13, Jinsong Zhao wrote: > Hi there, > > I tried to export the names of country to a csv file w...
2009 Jun 29
2
How to read a list into R??
...[8] 0.0000000 0.0000000 0.0000000 [[3]] [1] 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 [19] 0.0 0.0 0.0 0.0 0.5 0.0 0.0 0.5 0.0 0.5 0.0 0.0 0.0 0.0 'List.txt' was output by 'sink' from R. I try to read 'List.txt' into R. First I tried 'dget', I got > dget('Vlist300.txt') Error in parse(file = file) : Vlist300.txt: unexpected '[[' at 1: [[ Then I tried 'scan', >scan('List.txt', what='list') Read 86 items [1] "[[1]]" "[1]" "0.0" "0.0&q...
2004 Jun 11
3
Change in grep behavior from 1.9.0 to R-patched
I've noticed a change in the way grep() behaves between the 1.9.0 release and a recent R-patched. On 1.9.0 I get the following output: > x <- dget(file = url("http://www.biostat.jhsph.edu/~rpeng/names.R")) > length(grep("^l\\w+tmean", x, perl = TRUE, value = TRUE)) [1] 84 And on R-patched (2004-06-11) I get > x <- dget(file = url("http://www.biostat.jhsph.edu/~rpeng/names.R")) > length(grep(&quot...
2006 Oct 10
1
error in dput applied to dataframe (PR#9286)
...> dput(df) structure(list(aaa = structure(c(1, 2, 1), .Label = c("AAA", "BBB"), class = "factor"), bbb = c(1, 2, 3)), .Names = c("aaa", "bbb"), row.names = c(NA, 3), class = "data.frame") > dput(df,file="puttest.R") > dget("puttest.R") Error in attributes(.Data) <- c(attributes(.Data), attrib) : row names must be 'character' or 'integer', not 'double' > However, if R version 2.3 is used, the value for row.names is: row.names = c("1", "2", "3&q...
2020 Oct 20
5
write.csv covert Åland to <c5>land
Hi there, I tried to export the names of country to a csv file with write.csv(). In the resulted file, ?land was coverted to <c5>land. Is there any way could prevent this happening? Thanks! > abc [1] "?land" > write.table(abc, file = "") "x" "1" "<c5>land" Best, Jinsong
2020 Oct 20
1
write.csv covert Åland to <c5>land
...gt; > Why the same string is displayed in different form? > > > abc[,1] > [1] "?land" "Afghanistan" > > abc > name > 1 <c5>land > 2 Afghanistan > > And more... > > > dput(abc, "aa.txt") > > dget("aa.txt") > name > 1 <c5>land > 2 Afghanistan > > dget("aa.txt")[,1] > [1] "<c5>land" "Afghanistan" > > Best, > Jinsong > > On 2020/10/20 17:13, Jinsong Zhao wrote: > > Hi there, > > &g...
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]]
2020 Oct 20
1
write.csv covert Åland to <c5>land
...Why the same string is displayed in different form? > > > abc[,1] > [1] "?land" "Afghanistan" > > abc > name > 1 <c5>land > 2 Afghanistan > > And more... > > > dput(abc, "aa.txt") > > dget("aa.txt") > name > 1 <c5>land > 2 Afghanistan > > dget("aa.txt")[,1] > [1] "<c5>land" "Afghanistan" > > Best, > Jinsong > > On 2020/10/20 17:13, Jinsong Zhao wrote: >> Hi there, >>...
1999 May 27
1
Factor structures not preserved after dump/dput (PR#200)
Full_Name: Marek Ancukiewicz Version: 0.64.0 OS: Linux (RedHat 6.0) Submission from: (NULL) (132.183.12.87) I've noticed that factor structures get recoded when the data is dumped using either dump or dput and then restored with source or dget. This occurs when the values taken by factors do not include 1. For example: a <- factor(1:5,1:5,c('a','b','c','d','e')) b <- a[3:5] dput(b,'b.data') new.b <- dget('b.data') Then b is not the same as new.b: > b [1] c...
2003 Sep 30
2
dump/source problem with hclust object (PR#4361)
...(USArrests) hc <- hclust(dist(USArrests), "ave") plot(hc) # OK dump(c("hc"), "tst") rm(hc) source("tst") plot(hc) # Error in plot.hclust(hc) : invalid dendrogram input The same problem occurs with dput/dget --please do not edit the information below-- Version: platform = i686-pc-linux-gnu arch = i686 os = linux-gnu system = i686, linux-gnu status = major = 1 minor = 7.1 year = 2003 month = 06 day = 16 language = R Search Path: .GlobalEnv, package:methods, package:ctest, package:mva,...
2014 Sep 08
2
RFS: blktap/2.0.90-3 [RC]
On 09/08/2014 04:59 PM, Chrysostomos Nanakos wrote: > On 2014-09-08 10:07, Thomas Goirand wrote: >> On 09/07/2014 01:44 AM, Chrysostomos Nanakos wrote: >>> dget -x >>> >>> http://mentors.debian.net/debian/pool/main/b/blktap/blktap_2.0.90-3.dsc >> >> Uploaded! Thanks for your contribution to Debian. >> >> Cheers, >> >> Thomas Goirand (zigo) > > Dear Thomas hi, > hope you've been well. Thank...