Displaying 20 results from an estimated 1000 matches similar to: "fold right - recursive list (vector) operators"
2010 Jan 05
4
solving cubic/quartic equations non-iteratively
To R-helpers,
R offers the polyroot function for solving mentioned equations
iteratively.
However, Dr Math and Mathworld (and other places) show in detail how to
solve mentioned equations non-iteratively.
Do implementations for R that are non-iterative and that solve mentioned
equations exists?
Regards, Mads Jeppe
2008 Dec 09
0
[LLVMdev] Using ReST for documentation
WikiFormatting for code documentation? :-)
-scooter
On Tue, Dec 9, 2008 at 7:56 AM, Mikhail Glushenkov <foldr at codedgers.com>wrote:
> [Chris asked me to bring this up on the mailing list some time
> ago, but I couldn't get to it. Sorry for that.]
>
> Since the beginning, I used ReST [1] for documenting llvmc, instead of
> plain HTML that was used historically. In my
2002 Oct 09
5
polynomial
Any better (more efficient, built-in) ideas for computing
coef[1]+coef[2]*x+coef[3]*x^2+ ...
than
polynom <- function(coef,x) {
n <- length(coef)
sum(coef*apply(matrix(c(rep(x,n),seq(0,n-1)),ncol=2),1,function(z)z[1]^z[2]))
}
?
Ben
--
318 Carr Hall bolker at zoo.ufl.edu
Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker
2005 Oct 11
1
User auth-groups vs Win2k ADS Problems
Hello Everyone
This samba server was working perfectly without problems.
Running as an Domain member vs Win2K ADS
One day it stopped working. All that happened 5 days ago was a change of the
administrator/root password
We adjusted the wbinfo -set-auth-user towards the new password. But nothing
have worked since.
install:/ # wbinfo -V
Version 3.0.13-1.1-SUSE
What might be wrong
2009 Jan 19
0
[LLVMdev] Criticism of garbage collection support in LLVM
And the followup:
http://lhc-compiler.blogspot.com/2009/01/why-llvm-probably-wont-replace-c.html
On Sat, Jan 17, 2009 at 1:18 PM, Mikhail Glushenkov <foldr at codedgers.com> wrote:
>
> This may be of interest:
>
> http://lhc-compiler.blogspot.com/2009/01/case-against-cllvm.html
>
> People implementing a new Haskell compiler explain why LLVM is an
> unsuitable target
2011 Apr 22
3
[LLVMdev] LLVMC plugin setup changed?
Hi,
I am trying to build my own llvmc plugin, but somehow, the llvm
makefiles do not pick up the plugin in the llvmc/plugins directory
anymore in a recent (r129445) svn checkout.
According to the tutorial (http://llvm.org/docs/CompilerDriverTutorial.html):
$ cd tools/llvmc
$ cp -r example/Simple plugins/Simple
$ make LLVMC_BASED_DRIVER_NAME=mygcc LLVMC_BUILTIN_PLUGINS=Simple
does not build
2005 Mar 03
2
Putting different colors on labels in plot (hclust)
Hi All R-helpers
This is my first (but probartly not last ;-) mail to R-help, so hello to everybody.
My problem: Is there a way to give colors to the labels (sample labels) in plots for a hclust object for better visualization?
I have looked through plot, points, hclust and more but cannot find anything on label color. Anybody know if this is doable?
Best regards Jeppe
2011 Feb 09
1
rimage package fftw breaks when freeing memory on openSUSE 11.3
Upon fresh installation of R-patched and rimage on openSUSE 11.3 box,
simple fftw on renown lena image cause memory free failure.
Quick: Go to the end of this mail and read the error message from R
Thoruogh: Find detailed step-by-step how sopprt library fftw2 was
installed and how rimage was installed.
Regards Mads Jeppe
VERSIONS
========
openSUSE
--------
# cat /etc/SuSE-release
2005 Oct 12
2
Samba vs ADS problems
Hello Everyone
This samba server was working perfectly without problems.
Running as an Domain member vs Win2K ADS
One day it stopped working? All that happened 5 days ago was a change of
the administrator/root password
We adjusted the wbinfo ?set-auth-user towards the new password. But
nothing have worked since.
install:/ # wbinfo -V
Version 3.0.13-1.1-SUSE
What might be wrong when the following
2004 Sep 29
2
Approximate a f(x,y)
Hi all,
Running simulations, I'm generating market response to 2 factors X&Y..
There is no closed form for the market response.. The results are store in a
matrix Z(X <- seq(.02,.98,.02), Y <- seq(.01,.19,.01))..
For optmization purpose I need to approximate the values for any factor X in
0,02-0,98 and Y in 0,01-0,19
How can I do it ?
For one factor : Xn-1 < x <= Xn
2004 Apr 07
1
eigenvalues for a sparse matrix
Hi,
I have the following problem. It has two parts.
1. I need to calculate the stationary probabilities of a Markov chain,
eg if the transition matrix is P, I need x such that
xP = x
in other words, the left eigenvectors of P which have an eigenvalue of
one.
Currently I am using eigen(t(P)) and then pick out the vectors I need.
However, this seems to be an overkill (I only need a single
2003 Apr 02
8
lm with an arbitrary number of terms
Hello folks,
Any ideas how to do this?
data.frame is a data frame with column names "x1",...,"xn"
y is a response variable of length dim(data.frame)[1]
I want to write a function
function(y, data.frame){
lm(y~x1+...+xn)
}
This would be easy if n was always the same.
If n is arbitrary how could I feed the x1+...+xn terms into lm(response~terms)?
Thanks
Richard
--
Dr.
2011 Mar 25
4
read.xls -> rotate data.frame
Hi to all,
how could I to rotate automatically a data sheet which was imported by
read.xls?
x1 x2 x3 .... xn
y1 1 4 7 ... xn/y1
y2 2 5 8 .... xn/y2
y3 3 6 9 ....xn/y2
yn ... ... ... Xn/Yn
to
y1 y2 y3 .... yn
x1 1 2 3 ..... Yn/x1
x2 4 5 6 .... Yn/x2
x3 7 8 9 .... Yn/x2
xn ... ... ... ..... Yn/xn
Kind regards Knut
2004 Jul 19
10
How to compare X1 = X2 = ... = Xn?
Dear All,
I have a data frame with n columns: X1, X2, ., Xn. Now I want to create a
new column: if X1 = X2 = . = Xn, the value is 1; Otherwise, the value is 0.
How to do that in a quick way instead of doing (n choose 2) comparisons?
Thank you,
Frank
[[alternative HTML version deleted]]
2017 Dec 03
5
Rcpp, dyn.load and C++ problems
Hi,
I have written a small C++ function and compile it.
However in R I can't see the function I have defined in C++.
I have read some web-pages about Rcpp and C++ but it is a bit confusion
for me.
Anyway,
This is the C++-code:
#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
List compute_values_cpp(int totalPoints = 1e5, double angle_increment =
0.01, int radius =
2006 Jul 13
3
How do I pass parameters to my program when using WINE?
Hello,
I'm trying to figure out the proper way of passing parameters to my program
that is being run by WINE. I've been trying different things I've found in
Google, but none have seemed to work yet. The parameters work in a Windows
environment, so I do believe the program is okay. This is on a SUSE/SLES 9
machine using WINE .917. If I want to pass the parameter
2012 Oct 11
3
Formatting data for bootstrapping for confidence intervals
Hi all,
New to R, so this may be obvious to some.
I've been trying to figure this out for a while, I have a dataset "events"
that looks something like this:
Area NAME DATE X Xn Y
1 X 1/10/10 1 1 0
1 Y 1/11/10 0 0 1
1 X 1/12/10 1 0 0
1 X 1/12/10 1 0 0
1 X 1/12/10 1 0 0
2 X 2/12/10 1 1 0
2012 Jul 03
1
integral with error:non-finite function value
Hi guys,
I'm trying to use the the integral function to estimate the area under a
PDF and a crossing curve. first I stated the function with several vectors
in it:
fn=function(a,b,F,mu,alpha,xi)
{
x<-vector()
fs<-function(x)
{
c <- (mu+(alpha*(1-(1-F)^xi)/xi))
tmp <- (1 + (xi * (x - mu))/alpha)
((as.numeric(tmp > 0) * (tmp^(-1/xi - 1) *
2015 Jul 28
2
all.equal: possible mismatch between behaviour and documentation
Dear all,
The documentation for `all.equal.numeric` says
Numerical comparisons for ?scale = NULL? (the default) are done by
first computing the mean absolute difference of the two numerical
vectors. If this is smaller than ?tolerance? or not finite,
absolute differences are used, otherwise relative differences
scaled by the mean absolute difference.
But the actual behaviour
2009 Dec 15
1
Help in R
Hello,
Can anyone give me some suggestion in term of calculating the sum below.
Is there a function in R that can help doing it faster?
x1, x2, ...xn where xi can be 0 or 1. I want to calculate the following:
sum{ beta[a+sum(xi), b+n-sum(xi) ]* [ (1-x1)dnorm(0,1)+x1dnorm(2,1) ]* [
(1-x2)dnorm(0,1)+x2dnorm(2,1) ]* ...* [ (1-xn)dnorm(0,1)+xndnorm(2,1) ] }
The sum in the beginning is over all