Displaying 20 results from an estimated 9000 matches similar to: "How to assigen column of matrix"
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
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 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 16
2
Local parameter calculation
Dear all,
I am a newbie in R. I encounter a problem as follows.
I have 2 vectors X and Y that have a equal length of several thousand. I see
Y as the function of X. Both of them are random. X is not arrranged in any
order. Of course, I do plot(X,Y). Now, I want to use a sliding narrow window
to run over each X, then calculate the variances within that window.
Anyone knows easy way in R to do
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 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 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 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]]
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 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
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
2004 Feb 16
4
Questions about Matrix
How to Generate the Matrix (t+1)*m ?
(0-1)^n (0-2)^n ,,,, (0-m)^n
(1-1)^n (1-2)^n ,,,, (1-m)^n
(2-1)^n (2-2)^n ,,,, (2-m)^n
.. ... ,,,, .......
(t-1)^n (t-2)^n ,,,, (t-m)^n
Appreciate your kindly help!
---------------------------------
[[alternative HTML version deleted]]
2003 Oct 07
2
Sorting matrix or data frame
Dear all,
Could anyone please tell me how to sort a matrix or a data frame against a
column/row/component?
Many thanks.
-MY
2003 Apr 04
2
sqlSave() Question
All,
I am new in R. I found sqlSave() doesn't work for our Oracle9i. The
following was the message:
> sqlSave(channel, USArrests, rownames="state")
Error in sqlColumns(channel, tablename) : USArrests : table not found on
channel
Check case parameter in odbcConnect
>
sqlQuery() works OK.
Please help. Thanks.
-MY
2002 Nov 24
3
Using XEmacs and ESS with R for MS/Windows
I've been working on a document describing the use of XEmacs and ESS with R
for Windows users, along with configuration files that are meant to make
things simple for Windows users. This was initially intended for my
students, but with recent discussions of Windows (and other) editors on the
the R-help list, I thought that I'd make the material more widely available.
The document
2002 Nov 24
3
Using XEmacs and ESS with R for MS/Windows
I've been working on a document describing the use of XEmacs and ESS with R
for Windows users, along with configuration files that are meant to make
things simple for Windows users. This was initially intended for my
students, but with recent discussions of Windows (and other) editors on the
the R-help list, I thought that I'd make the material more widely available.
The document
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
2003 Feb 26
5
[Package car/data.ellipse]: confidence intervals off by factor sqrt(2)??? (PR#2584)
Full_Name: Volker Franz
Version: Version 1.6.2 (2003-01-10)
OS: Debian
Submission from: (NULL) (192.124.28.104)
Hi there,
it seems to me that data.ellipse of package "car" (Version 1.0-1)
produces confidence interval's which are too big. To see this, do:
library(car)
plot(c(-2,2),c(-2,2),pch=0)
data.ellipse(rnorm(10000),rnorm(10000),levels=0.68,plot.points=F)
abline(v=+1)
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;
2002 Nov 06
6
how to update installed packages to a new version of R?
I've just installed R 1.6.1 and would like to install all the
contributed packages I had used in 1.5.1.
It's not too hard to do this manually from Rgui, but I wondered if there
is an easier way,
something like writing the results of installed.packages() from 1.5.1 to
a file and
using that with install.packages() in 1.6.1, or just having 1.6.1 read
what's in rw151/library.
--