Displaying 20 results from an estimated 1000 matches similar to: "An introduction to R (PR#1426)"
2002 Apr 01
3
svd, La.svd (PR#1427)
(I tried to send this earlier, but it doesnt seem to have come through,
due to
problems on my system)
Hola:
Both cannot be correct:
> m <- matrix(1:4, 2)
> svd(m)
$d
[1] 5.4649857 0.3659662
$u
[,1] [,2]
[1,] -0.5760484 -0.8174156
[2,] -0.8174156 0.5760484
$v
[,1] [,2]
[1,] -0.4045536 0.9145143
[2,] -0.9145143 -0.4045536
> La.svd(m)
$d
[1]
2002 Aug 28
2
Package foreign
....in example
data <- read.spss("c:/data.sav",use.value.label=F,to.data.frame=T)
try help(read.spss) !
regards,christian
kjetilh at umsanet.edu.bo schrieb am 28.08.02 02:08:39:
> Hola!
>
> Can the foreign package now read data from spss 10?
>
> Kjetil Halvorsen
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help
2002 Jan 07
3
cluster - clusplot.default (PR#1249)
The following code in clusplot.default (package cluster) is in error:
x1 <- cmdscale(x, k = 2, eig = TRUE)
var.dec <- sum(x1$eig)/sum(diag(x1$x))
if (var.dec < 0)
var.dec <- 0
if (var.dec > 1)
var.dec <- 1
x1 <- x1$points
x1 has components with names "points" and "eig", not "x", so
2001 Oct 26
3
warnings --- wish/bug (PR#1148)
When R prints warnings, they often go "out of the line", it would be
better if they where wrapped with
writeLines(strwrap ...
I tried to do that , changing the function warnings, but it has only
effect when called explicitely, not when R prints the warnings unasked.
Anyhow, here is the changed warnings:
warnings <-
function (...)
{
if (!(n <- length(last.warning)))
2010 Oct 11
1
MATLAB vrs. R
I need to find the area under a trapezoid for a research-related project. I was able to find the area under the trapezoid in MATLAB using the code:
function [int] = myquadrature(f,a,b)
% user-defined quadrature function
% integrate data f from x=a to x=b assuming f is equally spaced over the interval
% use type
% determine number of data points
npts = prod(size(f));
nint = npts -1; %number of
2013 Jan 26
1
[LLVMdev] MCJIT/interpreter and iostream
As of LLVM 3.2, is it possible to use iostream with the MCJIT or interpreter execution engines? I'm getting some errors...
Each of these commands correctly prints "hello":
echo -e '#include <stdio.h>\nint main(){ printf("hello"); }' | clang -cc1 -emit-llvm-bc -x c++ | lli -use-mcjit
echo -e '#include <iostream>\nint main(){ std::cout <<
2005 Aug 24
1
histogram method for S4 class.
Hi,
I'm trying to develop an histogram method for a class called "FLQuant"
which is used by the package FLCore (http://flr-project.org). FLQuant is
an extension to "array". There is an as.data.frame method that coerces
flquant into a data.frame suitable for lattice plotting. The problem is
that when I coerce the object and plot it after it works but if the
method is
2005 Aug 24
1
histogram method for S4 class.
Hi,
I'm trying to develop an histogram method for a class called "FLQuant"
which is used by the package FLCore (http://flr-project.org). FLQuant is
an extension to "array". There is an as.data.frame method that coerces
flquant into a data.frame suitable for lattice plotting. The problem is
that when I coerce the object and plot it after it works but if the
method is
2002 Mar 14
1
Row-binding factor variables looses the ordered attribute.
Hi everyone,
I've just notice a problem with ordered factor variables. It appears
that row-binding two ordered factors together looses the ordered
attribute. The following example happens both in R1.3.1 and R1.4.1 (on
RedHat 7.2):
> y <- ordered(gl(3,6),labels=1:3)
> y
[1] 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3
Levels: 1 < 2 < 3
> data <-
2006 Mar 13
2
Error Message from Variogram.lme Example
When I try to run the example from Variogram with an lme object, I get
an error (although summary works):
R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.2.1 (2005-12-20 r36812)
ISBN 3-900051-07-0
...
> fm1 <- lme(weight ~ Time * Diet, BodyWeight, ~ Time | Rat)
Error: couldn't find function "lme"
> Variogram(fm1, form = ~ Time | Rat, nint =
2001 Sep 27
2
on.exit
Hola!
look at the following:
> test <- function() {
+ options(warn=-1)
+ on.exit( options(warn=0))
+ log(-1)
+ }
> test()
[1] NaN
but what should be better, doesnt work:
> test1 <- function() {
+ oldwarn <- options("warn")
+ options(warn=-1)
+ on.exit( options(warn=oldwarn))
+ log(-1)
+ }
> test1()
Error in options(...) : warn parameter
2002 Apr 29
3
Organizing the help files in a package
Dear all!!
I am using R1.4.1 on windows 98.
I had been trying to organize the package and has already been able to
document some of the functions in to .Rd (R documentation) files. From these
.Rd files I generated plain text files as well as html files.
I have also given the 00Index file in each of the directories:
html/
help/
data/
man/
Problem: I don't get the help using comand
2008 May 15
1
lattice histogram problem with integers values and nint
been puzzling over this for a day.
Summary
integer variable to use with histogram, 170,000 rows. Value is day of
year. Hist works, lattice histogram with nint does not work (spurious
spikes in display), lattice histogram using breaks=c(0:365) works
fine. Spike values appear to be sum of two adjacent bins. Want to
know if this is a familiar problem, and what the recommended
work-around is.
2002 Apr 16
2
multiple plot devices
Hello,
sorry but i found no way or help to work
with multiple graph devices (Rdocs,SearchIndex).
When is use the function only the graphic device of the last variable is open.
How is it possible to let the several plot-device open or save this in a file with different names ?
(win 2000 - R1.4.1)
thanks for advance
& regards,Christian
normal <- function(x) {
par(mfrow=c(2,2))
2002 Dec 02
1
Monte Carlo chisq test
Dear all,
I have a question about the chisq.test command. As an option one can
chose the computation of p-values by Monte-Carlo simulation
(simulate.p.value=T). Is there any documentation available how this
calculations are done and how this simulation based test behaves in
small samples?
Thanks
Klaus Abberger
University of Konstanz, Germany
[[alternate HTML version deleted]]
2002 Dec 04
1
documentation bug in (ctest) chisq.test (PR#2346)
chisq.test with simulate.p.value=TRUE uses the Patefield algorithm, this
is not documented, and the original reference is not given, as it ought
to be. The reference is:
Patefield,W. M. (1981) An efficient method of generating r * c tables
with given row and column totals (algorithm AS 159). Applied Statistics
30, 91-97.
Kjetil Halvorsen
2010 Oct 08
1
Trapezoid Rule
Dear R Users,
I've never used R before and my professor has asked us to do some
pretty intense programming (or it's intense to me at least). Here is
the question: Modify the function myquadrature inside the script so
that it returns the quadrature of descrete data using the trapezoidal
rule. Modify the call to the function at the bottom of the script so
that is uses your modifies
2010 Oct 13
1
Lattice: arbitrary abline in multiple histograms
Dear list.
I have three histograms and I want to add a vertical abline in a different
place in each plot. The next example will plot a vertical line at x=5.5 in
the three plots:
rnorm(100,5,3) -> A
rnorm(100,7,3) -> B
rnorm(100,4,1) -> C
rep(c("A","B","C"),each=100) -> grp
data.frame(G=grp,D=c(A,B,C)) -> data
histogram(~ D | G, data=data,
2002 Mar 29
1
memory error with rpart()
Dear all,
I have a 100 iteration loop. Within each loop, there are some calls
to rpart() like:
ctl <- rpart.control(maxcompete=0, maxsurrogate=0, maxdepth=10)
temp <- rpart(y~., x, w=wt, method="class", parms=list(split="gini"),
control=ctl)
res <- log(predict.rpart(temp, type="prob"))
newres <- log(predict.rpart(temp, newdata=newx,
2002 Apr 25
1
Rdbi package and PgSQL
I can use the Rdbi package to connect to a PostGreSQL server fine but
when I use the dbDisconnect(), I get a segmentation error and it throws
me out of R. I'm using RH7.2, R1.4.1, Rdbi 0.1-2, and Rdbi.PgSQL 0.1-2.
Anyone else seen anything like this and have an possible answer?
Andrew Schuh
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing