Displaying 20 results from an estimated 4000 matches similar to: "unexpected '[<-.data.frame' result"
2000 Nov 25
2
assigning to data frames with whole columns of NAs
I suppose this could be described as a feature (it seems to be similar in S-Plus), but it looks to me more like a bug.  Why can't the assignment below to a row of "emptyframe" (or "anotherframe") be made?  This with R --vanilla (version info below).
Regards -- David
David Firth                        Phone +44 1865 278544
Nuffield College                   Fax   +44 1865
2013 Feb 20
0
Simultaneously adding rows and columns by '[<-.data.frame' may fail
I saw the following in R help page "Extract.data.frame".
     The replacement methods can be used to add whole column(s) by
     specifying non-existent column(s), in which case the column(s) are
     added at the right-hand edge of the data frame and numerical
     indices must be contiguous to existing indices.  On the other
     hand, rows can be added at any row after the current
2000 Sep 29
2
all.equal.list() sometimes fails with unnamed and named components (PR#674)
examples:
1) Fails to report that components 2 and 3 differ
all.equal(list(1,2,3,zap=1),list(1,3,4,zap=2))
[1] "Component zap: Mean relative  difference: 1
2) Incorrectly asserts all are equal when components 2 and 3 differ
> all.equal(list(1,2,3,zap=1),list(1,3,4,zap=1))
[1] TRUE
3) Removing named component reveals differences:
> all.equal(list(1,2,3,1),list(1,3,4,1))
[1]
2005 Oct 20
2
md5sum for R-2.2.0-win32.exe ??
I get
 	c1279b77fcccf40379f59a83523a440e *R-2.2.0-win32.exe
but I see
 	e8bdf765fe8013129045314c8e2605fd *rw2011.exe
on several USA  mirrors.
I hope the latter is merely in need of a replacement and not an 
indication of a problem with the web sites.
Chuck
Charles C. Berry                        (858) 534-2098
                                          Dept of Family/Preventive Medicine
E
2004 Jan 21
1
cor( x, y , method = "spearman" ) incorrect if any( is.na(c( x, y (PR#6448)
> version
         _                
platform i686-pc-linux-gnu
arch     i686             
os       linux-gnu        
system   i686, linux-gnu  
status                    
major    1                
minor    8.1              
year     2003             
month    11               
day      21               
language R                
> cor( 1:3, rep(NA,3) ) # OK
Error in cor(1:3, rep(NA, 3)) :
2004 Jul 21
0
loglin( tab, margin, start = bad.start ) kills R (PR#7123)
> tab <- array( sample(3^5), rep(3,5) )
> loglin( tab, list(1,2,3,4,5) )[[1]] # AOK
2 iterations: deviation 5.456968e-12 
[1] 10909.89
> loglin( tab, list(1,2,3,4,5), c(1,2,3) )[[1]] # OUCH!
Process R bus error at Wed Jul 21 17:03:55 2004
this is inconsistent - sometimes issuing this msg several times before 
barfing:
Error in switch(z$ifault, stop("This should not
2003 Jul 24
0
unz( "x.zip", "y.csv" ) != pipe( "unzip -p x.zip y.csv" )
Not sure this is a bug in R. 
Maybe its a bug in my understanding of unz(). 
The character 'b2' (hexadecimal) is in position 535 of line 1 
of 'naughty.csv'. This character appears as superscript '2' and came to me
in an EXCEL file that I converted to text in a comma separated ( *.csv )
format.
The first line gets truncated by readLines after 534 characters using
unz():
2001 Nov 29
1
rug(x) clip warning incorrect if par("xlog")==TRUE (PR#1188)
To wit:
> plot(1:2,1:2,log="x")
> rug(1:2)      # should not warn
Warning message: 
some values will be clipped in: rug(1:2) 
> plot(1:2,1:2,log="x")
> rug(c(0,.1,.2))  # should warn, but does not
> 
I believe this fixes the problem:
% diff -c /tmp/orig.rug.R /tmp/cberry.rug.R 
*** /tmp/orig.rug.R	Thu Nov 29 12:59:00 2001
--- /tmp/cberry.rug.R	Thu Nov 29
1998 Aug 14
1
R-beta: ld problem/SunOS/gcc/g77
In trying to compile R-0.62.2 on my SPARC SunOS: 
tajo% uname -a
SunOS tajo 4.1.3_U1 1 sun4m
with gcc/g77,
I ran into 
gcc  -o R.binary [deleted] ../lib/libmath.a  -L/usr/openwin/lib -lX11  -ldl -ltermcap -lm -lf2c
collect2: ld returned 2 exit status
ld: /lib/libm.a(lgamma.o): _gamma: multiply defined
ld: /lib/libm.a(lgamma.o): _lgamma: multiply defined
*** Error code 1
make: Fatal error:
2020 Aug 11
2
clarifying the handling of responses for virtio-rpmb
Hi,
The specification lists a number of commands that have responses:
  The operation of a virtio RPMB device is driven by the requests placed
  on the virtqueue. The type of request can be program key
  (VIRTIO_RPMB_REQ_PROGRAM_KEY), get write counter
  (VIRTIO_RPMB_REQ_GET_WRITE_COUNTER), write
  (VIRTIO_RPMB_REQ_DATA_WRITE), and read (VIRTIO_RPMB_REQ_DATA_READ). A
  program key or write
2010 Nov 27
1
Bug in parseNamespaceFile or switch( , ... ) ?
parseNamespaceFile() doesn't seem to detect misspelled directives. Looking 
at its code I see
 	switch(as.character(e[[1L]]),
 	<lots of args omitted here>,
 	stop(gettextf("unknown namespace directive: %s",
                 deparse(e)), call. = FALSE, domain = NA))
but this doesn't seem to function as I expect, viz. to stop with an error 
if I type a wrong directive.
2008 Feb 15
12
Transfer Crosstable to Word-Document
# Dear list,
# I am an R-beginner and
# spent the last days looking for a method to insert tables produced
# with R into a word document. I thought about SPPS:  copy a table from
# an SPO-file and paste it into a word document
# (if needed do some formatting with that table).
# Annother idea was, to produce a TEX-file,
# insert it and make it a word-table.
# I found the following libraries, which
2012 Aug 27
3
Changing entries of column of type "factor"/Adding a new level to a factor
What is a smart way to change an entry inside a column of a dataframe or
matrix which is of type "factor"?
Here is my script incl. input data:
> #set working directory:
> setwd("K:/R")
> 
> #read in data:
> input<-read.table("Exampleinput.txt", sep="\t", header=TRUE)
> 
> #check data:
> input
   Ind      M1      M2      M3
1    1 
2009 Nov 26
0
R: RE: R: Re: R: Re: chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails
Thanks for your message!
Actually it works quite well for me too.
If I then take the trace of the final result below, I end up with a number 
made up of both a real and an imaginary part. This does not probably mean much 
if the trace of the matrix below givens me info about the degrees of freedom of 
a model...
Simona 
>----Messaggio originale----
>Da: RVaradhan at jhmi.edu
>Data:
2007 Oct 24
0
random walk w/ reflecting boundary: avoid control construct? [SEC=UNCLASSIFIED]
Hi Johannes,
I came up with the following (assuming that if step[i] is independent of step[i-1] then it is also independent of -step[i-1]):
Cheers  Joe
> # your (unbounded) random walk
> k <- cumsum(c(0,sample(c(-1,1), 1000, rep = T)))
>
> #shift it to positive, to allow following calculations k <- k - min(k) 
> # set your bound (remember min(k) is now zero) wid <- 10
2001 Mar 03
0
bqtl available on CRAN
Package bqtl version 1.0 is now available on CRAN.
Description: QTL mapping toolkit for inbred crosses and
 recombinant inbred lines. Includes maximum likelihood and Bayesian
tools.
I am keen to have comments about this package including implementation
details, additional functionality, and (of course) problems and bugs.
Chuck Berry
-- 
Charles C. Berry                        (858) 534-2098 
 
1999 Dec 10
1
split nukes names() (PR#371)
> split(c(a=1,b=2),c(1,2))
$"1"
[1] 1
$"2"
[1] 2
The documentation does not *promise* that names will survive, but in
Splus3.4, they do. This broke a function that worked under S+ that used
the names attribute of elements in the components returned by split.
Chuck Berry
--please do not edit the information below--
Version:
 platform = sparc-sun-solaris2.7
 arch = sparc
2001 Mar 23
0
cor(x,y) when is.null(y) (PR#883)
Problem:
> names(my.dat)
[1] "x" "y"
> cor(my.dat$x,my.dat$y)     # desired result
[1] 0.8660254
> cor(my.dat$x,my.dat$y.NOT) # typo
[1] 1
> 
I'd prefer a warning() or stop() in that case.
Solution (??) :
*** 1,5 ****
--- 1,7 ----
  cor <- function (x, y=NULL, use="all.obs")
  {
+     if (is.null(y) && !is.null( match.call()$y ) )
+      
2001 Oct 08
1
NA as names of vector from subscripted matrix == bug ?
Is this a bug?
> matrix(1:4,nc=2,dimnames=list(1:2,1:2))[c(1,3)]
 1 NA 
 1  3 
It has some annoying consequences, e.g.
> median( matrix(1:9,nc=3,dimnames=list(1:3,1:3))[1,,drop=F] )
NA 
 4 
> 
The above was for 
Version:
 platform = sparc-sun-solaris2.7
 arch = sparc
 os = solaris2.7
 system = sparc, solaris2.7
 status = 
 major = 1
 minor = 3.0
 year = 2001
 month = 06
 day = 22
2000 Mar 26
1
matlines, matpoints don't follow prototype (PR#506)
The Blue Book allows the 'type' argument to be used in matpoints and
matlines.
	matlines(x, y, type="l", lty=1:5, pch=, col=1:4)
R-1.0.0 does not.
Thus, type="h", "b", must be invoked thru matplot( x, y, type = "h",
add=TRUE)
For the sake of consistency with S, it would be nice to have matlines
defined as:
"matlines" <-