Displaying 20 results from an estimated 40000 matches similar to: "stumped by eval"
2007 Feb 10
1
how to eval subset?
Hi,
I have problems with subset when calling a function from inside a function
from inside a function. Here is a small example to be called as 'f1()'.
'eval()' in f3 fails with error message
Error in eval(expr, envir, enclos) : object "subs" not found
Is it possible to supplement subset to data, to be calculated in a
different environment than the data itself?
Thanks
2005 Jan 24
2
using eval() with pre-built expression inside function
I'm trying to evaluate a pre-built expression using eval(), e.g.
dataset <- data.frame(y = runif(30, 50,100), x = gl(5, 6))
# one like this
mf <- expression(model.frame(y~x))
eval(mf, dataset, parent.frame())
# rather than this
eval(expression(model.frame(y~x)), dataset, parent.frame())
In the example above there is no problem, the problem comes when I try to do a similar thing
2007 Feb 14
2
[LLVMdev] Linux/ppc backend
Hi Chris,
Chris Lattner wrote:
>> 2) Line 369 of PPCInstrInfo.td, we declare the non-callee saved registers.
>> However, Linux and Darwin do not have the same set
>> of non-callee saved registers. I don't know how to make the if(isDarwin) test
>> in here
>>
>
> Take a look at ARM/ARMRegisterInfo.td for an example of this
I tried to define Defs just
2007 Mar 27
3
Use of 'defineVar' and 'install' in .Call
Dear all,
[system and version information below]
I am trying to modify a C function for finding the root of an
expression. The function is to be called from R as .Call with input
parameters:
f: expression for which we will find the root
guesses: interval for the solution
stol: tolerance
rho: environment
The original functions I use are:
SEXP mkans(double x) {
SEXP ans;
PROTECT(ans =
2007 Mar 27
3
Use of 'defineVar' and 'install' in .Call
Dear all,
[system and version information below]
I am trying to modify a C function for finding the root of an
expression. The function is to be called from R as .Call with input
parameters:
f: expression for which we will find the root
guesses: interval for the solution
stol: tolerance
rho: environment
The original functions I use are:
SEXP mkans(double x) {
SEXP ans;
PROTECT(ans =
2012 Jul 11
2
[LLVMdev] [NVPTX] llc -march=nvptx64 -mcpu=sm_20 generates invalid zero align for device function params
Hello,
FYI, this is a bug http://llvm.org/bugs/show_bug.cgi?id=13324
When compiling the following code for sm_20, func params are by some reason
given with .align 0, which is invalid. Problem does not occur if compiled
for sm_10.
> cat test.ll
; ModuleID = '__kernelgen_main_module'
target datalayout = "e-p:64:64-i64:64:64-f64:64:64-n1:8:16:32:64"
target triple =
2009 Aug 08
2
Problem using model.frame with argument subset in own function
Dear List,
I am writing a formula method for a function in a package I maintain. I
want the method to return a data.frame that potentially only contains
some of the variables in 'data', as specified by the formula.
The problem I am having is in writing the function and wrapping it
around model.frame. Consider the following data frame:
dat <- data.frame(A = runif(10), B = runif(10), C
2015 Jan 16
1
S3 generic method dispatch on promises
Dear R friends
I wanted a function to make a simple percent table that would be easy for
students to use. The goal originally was to have a simple thing people
would call like this
pctable(rowvar, colvar, data)
and the things "rowvar" and "colvar" might be names of variables in data. I
wanted to avoid the usage of "with" (as we now see in the table help).
Then
2007 Mar 09
1
Applying some equations over all unique combinations of 4 variables
#I have a data set that looks like this. A bit more
complicated actually with
# three factor levels but these calculations need to
be done on one factor at a
#I then have a set of different rates that are applied
#to it.
#dataset
cata <- c( 1,1,6,1,1,2)
catb <- c( 1,2,3,4,5,6)
doga <- c(3,5,3,6,4, 0)
data1 <- data.frame(cata, catb, doga)
rm(cata,catb,doga)
data1
# start rates
#
2010 Mar 01
1
integration function
Hi all,
I have some problem regarding the integration function. Can any one
take a look at the following and give me some help? Thank you in advance!
Hannah
## f0 is a function of r,x, and y
f0 <- function(r, x, y){
pnorm((x-sqrt(r)*y)/sqrt(1-r), mean=0,sd=1, lower.tail=T)^2*dnorm(y)
}
## f1 is the function of r and x after integrating out y
f1 <- function(r,x)
2011 Jul 30
0
[LLVMdev] "Cannot select" error in 2.9
> > -----Original Message-----
> > From: Rotem, Nadav [mailto:nadav.rotem at intel.com]
> > Sent: Saturday, July 30, 2011 6:51 AM
> > To: Gregory Junker
> > Subject: RE: [LLVMdev] "Cannot select" error in 2.9
> >
> > Can you reduce the test with bug-point ? Does it work on ToT ?
>
> Hi Nadav
>
> I'm not sure what those are --
2000 Apr 28
3
L(x,y,t)?
I have been using the following method to create L(x,t)
x<-seq(1,66)
time<-seq(1,19)
v0<-.01
f0<-function(x,time) .45*cos(2*pi*3*x/66+v0*time)
L0<-outer(x,time,f0)
If I do image(L0) I get an x,t plot of a drifting cosine wave grating.
The grating is actually a pattern of fuzzy bars; I have been ignoring the
y dimension (because the grating is vertical: y has no effect on the
2000 Aug 05
1
Problem reading in table with extra spaces
I wrote with C and created a file that I can read into S+, but R chokes
because I've got multiple spaces between some variables and there is a
space at the start of each data line. This happens becuase C was
right-justifying the numbers as it printed them out. It looks like
this:
T Run Seed IntAct Change f0 f0T0 f0T1 f0T2 average0 variance0
relentropy0 f1 f1T0 f1T1 f1T2 average1 variance1
2018 Sep 28
3
error: expected memory with 32-bit signed offset
Hi,
I want to encode Loongson ISA initially
https://gist.github.com/xiangzhai/8ae6966e2f02a94e180dd16ff1cd60ac
gslbx $2,0($3,$4)
It is equivalent to:
dadd $1, $3, $4
lb $2,0($1)
I just use mem_simmptr as the default value of DAGOperand MO ,
because MipsMemAsmOperand use parseMemOperand to parse general
MemOffset and only *one* AnyRegister , for example:
0($1)
But
2012 Jan 31
4
[LLVMdev] (MC) Register parsing for AsmParser (standalone assembler)
I'm trying to build a standalone assembler for Mips using AsmParser.
Following the lead of X86, ARM and MBlaze I have run tblgen -gen-asm-matcher on Mips.td to produce tables and methods to aid the parser (MipsAsmParser.cpp) which is a stripped down ARM implementation.
I am getting an assertion for what I believe are multiple register definitions with the same name.
llvm-tblgen:
2005 Aug 12
6
evaluating string variables
Hello!!!
I have a folder (C:/R/) with matrix files, named by number, i.e.
0.mat, 1.mat,...,1250.mat. In this case, they are 5x5 simetric
matrices. I would like to compute a property for each matrix and put
calculated values into a data frame for posterior ploting and
printing. Below there is an example for 7 matrices (0.mat..6.mat)
#define data frame
L <- data.frame(frame=numeric(7),
2006 Dec 13
1
Curious finding in MASS:::confint.glm() tied to eval()
Greetings all,
I was in the process of creating a function to generate profile
likelihood confidence intervals for a proportion using a binomial glm.
This is a component of a larger function to generate and plot confidence
intervals for proportions using the above, along with bootstrap (BCa),
Wilson and Exact to visually demonstrate the variation across the
methods to some folks.
I had initially
2007 Feb 02
0
[LLVMdev] Linux/ppc backend
On Fri, 2 Feb 2007, Nicolas Geoffray wrote:
> I have almost completed the implementation of a linux/ppc backend in llvm.
Cool!
> There were a few things to modify in
> lib/Target/PowerPC with a lot of "if (!isDarwin)".
Some meta comments:
1. Please don't change PPC -> llvmPPC. I assume that you did this because
PPC is a #define in some system header. Please
2013 Apr 03
1
ploting several functions on the same plot
I want to superimpose two functions plots in the same page. The functions L0
and L1, defined below
f0 <- function(mu, xm, ds, n) {
1 - pnorm((xm-mu)/(ds/sqrt(n)))
}
f1 <- function(mu,n) f0(mu, 386.8, 48, n)
L0 <- function(mu) f1(mu, 36)
plot(L0,ylim=c(0,1),xlim=c(360,420))
L1 <- function(mu) f1(mu,100)
lines(L1)
The plot of L0 works pretty well. However, when
2013 Apr 04
1
Plotting several functions in the same display (again)
To superimpose two functions plots in the same page. The functions L0
and L1, as defined below, I use the following code:
# An accumulative normal distribution function with
# several parametres
f0 <- function(mu, xm, ds, n) {
1 - pnorm((xm-mu)/(ds/sqrt(n)))
}
f1 <- function(mu,n) f0(mu, 386.8, 48, n)
# Two functions with just the parameter mu
L0 <- function(mu)