Displaying 20 results from an estimated 1000 matches similar to: "use loop or use apply?"
2020 May 02
1
issues with environment handling in model.frame()
Dear all,
model.frame behaves in a way I don't expect when both its formula and
subset argument are passed through a function call.
This works as expected:
model.frame(~wool, warpbreaks, breaks < 15)
#> wool
#> 14 A
#> 23 A
#> 29 B
#> 50 B
fun1 <- function(y) model.frame(~wool, warpbreaks, y)
fun1(with(warpbreaks, breaks < 15))
#> wool
#> 14
2011 Nov 23
2
How to increase precision to handle very low P-values
Hello, Rlisters
I have to compute p-values that are on the tail of the distribution,
P-values < 10^-20.
However, my current implementations enable one to estimate P-values up to
10^-12, or so.
A typical example is found below, where t is my critical value.
########### example - code adapted from Rassoc #######################
rho01 = 0.5
rho105 = 0.5
rho005 = 0.5
t = 8
z = 2
2002 Aug 01
6
update() can not find objects (PR#1861)
Full_Name: Yi-Xiong Zhou
Version: 1.5.1
OS: win2000pro
Submission from: (NULL) (64.169.249.42)
Update() can not find objects when it is used in a function, which is in turn
being called by another function. Here is a R script to show the problem:
######## begin of the test script ##########
fun1 <- function() {
x <- matrix(rnorm(500), 20,25)
y <- rnorm(20)
oo <- lm(y~x)
2007 Jan 06
1
listing all functions in R
Dear List,
I'm building an R syntax highlighting file for GeSHi [*] for a website I
am currently putting together. The syntax file needs a list of keywords
to highlight. How can I generate a list of all the functions in a base R
installation?
Ideally the list would be formatted like this:
"'fun1', 'fun2', 'fun3'"
when printed to the screen so I can copy
2002 Apr 12
1
Problems with memory
Dear all,
I've started working with R (vs 1041) a few weeks ago, and now I'm
having problems with the amount of memory.
I'm working on the windows-me, my computer has 128 Mb of memory. I'm
using the R under the emacs (ESS-5.1.20) and it is started by the
command:
Rterm --min-vsize=10M --max-vsize=100M --min-nsize=500k --max-nsize=1M
I've been had problems when executing a
2012 Aug 12
3
Error in if-command
Hello everybody,
I don't understand what I'm doing wrong. But it isn't possible that each
element of the if-condition is tested for each vector element?
y <- c(1:20)
> y
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
> if (y == c(4,5,9,11,17)) { print("yes") } else { print("no")}
[1] "no"
warning:
In if (y == c(4, 5, 9, 11,
2012 Nov 11
2
changing the signs in rows or columns in matrices and check them if they are identical
Dear R users,
i have this problem with matrices i want to check between two matrices if they are isomorphic i will give an example for what excactly i want
1 -1 1 -1 1 1
-1 1 -1 1 -1 -1
1 1 -1 1 1 -1
this two matrices are isomorphic beacause if i change the first 2 columns the matrices
2007 Nov 13
2
[LLVMdev] BasicAliasAnalysis and out-of-bound GEP indices
Hi!
While investigating into the PR1782 I spent some time analyzing
BasicAliasAnalysis.cpp. While the mentioned problem should be fixed now
(I hope), I have discovered some other possibilities for a bug to occur.
In the case of checking for aliasing of two pointer values, where at
least one of them is a GEP instruction with out-of-bound indices,
BasicAliasAnalysis can return NoAlias, even if the
2009 Jun 03
0
Problems with conditional importFrom in NAMESPACE
Hi,
I am currently involved in the development of two R-packages, pkg1 and
pkg2. They should not be dependent on each other, as most users will
only be interested in one of them. Still, I want pkg2 to provide one
extra S3 method for three functions (fun1-3) in pkg1 for objects of a
class defined in pkg2 (class2), for those users who actually have both
packages installed.
I think this
2009 Jun 09
0
Dependency between packages for Windows-binaries
Hi,
I have already asked a similar question without response
(https://stat.ethz.ch/pipermail/r-help/2009-June/200300.html) so I am
here reformulating in the hope that someone is able to help. If
something is unclear, please ask.
I am working on the development of two packages, pkg1 and pkg2 (based on
work in two different projects). pkg1 is quite generic, pkg2 tries to
solve a particular
2009 Jun 30
1
Conditional dependency between packages
Hi,
I have already asked a similar question twice without response on the
r-help list https://stat.ethz.ch/pipermail/r-help/2009-June/200300.html
but this list might be more appropriate. If there is a particular reason
for the lacking answers (unclear, missing information, the solution is
obvious to everyone except me, etc), I would like to know. The
description below is generalized, but I
2011 Oct 01
1
error using ddply to generate means
Dear list,
I encounter an error when I try to use ddply to generate means as follows:
fun3<-structure(list(sector = structure(list(gics_sector_name = c("Financials",
"Financials", "Materials", "Materials")), .Names = "gics_sector_name",
row.names = structure(c("UBSN VX Equity",
"LLOY LN Equity", "AI FP Equity",
2020 Apr 22
3
how to add my own passes to LTO pass
Hi,
I have a module pass and I hope to use it to optimize a real-world program.
I need LTO,and I have got LTO plugin.
But How can I add my passes to LTO Pass. I can't find solution.
What should I do?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200422/76d2b046/attachment.html>
2007 Nov 13
0
[LLVMdev] BasicAliasAnalysis and out-of-bound GEP indices
It's an optimization opportunity!
When behavior is undefined, we're free to interpret it to be "whatever
makes optimization easiest." If the two do actually happen to alias,
well, it's the programmer's fault anyways, because they were doing
something undefined!
--Owen
On Nov 13, 2007, at 4:13 PM, Wojciech Matyjewicz wrote:
> Hi!
>
> While investigating
2012 Nov 17
3
transform input argument (matrix) of function
Dear list!
I would like to write a function to transform matrix, which is input argument of a written function. It is easy with new matrix (see below), but my idea is to transform input argument (matrix) of function without any additional matrixes. Here is an example:
fun1 <- function(xy) {
xy <- cbind(xy[,1], xy[,2], xy[,1] + xy[,2])
return(xy)
}
df1 <- matrix(c(1,2,3,1,2,3), ncol =
2011 Apr 09
1
loop and sapply problem, help need
Dear R experts
Sorry for this question
M1 <- 1:10
lcd1 <- c(11, 22, 33, 44, 11, 22, 33, 33, 22, 11)
lcd2 <- c(22, 11, 44, 11, 33, 11, 22, 22, 11, 22)
lcd3 <- c(12, 12, 34, 14, 13, 12, 23, 23, 12, 12)
#generating variables through sampling
pvec <- c("PR1", "PR2", "PR3", "PR4", "PR5", "PR6", "PR7",
2013 Apr 24
3
[LLVMdev] [PROPOSAL] per-function optimization level control
Hello,
We've had a high priority feature request from a number of our customers
to
provide per-function optimization in our Clang/LLVM compiler.
I would be interested in working with the community to implement this.
The idea is to allow the optimization level to be overridden
for specific functions.
The rest of this proposal is organized as follows:
- Section 1. describes this new feature
2011 Aug 03
2
r-help
Hey,
Is there any function plotting several "implicit functions" (F(x,y)=0) on the same fig. Is there anyone who has an example code of how to do this?
The contour3d function in the misc3d package only work with the functions with three dimensions.
Thanks a lot.
Many thanks for your help.
KnifeBoot
[[alternative HTML version deleted]]
2013 Jun 07
4
matched samples, dataframe, panel data
I R-helpers
#I have a data panel of thousands of firms, by year and industry and
#one dummy variable that separates the firms in two categories: 1 if the firm have an auditor; 0 if not
#and another variable the represents the firm dimension (total assets in thousand of euros)
#I need to create two separated samples with the same number os firms where
#one firm in the first have a corresponding
2007 Nov 15
2
[LLVMdev] BasicAliasAnalysis and out-of-bound GEP indices
Sadly, this will break a very common idiom. In GCC, we discovered it
to be common enough that it broke a *bunch* of C code.
In particular, you will break
struct foo {
int a;
char name[0];
}
bar = malloc(sizeof (struct foo) + strlen("thisismyname") + 1);
strcpy(bar->name, "thisismyname");
It only started turning up when we started doing higher level loop
opts and used