Displaying 20 results from an estimated 1500 matches similar to: "C++ <-> R mapping"
2012 Jul 30
6
Convert variable to STring
Dear all,
I have a variable that I would like also to use it as a string. The reasons is that I want to collect results from different function to one table.. So when I use the
colnames(mymatrix) <-c(function1.function2,function3)
the function1, function2, function3 to be "converted" to simple strings so as
colnames(mymatrix)
2012 Feb 09
3
calling the function which is stored in a list
Hi
I'm storing two functions in a list
# creating two function
function1 <- function(n) {
return(sum(n))
}
function2 <- function(n) {
return(mean(n))
}
#storing the function
function3 =c(function1,function2)
is it possible to call the stored function and used it ?
x=c(10,29)
funtion3[1](x)
Thanks
-----
Thanks in Advance
Arun
--
View this message in context:
2008 Apr 22
2
optimization setup
Hi, here comes my problem, say I have the following functions (example case)
#------------------------------------------------------------
function1 <- function (x, theta)
{a <- theta[1] ( 1 - exp(-theta[2]) ) * theta[3] )
b <- x * theta[1] / theta[3]^2
return( list( a = a, b = b )) }
#-----------------------------------------------------------
function2<-function (x, theta)
{P
2006 Apr 17
4
R debugging options
Hello,
What options are available for me to debug my R scripts? For example I
normally do something like
>source("myfunctions.R")
>function1("height", "weight")
myfunctions.R is a large R source file that contains many functions. function1
is the "main" function in myfunctions.R. It calls many other user-written
functions that are also in
2014 Jun 11
3
[LLVMdev] How do clang & clang++ choose function names for LLVM IR?
Hello all,
I'm getting started on a project using LLVM's opt tool to do static
analysis, printing call graphs and such. When compiling C programs to IR
(and eventually to call graphs), function names remain the same (main,
function1, function2 etc.), but when compiling the same program as C++, the
function names often have cruft added to them (_Z9function1v, _Z9function2v
etc.) which
2007 Jun 14
1
Using subset() in a user-defined function
Hello,
I'm having a problem with using subset() inside a function I'm writing.
Ignoring everything else in the function, the problem can be illustrated
by (where master.frame is the data frame I'm using):
function1 <- function(arg1="", arg2="", arg3=""){
temp.frame <- subset(master.frame, a == arg1 & b == arg2 & c ==
arg3)
}
This
2009 Dec 22
1
[LLVMdev] is there a compiler barrier that is effective at codegen level?
Hi,
I would like to prevent that two adjacent calls to external functions getting
interleaved/separated by other neighboring code. This mixing seems to happen
in the code generator. I can prevent it by putting the two calls into a
separate BB, but then I can't use -simplifycfg, -jump-threading, ... as is.
Here is an example:
%160 = add i64 %158, %159 ; <i64>
2008 Feb 20
1
Problem Using the %in% command
Hello all!
I have the following problem with the %in% command:
1) I have a data frame that consists of functions (rows) and genes
(columns). The whole has been loaded with the "read.delim" command
because of gene-duplications between the different rows.
2) Now, there is another data frame that contains all the genes (only
the genes and without duplicates) from all the functions of
2009 Dec 03
2
Error in namespaceExport(ns, exports) :
Dear all,
I get the error
"Error in namespaceExport(ns, exports) :
undefined exports function1 , function2"
when compiling or even when I roxygen my package. The two function I once
had in my package but I deleted them including their .Rd files. I also can't
find them in any other function or help file.
So does anybody know where these functions are still listed that causes
2009 Dec 03
2
Error in namespaceExport(ns, exports) :
Dear all,
I get the error
"Error in namespaceExport(ns, exports) :
undefined exports function1 , function2"
when compiling or even when I roxygen my package. The two function I once
had in my package but I deleted them including their .Rd files. I also can't
find them in any other function or help file.
So does anybody know where these functions are still listed that causes
2008 Mar 19
1
Radio Buttons or similars
Hello companions!!!
I have a function that creates a Radio Buttons, and I need that this
function return the selected value in the Radio Buttons. I would like that,
if somebody know as I could return the value, you say me as do it.
Next, I show the function
function1<-function(){
require(tcltk)
tt <- tktoplevel()
rb1 <- tkradiobutton(tt)
rb2 <- tkradiobutton(tt)
rbValue <-
2012 Oct 05
2
Using variables from different environments in one function
Dear R-community,
I have been experiencing this issue with functions within a function and
I can kind of feel where the problem is (environments, closures etc),
but I don't manage to solve it.
I will sketch it with an example:
#We have two simple "inner" functions:
############## INNER FUNCTION1 #################
innerfunction1<-function()
{
ab<-a+b
2013 Aug 21
1
cyclic namespace dependency detected when loading ...
Hi R users,
I am developing two packages. Each package uses some functions from the
other package. Now when I define these dependencies in the NAMESPACE
file (via importFrom(XXXX,function1,....)), i get this error (when
building one package):
cyclic namespace dependency detected when loading 'XXXXXX', already
loading ?YYYYYYY?, ?XXXXXXXXX?
Is there any way to prevent this error?
2007 Jul 31
1
Getting variable name used in function...
Dear Users,
I am using functions for calculations in my study. I have two functions and one is calling the other two times one after another. But the called function deals with two different data object (matrix, data frame, etc.), so I could not make the second function output data object-free (for example, Ý would like to write csv files but could not give different file names) and I would
2007 Mar 07
1
2 commits - libswfdec/swfdec_script.c test/trace
libswfdec/swfdec_script.c | 14 ++++++++++++--
test/trace/Makefile.am | 2 ++
test/trace/gotoframe.swf |binary
test/trace/gotoframe.swf.trace | 13 +++++++++++++
4 files changed, 27 insertions(+), 2 deletions(-)
New commits:
diff-tree 12348410a3509928a6e8e4c8ca00292a58ff542c (from 46e62d4410c20c19774a45758d8ebf11cd0bdf96)
Author: Benjamin Otte <otte@gnome.org>
2004 Feb 28
2
logististic regression (GLM). How to get 95 pct. confidence limits?
Dear R-list.
I'm doing af logistic analyses using gml.
The model explaines variations in Adverse events infections (0 og 1) using
age as explanatory variable.
model2d<-glm(formula=AEorSAEInfecBac~Age,family=binomial("logit"),data=emrisk)
I want to get predictions with 95% confidence limits for age 30 and age 60.
I've been reading the "google" and "search
2015 Aug 26
2
declaring dependencies of shiny app in inst/
Dear all,
I have a package implementing a shiny app, putting the R code of the app (server.R and ui.R) in inst/... and then having a simple function merely starting the app with something along the lines of:
runApp(system.file("inst/..."))
However, the app itself uses functions from packages which are not used elsewhere in the code. What is the best way to declare these dependencies
2006 Aug 16
7
ActionWebService: XMLRPC Server Multicall possible?
Hi all,
I have a question concerning ActionWebService XMLRPC servers: Is it
possible to send multicall requests to the Web service? I tried to
use multicall and get the error message:
no such method ''system.multicall'' on API [MyAPI]
In Changeset 2021 there is the following commit message:
add ''system.multicall'' support to XML-RPC. boxcarred methods must
2010 May 01
3
Resize Graphics Window
Need way to resize an existing graphics window.
This should be applicable across platforms (as part of a package).
Context: function1() draws main plot (I'm using grid), function2() adds smaller plot
above main plot, but this one can sometimes overflow the original graphics window
area.
Thanks,
Sigal
2000 Nov 15
1
BeOS on PPC compile, thread question.
> In fact I am compiling as C++. Under BeOS, these functions will
> eventually end up inside of a C++ class. So, I'm kind of stuck.
> It's not the end of the world.
Couldn't you just compile the vorbis files as vanilla C, and then implement a thin C++ wrapper if you need to access it that way? There's nothing in BeOS which *requires* code to be C++. Sorry if I'm