Displaying 20 results from an estimated 5000 matches similar to: "unexpected results with higher-order functions and lapply"
2010 Feb 19
3
dot-dot-dot as an actual argument
I could not find any documentation of how dot-dot-dot works when used
as an argument in a function call (rather than as a formal argument in
a definition). I would appreciate some references to the rules
governing situations like:
f1<-function(x,y,...){
? print(x)
}
f2<-function(...){
? f1(...)
}
f2(1,2,3)
In the call above how are the three numbers bound to the individual
formal
2010 Mar 10
1
Trouble with plm in Ubuntu 9
Hello,
Apologies in advance if this is a stupid question. I am running R on Ubuntu
9.
R version 2.9.2 (2009-08-24)
I am trying to work with plm. I think the library is installed, as I can do
> library(plm)
Loading required package: kinship
Loading required package: survival
Loading required package: splines
Loading required package: nlme
Loading required package: lattice
[1] "kinship
2005 Jun 07
3
Icecast RTP support
Hi,
Does Icecast has RTP support for streaming OGG/Vorbis and OGG/theora
media files?
If so, then please give me some pointers on how to configure my
Icecast server to listen to RTP requests.
If it's not available, then is the inclusion of this feature, in plans
for future release of the product?
Thanks
--
Subhabrata Bhattacharya
2006 Aug 24
1
Need help with difficulty loading page www.bioconductor.org
The page is either too busy, or there is something seriously wrong with
access to this page.
Most of the time, trying to reach www.bioconductor.org results in
failure. Only once in a
blue moon, do I get through.
In fact, thus far, I have not been able to install bioconductor, since
the first source(...)
command from the R command window -- following instruction on
www.bioconductor.org
page,
2012 Mar 23
2
R Error : DATA to MATRIX
Dear Sir/Madam,
I'm getting a problem with a R-code which converts a data frame to a matrix.
It first generate a (m^(n-m) * m) matrix A and then regenerate another
matrix B having less dimension than A which satisfy some condition. Now I
wish to assign each row of B to a vector as individual.
My problem is when I set any choice of (n,m) except m=1 it works fine but
setting m=1 I got the
2012 Jun 01
1
R Error : Error in vector("list", gamma(n + 1)) : vector size specified is too large
Dear R-listers,
I am giving part of my R code :
###########################################################
n=15
m=1
library("partitions")
library("gregmisc")
library("combinat")
x = t(restrictedparts(n-m,m))
l = length(x[,1])
for(u in 1:l){
A= unique(matrix( unlist(permn(x[u,])), ncol=m, byrow=TRUE ))
}
2005 Jun 16
2
Icecast and ezstream
Hi,
What is the actual functionality of ezstream when I use it with
Icecast?What does it exactly do?
Why isn't Icecast written to read a file directly and stream it?
--
~$ubh
2006 Mar 01
1
Scheduler Parameters
Hi,
I have a naive question with the xen BVT scheduler.
Supposing I have only one guest domain runnning on domain 0 and with
the xm bvt command I have allocated cpu units in the ratio 9:1 to
domain 0 and domain 1(say) respectively.
Now I create another guest domain. How much CPU share it (or
subsequent domains created after it) will get?
~$ubh
_______________________________________________
2011 Oct 24
0
Problem with calling an user defined R function from Java
Dear All,
I am facing a problem in calling an user defined R function from Java
through JRI. The user defined R function does a loess normalization on micro
array data ( find in the limma package of BioConductor) and the last 2 lines
of the R Code is :
MA <- normalizeWithinArrays(RG, method="loess")
return(MA$A) # where MA$A is the column A of MA.
Now while calling it in Java, I
2005 Jun 27
0
Xen installation from source
Hi,
I am facing the following problems while installing xen from its
source.Ihave compiled
linux-2.6.11.10 with the option ARCH=xen.I had been fiddling with the
various configuration to boot up the kernel but its not working anyway.
When I compiled the kernel with the following option as built-in
[*] Root file system on NFS
I get the following error:
Root-NFS: No NFS server available, giving
2005 Jun 07
0
Icecast RTP support
On 6/7/05, Subhabrata Bhattacharya <subh.arya@gmail.com> wrote:
> Hi,
>
> Does Icecast has RTP support for streaming OGG/Vorbis and OGG/theora
> media files?
Not in the current version. It may be added in the relatively distant
future, but there's nobody workingon it at the moment.
Mike
2008 Feb 07
0
Help w/ density() usage
Dear All,
(this msg is a statistics/computing question to the list)
I'm trying to implement a modern-version of a (classic) "several-step protocol" in Fishery Biology (due to Bhattacharya, 1967): analysis of length-frequency distribution of fish larvae to id cohorts and later estimate growh rates!
I've trouble with the 1st step: using kernel density estimation (KDE) function
2016 Nov 16
0
Announcing new package horseshoe
Dear R users,
The first version of the package ?horseshoe' is now available on CRAN. It contains various functions for implementing the horseshoe prior for sparse linear regression, and faster versions for the special case of the normal means problem.
The functions output, among other things, the horseshoe estimator (posterior mean), credible intervals, and there is a function to perform
2016 Nov 16
0
Announcing new package horseshoe
Dear R users,
The first version of the package ?horseshoe' is now available on CRAN. It contains various functions for implementing the horseshoe prior for sparse linear regression, and faster versions for the special case of the normal means problem.
The functions output, among other things, the horseshoe estimator (posterior mean), credible intervals, and there is a function to perform
2011 Oct 20
1
R code Error : Hybrid Censored Weibull Distribution
Dear Sir/madam,
I'm getting a problem with a R-code which calculate Fisher Information
Matrix for Hybrid Censored Weibull Distribution. My problem is that:
when I take weibull(scale=1,shape=2) { i.e shape>1} I got my desired
result but when I take weibull(scale=1,shape=0.5) { i.e shape<1} it gives
error : Error in integrate(int2, lower = 0, upper = t) : the integral is
probably
2003 Aug 04
0
Higher Order Correlation function
Dear R Helpers!
Is the Higher Order Correlation function already programmed in
R I couldn't find it?
Much appreciated,
Sergei Petrov
2011 May 10
0
Which higher-order function
Would it be appropriate to add a Which higher-order function?
Which <- function(f, x) {
ind <- vapply(x, f, logical(1))
!is.na(ind) & ind
}
Then Filter would be:
Filter <- function(f, x) x[Which(f, x)]
I think the use of vapply is slightly better than the current
as.logical(sapply(x, f)) because it will return a more informative
error message if the predicate doesn't
2011 Apr 27
1
matrix of higher order differences
Is there an easy way to turn a vector of length n into an n by n matrix, in
which the diagonal equals the vector, the first off diagonal equals the
first order differences, the second... etc. I.e. to do this more
efficiently:
diffmatrix <- function(x){
n <- length(x);
M <- diag(x);
for(i in 1:(n-1)){
differences <- diff(x, dif=i);
for(j in 1:length(differences)){
M[j,i+j]
2013 Apr 17
2
remove higher order interaction terms
Dear all,
Consider the model below:
> x <- lm(mpg ~ cyl * disp * hp * drat, mtcars)
> summary(x)
Call:
lm(formula = mpg ~ cyl * disp * hp * drat, data = mtcars)
Residuals:
Min 1Q Median 3Q Max
-3.5725 -0.6603 0.0108 1.1017 2.6956
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.070e+03 3.856e+02 2.776 0.01350 *
cyl
2006 Nov 07
1
Gregexpr - extract results with lapply
Gregexpr - extract results with lapply
Hello,
I need to extract sequences of three upper case letters in a string. In
other words, in this string:
str <-c("ABC", "this WOUld be gOOD")
The result I'm looking for is ABC WOU OOD.
With gregexpr, I can get the position and length of the sequences
gregexpr('[A-Z]{3}',str,perl=TRUE)
[[1]]
[1] 1