Displaying 20 results from an estimated 24 matches for "psum".
Did you mean:
csum
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
I realise that + is already like psum, but what about NA?
x+y
[1] 3 NA NA 6 # can't supply `na.rm=TRUE` to `+`
Is there a case to add psum? Or...
2002 Dec 12
4
sum a list of vectors
In Mathematica there is a neat feature, where you can change the head of a list from "list" to say "+" and obtain a sum of the list elements.
I can't find a way to sum a list of vectors of same length or list of matrices of the same dimension and was curious if something like that exists in R. do.call("+",list) doesn't work because "+" accepts only
2008 Nov 26
1
Finding Stopping time
...code,
alpha <- 0.05
beta <- 0.07
a <- log((1-beta)/alpha)
b <- log(beta/(1-alpha))
theta1 <- 2
theta2 <- 3
cumsm<-function(n)
{y<-NULL
for(i in 1:n)
{y[i]=x[i]^2}
s=sum(y)
return(s)
}
psum <- function(p,q)
{z <- NULL
for(l in p:q)
{ z[l-p+1] <- x[l]^2}
ps <- sum(z)
return(ps)
}
smm <- NULL
sm <- NULL
N <- NULL
Nout <- NULL
T <- NULL
k<-0
x <- rnorm(100,th...
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
2007 Feb 08
3
Get categories where forum-user posted in
I''m developing a system similar to the ForumExample (http://
wiki.rubyonrails.org/rails/pages/ForumExample), and stumbled upon the
following.
Let''s say I wanted to get all the categories a certain user posted in.
How do I get that information withouth using a custom query
through :finder_sql (and thus losing the find_in_collection ownage)?
It would also be great to see how many
2008 Sep 09
1
survey package
Version 3.9 of the survey package is now on CRAN. Since the last
announcement (version 3.6-11, about a year ago) the main changes are
- Database-backed survey objects: the data can live in a SQLite (or other
DBI-compatible) database and be loaded as needed.
- Ordinal logistic regression
- Support for the 'mitools' package and multiply-imputed data
- Conditioning plots,
2008 Sep 09
1
survey package
Version 3.9 of the survey package is now on CRAN. Since the last
announcement (version 3.6-11, about a year ago) the main changes are
- Database-backed survey objects: the data can live in a SQLite (or other
DBI-compatible) database and be loaded as needed.
- Ordinal logistic regression
- Support for the 'mitools' package and multiply-imputed data
- Conditioning plots,
1998 Oct 16
3
mean and sd of each serial position
I want to do something like this in R. If I have three vectors
> a1
[1] 1 2 3
> a2
[1] 4 5 6
> a3
[1] 9 10 7
I want to compute
1. A vector that is the mean at each serial position of a1, a2, and a3.
so in this example it would have the contents
4.667, 5.667, 5.333333
2. A vector that is the SD at each serial position of a1, a2, and a3.
so in this example it would have the contents
2002 Apr 02
2
Trouble with R and cronjobs
...t appears that my DISPLAY environmental variable is not
set. Is that necessary, even when the output of the plot command is to a png
file? Can someone tell me how to fix this?
Thanks, Don
C-SHELL FILE:
#!/usr/bin/csh
source /u/dstierma/.cshrc
env
# /u/dstierma/bin/prbdata_bylot.pl
# /u/pesoft/bin/psums -lotlist -fab=3 -dbase=Y16A -30 >!
/u1yedh2/dstierma/probe/corr/Y16A.30
# /u/pesoft/bin/fabx @/u1yedh2/dstierma/probe/corr/Y16A.30 -fxt -sep='_'
-step=/3010-50 DUV PHOTO/ -ci~/%MACHINE%/ -exceldate -csv >!
/u1yedh2/dstierma/probe/corr/50duv.fxt
# /u/dstierma/bin/mergecsv2.pl 7 /u1yed...
2020 Apr 24
0
R 4.0.0 is released
...entation of grid units has changed, but the
only visible effects at user-level should be
* a slightly different print format for some units (especially
unit arithmetic),
* faster performance (for unit operations) and
* two new functions unitType() and unit.psum().
Based on code contributed by Thomas Lin Pedersen.
* When internal dispatch for rep.int() and rep_len() fails, there
is an attempt to dispatch on the equivalent call to rep().
* Object .Machine now contains new longdouble.* entries (when R
uses long doubles internally...
2020 Apr 24
0
R 4.0.0 is released
...entation of grid units has changed, but the
only visible effects at user-level should be
* a slightly different print format for some units (especially
unit arithmetic),
* faster performance (for unit operations) and
* two new functions unitType() and unit.psum().
Based on code contributed by Thomas Lin Pedersen.
* When internal dispatch for rep.int() and rep_len() fails, there
is an attempt to dispatch on the equivalent call to rep().
* Object .Machine now contains new longdouble.* entries (when R
uses long doubles internally...
2020 Apr 24
0
R 4.0.0 is released
...entation of grid units has changed, but the
only visible effects at user-level should be
* a slightly different print format for some units (especially
unit arithmetic),
* faster performance (for unit operations) and
* two new functions unitType() and unit.psum().
Based on code contributed by Thomas Lin Pedersen.
* When internal dispatch for rep.int() and rep_len() fails, there
is an attempt to dispatch on the equivalent call to rep().
* Object .Machine now contains new longdouble.* entries (when R
uses long doubles internally...
2009 Mar 09
5
Help
...((1-beta)/alpha)
> b <- log(beta/(1-alpha))
> theta1 <- 2
> theta2 <- 3
>
> cumsm<-function(n)
> {y<-NULL
> for(i in 1:n)
> {y[i]=x[i]^2}
> s=sum(y)
> return(s)
> }
> psum <- function(p,q)
> {z <- NULL
> for(l in p:q)
> { z[l-p+1] <- x[l]^2}
> ps <- sum(z)
> return(ps)
> }
> smm <- NULL
> sm <- NULL
> N <- NULL
> Nout <- NUL...
2015 Feb 04
0
[RFC PATCH v2] armv7(float): Optimize encode usecase using NE10 library
...st x"$rtcd_support" != x"no"],[
diff --git a/src/analysis.c b/src/analysis.c
index 2ee8533..e04b282 100644
--- a/src/analysis.c
+++ b/src/analysis.c
@@ -189,7 +189,7 @@ void tonality_get_info(TonalityAnalysisState *tonal, AnalysisInfo *info_out, int
info_out->music_prob = psum;
}
-static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt_mode, const void *x, int len, int offset, int c1, int c2, int C, int lsb_depth, downmix_func downmix)
+static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt_mode, const void *x, int le...
2015 Mar 03
0
[RFC PATCHv3] armv7(float): Optimize encode usecase using NE10 library
...st x"$rtcd_support" != x"no"],[
diff --git a/src/analysis.c b/src/analysis.c
index 2ee8533..e04b282 100644
--- a/src/analysis.c
+++ b/src/analysis.c
@@ -189,7 +189,7 @@ void tonality_get_info(TonalityAnalysisState *tonal, AnalysisInfo *info_out, int
info_out->music_prob = psum;
}
-static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt_mode, const void *x, int len, int offset, int c1, int c2, int C, int lsb_depth, downmix_func downmix)
+static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt_mode, const void *x, int le...
2015 May 08
0
[[RFC PATCH v2]: Ne10 fft fixed and previous 1/8] armv7(float): Optimize encode usecase using NE10 library
...st x"$rtcd_support" != x"no"],[
diff --git a/src/analysis.c b/src/analysis.c
index 2ee8533..e04b282 100644
--- a/src/analysis.c
+++ b/src/analysis.c
@@ -189,7 +189,7 @@ void tonality_get_info(TonalityAnalysisState *tonal, AnalysisInfo *info_out, int
info_out->music_prob = psum;
}
-static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt_mode, const void *x, int len, int offset, int c1, int c2, int C, int lsb_depth, downmix_func downmix)
+static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt_mode, const void *x, int le...
2015 Mar 03
1
[RFC PATCH v4] Enable optimize using libNe10
Changes from RFC PATCH v3
- Just rebased on tip
- For all else, please see notes from RFC PATCH v3 at
http://lists.xiph.org/pipermail/opus/2015-March/002902.html
- latest wip opus tree/branch
https://git.linaro.org/people/viswanath.puttagunta/Ne10.git
branch: rfcv4_final_fft_ne10
Viswanath Puttagunta (1):
armv7(float): Optimize encode usecase using NE10 library
Makefile.am
2015 Feb 04
4
[RFC PATCH v2] Encode optimize using libNe10
Changes from RFC PATCH v1:
- passing arch parameter explicitly
- reduced stack usage by ~3.5K by using scaled NE10 fft version
- moved all optimization array functions to arm_celt_map.c
- Other cleanups pointed out by Timothy
Phil,
As you mentioned earlier, could you please address all
compile and linker errors/warnings coming out of Ne10 library?
You can find my working Ne10 repo at [1]
You
2015 Mar 03
2
[RFC PATCHv3] Encode optimize using libNe10
Changes from RFC PATCH v2
- fixed compile issue when just compiling for --enable-intrinsics
for ARMv7 without NE10
- Notes for NE10:
- All compile/link warnings are now in upstream NE10
- Only patch pending upstream in NE10 is the one that
needs to add -funsafe-math-optimizations for ARMv7
targets.
- Phil Wang @ ARM is working on getting this fixed.
- Note that even without
2015 Mar 18
5
[RFC PATCH v1 0/4] Enable aarch64 intrinsics/Ne10
Hi All,
Since I continue to base my work on top of Jonathan's patch,
and my previous Ne10 fft/ifft/mdct_forward/backward patches,
I thought it would be better to just post all new patches
as a patch series. Please let me know if anyone disagrees
with this approach.
You can see wip branch of all latest patches at
https://git.linaro.org/people/viswanath.puttagunta/opus.git
Branch: