Displaying 20 results from an estimated 2000 matches similar to: "Inconsistencies in subassignment with NA index. (PR#7210)"
2004 Sep 04
1
Inconsistencies in subassignment (PR#7210)
I have made the 3-d case do the same as the vector case, which is what the
C code clearly intended (a goto label was in the wrong place).
This leaves the bigger question of the right thing to do. I note that data
frames give an error when any indices are NA.
-thomas
On Fri, 3 Sep 2004 ripley@stats.ox.ac.uk wrote:
> Apart from the inconsistencies, there are two clear bugs here:
>
> 1)
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,]
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)
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 Apr 07
3
New window for plot()
Hi,
Can anybody tell me how to open new a new window for plot()? Thanks.
Minghua
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 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 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 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 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
>
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 10
3
A Question on lowess() function
Hi, all,
I want to use lowess(x, y) where x and y are vectors of length of 4000+. In
fact, x and y are log of some vectors. So, some of the elements are NaN.
lowess() can not take away those elements then do the fitting. It will give
the error message and do nothing.
1. Can anybody tell me how to get rid of those NaN's and use lowess()?
2. How to get the LOWESS fitting values for any
2004 Aug 25
5
How to Arrange character vector in alphabetic order
Hi,
Is there any function that can arrange a character in alphabetic order? Thanks for answer
-MY
[[alternative HTML version deleted]]
2004 Aug 20
3
How generate "A01", "A02", ..., "A99"?
Hi,
Anyone can tell me how to generate "A01", "A02", ..., "A99"?
paste("A", 1:99, sep="") generates "A1", "A2",..., "A99". This is not what I want.
Thanks for the help.
-MY
[[alternative HTML version deleted]]
2003 Apr 21
2
How to assigen column of matrix
Hi,
A simple question.
I want to assign values to columns (or rows) of a matrix.
It seems that
AA[,i]<-A; # A is a vector or array;
doesn't work.
How can I accomplish that?
Thanks alot.
-MY
2003 Aug 06
3
How to copy and paste a R plot onto Word (or Power Point)
All,
Anybody can tell how to export a R plot onto Word (or Power Point)?
Many thanks in advance.
-MY
2012 Dec 20
2
how to read different files into different objects in one time?
Dear All
I have a lot of files in a directory as follows:
"02-03.txt" "03-04.txt" "04-05.txt" "05-06.txt" "06-07.txt"
"07-08.txt" "08-09.txt"
"09-10.txt" "G0.txt" "G1.txt" "raw_ped.txt"
..........................
I want to read them into different objects according
2009 Jun 04
5
Problem installing RCS on SXCE
I was shocked to find no RCS on SXCE 107. I needed it to update some
RCS archives I had copied over.
No problem - go to sunfreeware and copy it over. No OpenSolaris branch?
The Solaris 10 package should work.
Only the package install appears to complete and does not - as
documented only in a log file, not on my screen.
OK then, the source for RCS should be easily compiled and installed, I
2013 Mar 06
1
Transpose a big data file and write to a new file
Dear all:
I have a big data file of 60000 columns and 60000 rows like that:
AA AC AA AA .......AT
CC CC CT CT.......TC
..........................
.........................
I want to transpose it and the output is a new like that
AA CC ............
AC CC............
AA CT.............
AA CT.........
....................
....................
AT TC.............
The keypoint is I can't read