Displaying 20 results from an estimated 2000 matches similar to: "Inconsistencies in subassignment (PR#7210)"
2004 Sep 03
0
Inconsistencies in subassignment with NA index. (PR#7210)
Apart from the inconsistencies, there are two clear bugs here:
1) miscalculating the number of values needed, in the matrix case.  E.g.
> AA[idx, 1] <- B[1:4]
Error in "[<-"(`*tmp*`, idx, 1, value = B[1:4]) :
        number of items to replace is not a multiple of replacement length
although only 4 values are replaced by AA[idx, 1] <- B.
2) the behaviour of the 3D case.
2004 Jan 20
1
evaluation of discriminant functions+multivariate homosce dasticity
While I don't know anything about Box's M test, I googled around and found a
Matlab M-file that computes it.  Below is my straight-forward translation of
the code, without knowing Matlab or the formula (and done in a few minutes).
I hope this demonstrates one of Prof. Ripley's point: If you really want to
shoot yourself in the foot, you can probably program R to do that for you.
[BTW:
2011 Aug 12
1
Details of subassignment (for vectors and data frames)
Hi All: 
I'm looking to find out a bit more about how subassignment actually works and am hoping someone with knowledge of the details can fill me in (I've looked at the source code, but my knowledge of C is lacking).
In the case of vectors, my reading of ?"[" would indicate that for a vector, vec <- 1:25,    vec[c(1,5,25)] <- c(101,102,103)is functionally the same as   
2003 Apr 07
3
New window for plot()
Hi, 
Can anybody tell me how to open new a new window for plot()? Thanks.
Minghua
2003 Sep 16
3
Question in Using sink function
Could anyone please explain to me why the following writes nothing into
"all.Rout"
file? If the "for" loop is removed, t.test output can be written into
"all.out".
Thanks in advance. 
Minghua Yao
 ......
  zz <- file("all.Rout", open="wt")
  sink(zz)
   
  for(i in 1:n)
  {	  
    Cy3<-X[,2*i-1];
    Cy5<-X[,2*i];
	
    t.test(Cy3, Cy5)
2004 May 20
2
Get Slot from a Class
Hello, everyone,
 
I don't quite understand the following message:
 
> TTT <- t.test(1:10, y=c(7:20))
> class(TTT)
[1] "htest"
> TTT@p.value
Error: Trying to get slot "p.value" from an object whose class ("htest") is not defined 
> TTT$p.value
[1] 1.855282e-05
Why the message says the class of TTT is not defined while class(TTT) gets
2003 Jun 27
2
NA points in loess function
Gurus,
I used
	predict(loess(Y~X));
where Y and X are of the same length. But there are same NA's in both Y and
X. Those NA's are in the same locations in Y and X. The following is the
error messageI got:
Error in "[<-"(*tmp*, , i, value = predict(loess(Y~X))) : 
        number of items to replace is not a multiple of replacement length
If I replaced the NA's with a
2003 May 12
1
Problem in fetching from Oracle
Dear all,
I tried the following in R:
 >library(ROracle)
 >ora <- dbDriver("Oracle")
 >channel <- dbConnect(ora, user = "scott",
password="tiger",dbname="abcdef")
 >rs <- dbSendQuery(channel, "select * from USArrests")
 >while(!dbHasCompleted(rs))
  {
  	xxx <- fetch(rs, n = 5000)
  }
+ + + > xxx
Error: Object
2004 Apr 28
2
Problem in Installing Package from CRAN...
Hi,
 
I have installed R 1.9.0 under Windows XP. When I used 
 
"Packages->Install Package(s) from CRAN..." to install the package 'gregmisc', I got this message:
 
> local({a <- CRAN.packages()
+ install.packages(select.list(a[,1],,TRUE), .libPaths()[1], available=a)})
trying URL `http://cran.r-project.org/bin/windows/contrib/1.9/PACKAGES'
Content type `text/plain;
2003 Sep 26
3
Std. errors of intercept and slope
Dear all,
I have the following output generated by linear regression. Since there is
only one regression intercept and one slope for one set of data, what is the
meaning of std. error for intercept and that of slope? Thanks in advance.
Sincerely,
Minghua
> data(thuesen)
> attach(thuesen)
> lm(short.velocity~blood.glucose)
Call:
lm(formula = short.velocity ~ blood.glucose)
2004 Apr 29
5
Problems in plot
Hello,
 
 
 
I have R1.9.0 under Windows XP. My program plots several plots using
 
x11()
par(cex = 0.75)
......
x11()
par(cex = 0.75)
......
x11()
par(cex = 0.75)
......
x11()
par(cex = 0.75)
......
 
Sometimes, one of them generates  a small frame only with title area "R graphics: Device X (ACTIVE)". The message in the console window is 
 
Error in plot.new() : Figure margins too large
2003 May 20
2
Several Basic Questions
Hello, everyone,
I am having several basic questions that I haven't found the answer to from
the manuals:
1. How to remove "[1]" when a single line message is printed?
2. How to print several variables (e.g., a character string and a numeric
variable) at the same line?
3. How to have the control of the accuracy of variables? e.g., in the
following,
> x<-1134567.1
>
2000 Jan 31
1
Feature requests for princomp(.) : Allow cor() specifications
(all in subject).
If I want to do a PC analysis in a situation with missing data,
I may want to have same flexibility as with "cor(.)",
e.g., I may want
      princomp(x, ...,  use.obs = "pairwise.complete")
Actually, I may want even more flexibility.
Currently,
	princomp(.) 
has
    if (cor) 
        cv <- get("cor", envir = .GlobalEnv)(z)
    else cv <-
2013 Jul 05
2
Small fixes needed for Riello driver
On Jul 5, 2013, at 8:45 AM, Elio Parisi wrote:
> But the diff file that I'll now produce is related to the 3857 revision, so is also
> inclusive of previous changes (i.e. BYTE to uint8_t). Is it Ok for you?
I can probably make that work, but in the long term, I would recommend either switching to Git, or if you prefer to stay with SVN, creating a new checkout from the GitHub SVN URL:
2005 Jun 09
1
Subassignments involving NAs in data frames
I'm seeing some inconsistent behavior when re-assigning values in a data
frame. The first assignment turns all of the 0s in my data frame to 2s,
the second fails to do so. 
> df1 <- data.frame(a = c(NA, 0, 3, 4))
> df2 <- data.frame(a = c(NA, 0, 0, 4))
> df1[df1 == 0] <- 2 ## Works
> df2[df2 == 0] <- 2
Error: NAs are not allowed in subscripted assignments
Checking an
2013 Jul 05
0
R: Small fixes needed for Riello driver
But the diff file that I'll now produce is related to the 3857 revision, so is also
inclusive of previous changes (i.e. BYTE to uint8_t). Is it Ok for you?
In alternatively could you modify the row (166 of riello_ser.c) of the file deleting the only cast that exist?
Elio Parisi
Centro Ricerche
RPS SpA
Viale Europa, 7
37045 Legnago VR
Tel. +39 0442 635811 Fax. +39 0442 635934
Skype Id: 
2009 Aug 04
0
Inconsistencies in missing names of a list?
Hi,
I would like to discuss whether the following behaviour in lists is 
indeed intended:
###################################################
 > sessionInfo()
R version 2.10.0 Under development (unstable) (2009-07-21 r48968)
i386-pc-mingw32
locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252  [3] 
LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                  [5] 
2013 Jul 05
2
Small fixes needed for Riello driver
On Jul 5, 2013, at 5:44 AM, Elio Parisi wrote:
> I tried to update sources (to eliminate the cast) with 'sudo svn update' but the response is:
> 
> svn: No repository found in 'svn://svn.debian.org/nut/trunk'
> 
> Can you verify svn server status?
> 
> The code has been tested before and after the changes.
The SVN server has been decommissioned as part of the
2004 Sep 03
1
Different Index behaviors of Array and Matrix
Dear all,
 
I found a difference between the indexing of an array and that of a matrix when there are NA's in the index array. The screen copy is as follows. 
 
> A <- array(NA, dim=6)
> A
[1] NA NA NA NA NA NA
> idx <- c(1,NA,NA,4,5,6)
> B <- c(10,20,30,40,50,60)
> A[idx] <- B
> A
[1] 10 NA NA 40 50 60
> AA <- matrix(NA,6,1)
> AA
     [,1]
[1,]   NA
[2,]
2023 Dec 02
1
Small inconsistencies in configure checks
Hi,
JFYI. I am not sure it's worth reporting but, when building 2.5.5 for ALT
I noticed small inconsistencies in configure output.
1. xapian-binding:
  checking for /usr/bin/rdoc... no
  checking for rdoc... /usr/bin/rdoc
Looks curious but no problem since it's found anyway.
2. xapian-core when built with GCC:
  checking whether __builtin_add_overflow is declared... yes
  ...