similar to: Factor structures not preserved after dump/dput (PR#200)

Displaying 20 results from an estimated 2000 matches similar to: "Factor structures not preserved after dump/dput (PR#200)"

2005 Apr 04
2
Problems with predict.lm: incorrect SE estimate (PR#7772)
Full_Name: Marek Ancukiewicz Version: 2.01 OS: Linux Submission from: (NULL) (132.183.12.87) It seems that the the standard error of prediction of the linear regression, caclulated with predict.lm is incorrect. Consider the following example where the standard error is first calculated with predict.lm, then using delta method. and finally, using the formula rms*sqrt(1+1/n+(xp-x0)^2/Sxx). Marek
2004 Apr 09
6
Incorrect handling of NA's in cor() (PR#6750)
Full_Name: Marek Ancukiewicz Version: 1.8.1 OS: Linux Submission from: (NULL) (132.183.12.87) Function cor() incorrectly handles missing observation with method="spearman": > x <- c(1,2,3,NA,5,6) > y <- c(4,NA,2,5,1,3) > cor(x,y,use="complete.obs",method="s") [1] -0.1428571 >
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(value, ...) : '...' used in
1999 Feb 12
1
more on dput
I would like to 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
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)))) #
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 format can be considered a safe one for medium-term (say
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
2006 Oct 10
1
error in dput applied to dataframe (PR#9286)
Full_Name: Daniel F Higgins Version: 2.4.0 OS: Windows XP and Mac OSX Submission from: (NULL) (128.111.242.49) Create a dataframe as indicated below and apply 'dput' to it; note that the row.names attribute is incorrect! > aaa <- c("AAA","BBB","AAA") > bbb <- c(1,2,3) > df <- data.frame(aaa,bbb) > dput(df) structure(list(aaa =
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
2010 Feb 08
2
Incorrect Kendall's tau for ordered variables (PR#14207)
Full_Name: Marek Ancukiewicz Version: 2.10.1 OS: Linux Submission from: (NULL) (74.0.49.2) Both cor() and cor.test() incorrectly handle ordered variables with method="kendall", cor() incorrectly handles ordered variables for method="spearman" (method="person" always works correctly, while method="spearman" works for cor.test, but not for cor()). In
2017 Sep 12
2
"homes" vs "home"
When enabling user homes (via the [homes] section), I see the following shares: \\server\<username<http://>> \\server\homes<http://> Both of which point to the user directory. Is it possible to have a third: \\server\home<http://> Which does the same? \\server\homes<http://> is great and all, but I feel that the plural is a bit of a mislabel. Shak
2007 Feb 28
1
Help with "row.names = as.integer(c(NA, 5))" in file from dput
I am trying to understand why syntax used by dput() to write rownames is valid (say, when read by dget()). I ask this because I desire to emulate its actions *reliably* in my For2R routines, and I won't be comfortable until I understand what R is doing. Given data set "fred": > fred id var1 1 1991 0.4388587 2 1992 0.8772471 3 1993 0.6230486 4 1994 0.2340929 5 1995
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, replace = TRUE), ncol = 10)) > dput(x, which.r) >
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
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")))
2003 Sep 30
2
dump/source problem with hclust object (PR#4361)
library(mva) data(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 =
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"
2020 Oct 20
1
write.csv covert Åland to <c5>land
It looks like an encoding problem. It works fine for me with R encoding set to UTF-8 Here is part of my sessionInfo() results [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 [5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8 I would suggest issuing the command sessionInfo() and seeing what your encoding is. On Tue, 20 Oct 2020 at 08:22,
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 =
2020 Oct 20
1
write.csv covert Åland to <c5>land
You don't say, but I'd guess you're using Windows. In your code page, the character ? is probably not representable. At some point in the sequence of operations involved in printing the dataframe R puts the string into the native encoding, and since that's impossible on your system, it substitutes the <c5> instead. The fact that you can sometimes display it is because