Displaying 20 results from an estimated 2000 matches similar to: "sum a list of vectors"
2003 May 09
4
getAttr problem
Hi all,
It seems that getAttr doesn't return "names" attribute properly as in
getAttrib(x, R_NamesSymbol));
If you look at section 4.7.4 in "Writing R Extensions", the second example of
SEXP out(SEXP, SEXP) returns NULL for the names attribute of the
outer product.
This is true for R 1.7.0 on both Win2000 with mingw and Redhat 9.0 with gcc.
Is there something I am
2008 May 07
1
dlm with constant terms
Hi,
I am trying to figure how to use dlm with constant terms
(possibly time-dependent) added to both equations
y_t = c_t + F_t\theta_t + v_t
\theta_t = d_t + G_t\theta_{t-1} + w_t,
in the way that S-PLUS Finmetrics does?
Is there any straightforward way to transform the above to
the default setup?
Thanks,
Tsvetan
--------------------------------------------------------
NOTICE: If received in
2004 May 21
2
RQuantlib ?Windows Binary?
R:
Is there a reason why there isn't a Windows Binary version of RQuantlib on
CRAN? Usually when there is no binary, I just source the source code, but
this one appears to have various calls and methods and things like that so
I'm hesitant to do so. I know there has been a big discussion on why
Rmetrics doesn't have source for unix/linux, but that isn't on CRAN.
Through
2012 Oct 30
4
There is pmin and pmax each taking na.rm, how about psum?
Hi,
Please consider the following :
x = c(1,3,NA,5)
y = c(2,NA,4,1)
min(x,y,na.rm=TRUE) # ok
[1] 1
max(x,y,na.rm=TRUE) # ok
[1] 5
sum(x,y,na.rm=TRUE) # ok
[1] 16
pmin(x,y,na.rm=TRUE) # ok
[1] 1 3 4 1
pmax(x,y,na.rm=TRUE) # ok
[1] 2 3 4 5
psum(x,y,na.rm=TRUE)
[1] 3 3 4 6 # expected result
Error: could not find function "psum" # actual result
2012 Apr 25
1
Using apply() with a function involving ode()
Hello,
I am trying to get the output from the numerical simulation of a system
of ordinary differential equations for a range of values for three
parameters. I am using the ode() function (deSolve package) to run the
numerical simulation and apply() to run the simulation function for each
set of parameter values. I am having trouble getting the apply()
function to work.
Here is an
2002 Jun 12
4
table problems
dear helplist,
my student has fifty trees, numbered one to fifty, and a vector
recording which tree a certain possum slept in on 12 nights.
R> c
[1] 3 14 17 22 26 26 17 40 43 25 46 46
R>
Thus it slept in tree #3 on Monday, then tree #14 on Tues, and so on.
I wish to test the null hypothesis that the animal chooses trees
randomly; try
R> table(c)
c
3 14 17 22 25 26 40 43 46
1 1
2008 Nov 26
1
Finding Stopping time
Can any one help me to solve problem in my code? I am actually trying to
find the stopping index N.
So first I generate random numbers from normals. There is no problem in
finding the first stopping index.
Now I want to find the second stopping index using obeservation starting
from the one after the first stopping index.
E.g. If my first stopping index was 5. I want to set 6th observation from
2003 Jan 21
1
Orders of terms in formulae
Hi,
Given that R reports Type I sums of squares, isn't it a bit anachronistic
that it re-orders terms in formulae?
> d <- expand.grid(y=rnorm(8),
+ A=factor(c(1,2)),
+ B=factor(c(1,2)),
+ C=factor(c(1,2)))
> summary(aov(y ~ A+B+A:B+C,data=d))
Df Sum Sq Mean Sq F value Pr(>F)
A 1 8.294e-34 8.294e-34 1.027e-33 1
2002 Jul 16
2
ANOVA-like tests of geometrically-distributed data
I have a statistical problem which has given me no end of grief recently,
and am posting here in the hope that somebody can give me a straight
answer. I'm a IT postgrad, not a statistician, so people may have to
speak really slowly and clearly for me to get it :)
I am collecting simulation data, and the results are geometrically
distributed (or approximately so). From what I can gather
2012 Apr 19
4
Can't find installed game. Directory doesn't exist at all.
So i downloaded Monkey Island 2 - iso file. I mounted it using terminal with the command:
mount -o loop file/directory/filename.iso /mnt/disk
then i used the command: wine setup.exe
Wine showed up, I browse a directory and the game was installed.
However when i try to find where the game is the directory just doesn't exist. I try in .wine/drive_c/Program Files where it should be , but
2007 Nov 30
2
Quantiles and QQ plots
I have 20 variables:
5,9,6,1,5,9,7,4,5,6,3,2,4,8,9,6,1,8,4,8
How do I calculate the corresponding quantiles from a normal distribution
with the same mean and variance as the sample?
Also, how do I draw a QQ plot of the data?
Thanks for any help!
--
View this message in context: http://www.nabble.com/Quantiles-and-QQ-plots-tf4925742.html#a14097909
Sent from the R help mailing list archive at
2007 Jun 22
3
How to run "mathematica" or "c" programs in R?
I have some programs which were writen in mathematica or c language, but I
donot know how to use these software. So I want to run them in R.
Can I do it ?
How to run "mathematica" or "c" programs in R?
Jian Zhang
[[alternative HTML version deleted]]
2010 Jul 14
3
Mathematica and R
What are some effective ways to leverage the strengths of R and
Mathematica for the analysis of a single data set?
More specifically, are there any functions that can assist with any of
the following?
1. Calling an R function from Mathematica.
2. Calling a Mathematica function from R.
3. Using XML or another reliable data format to pass vectors, matrices,
and/or lists from one environment to
2008 Mar 06
1
Interesting remarks about R back in 1999
Hi, this is not an R-help post, but I found this extract below that was
written by a leading mathematician back in 1999 when he was talking about
statistics and computing. I found it interesting to share and I ask your
opinion do you think this still holds today or things have changed? Thanks.
?...we would also like to mention that in our opinion Mathematica provides
an excellent and indeed
2001 Sep 24
1
Problem with read.table and scan
I have just installed R on a Windows NT system. Unfortunately I am unable
to open any of the data files I wish to work with. I have tried using
read.table and scan and to the best of my knowledge am using the correct
syntax. The error message I receive is
Error in file(file, "r") : cannot open file [file name]
I have the data in text files in white-space delimited form. I put them
2002 Jun 06
1
sampling from data frame
Hello,
after searching through the archives and
not finding a thread that answers this question,
I thought I'd pass it on to the list.
Given a data frame and given a factor variable
that assigns a class to each case in the data frame,
what is the most efficient way to sample
a given number of cases from each class?
I've found a roundabout solution that works as follows:
for each class:
2007 Jul 11
1
RPM Build Question
Hi People,
I have just started building my own RPMS on both Fedora and CentOS and
generally things have gone well. Currently I am trying to create RPMS
for some commercial software that we have purchased.
Step 1 was install the software using its JAVA Based installer
ensuring that all files were installed into a particular directory in
/usr/local.
Step 2 was create a tar file of the
2010 Jul 17
2
re. Mathematica and R
David - information on calling R from within Mathematica can be found at the
following link:
http://www.mofeel.net/1164-comp-soft-sys-math-mathematica/13022.aspx
HTH,
Alan Kelly
2007 Oct 10
2
pt inaccurate when x is close to 0 (PR#9945)
Full_Name: Skylab Gupta
Version: R version 2.5.1 (2007-06-27)
OS: Windows XP
Submission from: (NULL) (216.82.144.137)
Hello,
I have been playing around with the statistical distributions in R. I think the
computations for the cumulative distribution function of the students t
distribution in R are not very accurate.
For instance, the cdf of a students t distribution with 13 degrees of freedom
2006 Mar 24
2
MacOS X Quartz Rendering?
I just tried rendering a plot of 166 data point (time series) on my PPC mac,
and compared it with the same data rendered by Mathematica. The R plotting is
very slow to paint and repaint, compared to Mathematica. This also makes it
extremely awkward to use in other documentation such as pdfLatex.
On closer inspection, it looks like the Mathematica plot is just a polyline,
while in R it is a