Displaying 20 results from an estimated 10000 matches similar to: "Conditional cumulative sum"
2015 Jul 16
3
[LLVMdev] why LoopUnswitch pass does not constant fold conditional branch and merge blocks
Hi,
I have a general question on LoopUnswtich pass.
Consider the following IR snippet:
define i32 @test(i1 %cond) {
br label %loop_begin
loop_begin:
br i1 %cond, label %loop_body, label %loop_exit
loop_body:
br label %do_something
do_something:
call void @some_func() noreturn nounwind
br label %loop_begin
loop_exit:
ret i32 0
}
declare void @some_func() noreturn
After running
2007 Dec 04
2
Multiple stacked barplots on the same graph?
Dear R-Users,
I would like to know whether it is possible to draw several
stacked barplots (i.e. side by side on the same sheet)...
my data look like :
Cond1 Cond1' Cond2 Cond2'
Compartment 1 11,81 2,05 12,49 0,70
Compartment 2 10,51 1,98 13,56 0,85
Compartment 3 1,95 0,63 2,81 0,22
Compartment 4 2,08 0,17
2013 Nov 08
1
[LLVMdev] loop vectorizer and storing to uniform addresses
I changed the input C to using a 64 bit type for the loop index (this
eliminates 'sext' instructions in the IR)
Here the IR produced with clang -O0
define float @foo(i64 %start, i64 %end, float* %A) #0 {
entry:
%start.addr = alloca i64, align 8
%end.addr = alloca i64, align 8
%A.addr = alloca float*, align 8
%sum = alloca [4 x float], align 16
%i = alloca i64, align 8
2017 Jul 24
5
Ifelse statements and combining columns
Hi everyone,
I'm having some trouble with my ifelse statements.
I'm trying to put 12 conditions within 3 groups. Here is the code I have so
far:
dat$cond <- ifelse(test = dat$cond == "cond1" | dat$cond == "cond2" |
dat$cond == "cond3" dat$cond == "cond4"
yes = "Uniform"
no = ifelse(test =
2015 Apr 24
5
[LLVMdev] Loss of precision with very large branch weights
In PR 22718, we are looking at issues with long running applications
producing non-representative frequencies. For example, in these two loops:
int g = 0;
__attribute__((noinline)) void bar() {
g++;
}
extern int printf(const char*, ...);
int main()
{
int i, j, k;
for (i = 0; i < 1000000; i++)
bar();
printf ("g = %d\n", g);
g = 0;
for (i = 0; i < 500000; i++)
2017 Jul 24
0
Ifelse statements and combining columns
Not a reproducible example, so a bit of guessing here, but
a) don't try to assign results to variables inside the ifelse. That is, remove all the single-equals signs and "test" variables. If you really need to conditionally assign variables then use "if"... but chances are good you don't need that.
b) "closure" is effectively another word
2014 Jan 18
6
My first package
Hi All,
I'm planning to submit my first package to R, and although I read all the
documentation, I'm not very clear on the following 2 items, from which I'd
appreciate your guidance:
1)I understand it is suggested to use the R dev version to build the
package. Which one specifically should I use to build a package on a Mac
OS? How about package dependencies, which version should I
2013 Nov 08
3
[LLVMdev] loop vectorizer and storing to uniform addresses
I am trying my luck on this global reduction kernel:
float foo( int start , int end , float * A )
{
float sum[4] = {0.,0.,0.,0.};
for (int i = start ; i < end ; ++i ) {
for (int q = 0 ; q < 4 ; ++q )
sum[q] += A[i*4+q];
}
return sum[0]+sum[1]+sum[2]+sum[3];
}
LV: Checking a loop in "foo"
LV: Found a loop: for.cond1
LV: Found an induction variable.
LV: We
2016 Apr 01
3
TensorFlow in R
Hi All,
I didn't have much success through my Google search in finding any active
R-related projects to create a wrapper around TensorFlow in R. Anyone know
if this is on the go?
Thanks,
Axel.
[[alternative HTML version deleted]]
2016 Apr 01
3
TensorFlow in R
Hi All,
I didn't have much success through my Google search in finding any active
R-related projects to create a wrapper around TensorFlow in R. Anyone know
if this is on the go?
Thanks,
Axel.
[[alternative HTML version deleted]]
2011 Feb 26
2
Reproducibility issue in gbm (32 vs 64 bit)
Dear List,
The gbm package on Win 7 produces different results for the
relative importance of input variables in R 32-bit relative to R 64-bit. Any
idea why? Any idea which one is correct?
Based on this example, it looks like the relative importance of 2 perfectly
correlated predictors is "diluted" by half in 32-bit, whereas in 64-bit, one
of these predictors gets all the importance
2013 Feb 10
3
Constrained Optimization in R (alabama)
Dear List,
I'm trying to solve this simple optimization problem in R. The parameters
are the exponents to the matrix mm. The constraints specify that each row
of the parameter matrix should sum to 1 and their product to 0. I don't
understand why the constraints are not satisfied at the solution. I must be
misinterpreting how to specify the constrains somehow.
library(alabama)
ff <-
2010 Feb 21
4
R on 64-Bit…
Dear R users,
I know this issue came up in the list several times. I’m currently running
R on 32-bit on Windows and due to memory limitation problems would like to
move to a 64-bit environment. I’m exploring my options and would appreciate
your expertise:
1) Windows 64-bit: Prof. Brian Ripley recently posted the experimental
built of R for win 64-bit. I’ll appreciate any feedback on
2009 Aug 24
4
Is there a fast way to do several hundred thousand ANOVA tests?
Dear R users,
I have a matrix a and a classification vector b such that
> str(a)
num [1:50, 1:800000]
and
> str(b)
Factor w/ 3 levels "cond1","cond2","cond3"
I'd like to do an anova on all 800000 columns and record the F statistic for
each test; I currently do this using
f.stat.vec <- numeric(length(a[1,])
for (i in 1:length(a[1,]) {
f.test.frame
2017 Sep 21
3
Add wrapper to Shiny in R package
Dear List,
I'm trying to add a function that calls a Shiny App in my R package. The
issue is that within my function, I'm creating objects that I'd like to
pass to the app. For instance, from the example below, I'm getting
"Error: object
'xs' not found". How can I pass "xs" explicitly to shinyApp()?
*Under R directory:*
myApp <- function(x, ...) {
2010 Mar 14
7
R on Linux - a primer
Hi,
I'm looking to move from Windows into a 64-bit Linux environment. Which is
the best Linux Flavor to use within R? To install R on this environment, do
I need to do any compiling?
Thanks all!
Axel.
[[alternative HTML version deleted]]
2017 Sep 21
0
Add wrapper to Shiny in R package
Dear Axel,
I've used environment for such problems.
assign("xs", xs, envir = my.env) in the myApp function
get("xs", envir = my.env) in the server function
Best regards,
ir. Thierry Onkelinx
Statisticus/ Statiscian
Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE
AND FOREST
Team Biometrie &
2017 Sep 08
2
quote()/eval() question
Dear list,
For a reason it would take me long to explain, I need to do something along
the lines of what's shown below -- i.e., create an object from
dplyr::summarise, and then evaluate it on a data frame.
I know I could directly do:
df %>% dplyr::summarise(x1_mean = mean(x1))
but this is not what I'm looking for.
library(dplyr)
df <- data.frame(x1 = rnorm(100), x2 =
2011 Mar 17
2
Help with Time Series Plot
Dear List,
This is an embarrassing question, but I can seem to make this work…How do I
change the font size on the xlab and on the numbers shown in the x-axis on
the time series plot below. The arguments cex.lab and cex.axis do not seem
to be 'passing' to the plot function.
plot(ts(rnorm(100), start=2004, freq=12),
ylab="RQI", xlab="My X lab",
2017 Sep 17
2
Shiny App inside R Package
Dear List,
I have a wrapper function that creates a Shiny App, as illustrated below.
I'd like to include the function myApp() inside a package. I'd appreciate
your guidance here, as I could not find good instructions on this online.
myApp <- function(x) {
require(shiny)
shinyApp(
ui = fluidPage(
sidebarLayout(
sidebarPanel(sliderInput("n",