Displaying 20 results from an estimated 7000 matches similar to: "update() can not find objects (PR#1861)"
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
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
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 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 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
2007 May 17
1
use loop or use apply?
Hi,
I have two matrices, A (axd) and B (bxd). I want to get another matrix C (axb)
such that, C[i,j] is the Euclidean distance between the ith row of A and jth
row of B. In general, I can say that C[i,j] = some.function (A[i,], B[j,]).
What is the best method for doing so? (assume a < b)
I have been doing some exploration myself: Consider the following function:
get.f, in which,
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 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
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
2002 Jun 28
2
writing a R package
Dear Sir/Madam,
I am trying to write a R package and I found what has been said in the
"Writing R Extensions" is mostly different from what has been done in the
existing packages. For example, in MASS package, there is no *.Rd files nor
*.rd files. There is an R-ex directory, which has all the .R files, which
should be in the R directory according to the manual. Supprisingly, in the R
2006 Aug 09
3
objects and environments
Dear list,
I have two functions created in the same environment, fun1 and fun2.
fun2 is called by fun1, but fun2 should use an object which is created in fun1
fun1 <- function(x) {
ifelse(somecondition, bb <- "o", bb <- "*")
## mymatrix is created, then
myresult <- apply(mymatrix, 1, fun2)
}
fun2 <- function(idx) {
if (bb == "o) {
#
2011 Apr 07
2
Two functions as parametrs of a function.
Hi R users:
I'm trying to make a function where two of the parameters are
functions, but I don't know how to put each set of parameters for
each function.
What am I missing?
I try this code:
f2<-function(n=2,nsim=100,fun1=rnorm,par1=list(),fun2=rnorm,par2=list()){
force(fun1)
force(fun2)
force(n)
p1<-unlist(par1)
p2<-unlist(par2)
force(p1)
force(p2)
2012 Nov 08
5
map two names into one
Thanks.
Yes. Your approach can identify:
Glaxy ace S 5830 and
S 5830 Glaxy ace
But you can not identify using same program:
Iphone 4S 16 G
Iphone 4S 16G
How should I solve both in same time.
Kind regards,Tammy
[[alternative HTML version deleted]]
2004 Mar 25
1
mlocal/mtrace inside a loop
Hello
I need some help in figuring Bravington’s debugger
out.
Ok
I have 2 functions, fun1 and fun2 saved in a ASCII
file say filename is funs.
Fun1 has a loop which calls fun2, fun2 has a loop
which fails and I need to find out the value of the
variables of the fun2 and fun1 loops at the specific
iteration that fails. Both fun1 and fun2 loops will
iterate thousands of times so line by line debug
2009 Oct 01
1
pass "..." to multiple sub-functions
Dear list,
I know I have seen this discussed before but I haven't been successful
in searching for "ellipsis", "dots", "..." in the archives. I would
like to filter "..." arguments according to their name, and dispatch
them to two sub-functions, say fun1 and fun2. I looked at lm() but it
seemed more complicated than I need as it modifies the calling
2012 Aug 30
1
How to modify the values of the parameters passing via ...
Dear Friends,
Let's assume there are three parameters that were passed into fun1. In
fun1, we need to modify one para but the remains need to be untouched. And
then all parameters were passed into fun2. However, I have failed to
achieve it.
Please see the following code.
##########################################
fun1 <-function(x, y, z=10) {x+y+z;}
fun2 <-function(aa, ...) {
2012 Nov 20
2
correct function formation in R
Dear list!
?
I have question of?'correct function formation'. Which function (fun1 or fun2; see below) is written more correctly? Using ''structure'' as output or creating empty ''data.frame'' and then transform it as output? (fun1 and fun1 is just for illustration).
?
Thanks a lot, OV
?
code:
input <- data.frame(x1 = rnorm(20), x2 = rnorm(20), x3 =
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]]
2014 Jan 25
1
package NAMESPACE question
Hello,
I'm building a package. My code is stored in foo.R. This code has two
functions FUN1 and FUN2. FUN1 calls FUN2. FUN1 is listed in export() under
the package NAMESPACE but NOT FUN2. After building the package when I call
FUN1 is giving me an error that cannot find FUN2.
I solved this by adding FUN2 in the export() NAMESPACE. However, what is
puzzling me is that I have other examples