Displaying 20 results from an estimated 400 matches similar to: "formula error inside function"
2008 May 23
1
Shared Library Error
Can anyone help me resolve this? A part of the R function looks like this:
print(is.loaded('merge_xtabs_patterns_file'))
print(is.loaded('merge_xtabs_patterns_file_'))
.Fortran('merge_xtabs_patterns_file_',ydim[1],ydim[2],x=as.integer(as.matrix(y)),na=as.integer(c),
maxD=as.integer(maxD),lrowmem=length(rowmem),rowmem=as.integer(rowmem),
2010 Jan 11
1
K-means recluster data with given cluster centers
K-means recluster data with given cluster centers
Dear R user,
I have several large data sets. Over time additional new data sets will be created.
I want to cluster all the data in a similar/ identical way with the k-means algorithm.
With the first data set I will find my cluster centers and save the cluster centers to a file [1].
This first data set is huge, it is guarantied that cluster
2003 Oct 30
3
Change in 'solve' for r-patched
The solve function in r-patched has been changed so that it applies a
tolerance when using Lapack routines to calculate the inverse of a
matrix or to solve a system of linear equations. A tolerance has
always been used with the Linpack routines but not with the Lapack
routines in versions 1.7.x and 1.8.0. (You can use the optional
argument tol = 0 to override this check for computational
2005 Aug 16
4
as.character and a formula
Dear list,
given this formula:
> fmla <- formula(y1 ~ spp1 + spp2 + spp3 + spp5)
> fmla[[3]]
spp1 + spp2 + spp3 + spp5
is this the intended behaviour of as.character:
> as.character(fmla[[3]])
[1] "+" "spp1 + spp2 + spp3" "spp5"
? Where does the extra "+" come from?
> as.character(fmla)
[1] "~"
2005 Jul 01
1
scope argument in step function
Thanks a lot for help in advance. I am switching from matlab to R and I guess I need some time to get rolling. I was wondering why this code :
> fit.0 <- lm( Response ~ 1, data = ds3)
> step(fit.0,scope=list(upper=~.,lower=~1),data=ds3)
Start: AIC= -32.66
Response ~ 1
Call:
lm(formula = Response ~ 1, data = ds3)
Coefficients:
(Intercept)
1.301
is not working
2012 Feb 28
2
update.formula has 512 char buffer?
Hello,
I am trying to "paste" together a formula to use in the mob function of
party. This means the formula will be of the form y ~ x1+ ...+xM | z1+..zN.
I am doing some preliminary fits of y ~ x1+ ...+xM, then want to add the
conditional part of the equation using update().
Here's the test code:
var1 <- 1:78
x1 <- paste("x", var1, sep="")
f1 <-
2004 Jun 11
1
bug or correct behaviour ?
This is the general outline of my code::
main(argc,argv){
...
Rf_initEmbeddedR(argc,argv);
...
Test_tryEval("source(test.r)");
...
}
#############
# test.r
#############
...
dyn.load("toload.so")
tmp <-matrix(data=1,nrow=narray*2,ncol=nclust)
.Call("Init",tmp,...)
while(...) {
criteria <-feval(tmp)
if (criteria < criteria.min)
2001 Feb 28
2
Automating the job?
Hi!
I just started to use R recently, and would like to ask a help about
automating the job.
I need to use "kmeans" function with my own 300 data files, and wonder if
it's possible to do it automatically. For example,
> library (mva)
> mydata <- read.table ("data1")
> cl <- kmeans(mydata, 5, 20)
and I just need to save "cl" info (i.e. the center
2019 Sep 05
2
ARM vectorized fp16 support
Hi,
I'm trying to compile half precision program for ARM, while it seems
LLVM fails to automatically generate fused-multiply-add instructions
for c += a * b. I'm wondering whether I did something wrong, if not,
is it a missing feature that will be supported later? (I know there're
fp16 FMLA intrinsics though)
Test programs and outputs,
$ clang -O3 -march=armv8.2-a+fp16fml
2003 Oct 02
4
using a string as the formula in rlm
Hi,
I am trying to build a series of rlm models. I have my data frame and
the models will be built using various coulmns of the data frame.
Thus a series of models would be
m1 <- rlm(V1 ~ V2 + V3 + V4, data)
m2 <- rlm(V1 ~ V2 + V5 + V7, data)
m3 <- rlm(V1 ~ V2 + V8 + V9, data)
I would like to automate this. Is it possible to use a string in place
of the formula?
I tried doing:
fmla
2012 Dec 27
2
Bootstrap
Hola, buenas tardes
estoy intentando hacer un bootstrap de un modelo, pero me da el siguiente
error:
"Error in FUN(newX[, i], ...) :
unused argument(s) (list(age = c(33, 47, 49, 56, 60, 64, 64, 66, 68, 69,
71, 71, 72, 73, 74, 75, 75, 76, 78, 81, 83, 83, 36, 43, 46, 47, 49, 49, 51,
51, 52, 52, 53, 54, 54, 54, 55, 56, 56, 57, 57, 58, 58, 58, 58, 59, 59, 60,
61, 62, 63, 64, 65, 65, 66, 66,
2011 Dec 19
1
pls help to print out first row of terms(model) output in example program
Greetings.
I've written a convenience function for multicollinearity diagnosis.
I'd like to report to the user the formula that is used in a
regression. I get output like this:
> mcDiagnose(m1)
[1] "The following auxiliary models are being estimated and returned in a list:"
[1] "`x1` ~ ."
formula(fmla)()
[1] "`x2` ~ ."
I'd like to fill in the period
2019 Sep 05
2
ARM vectorized fp16 support
Thanks for reply. I was using LLVM 8.0. Let me try trunk and will let
you know if it works.
On Wed, Sep 4, 2019 at 11:19 PM Sjoerd Meijer <Sjoerd.Meijer at arm.com> wrote:
>
> Hi,
> Which version of Clang are you using? I do get a "vfma.f16" with a recent trunk build. I haven't looked at older versions and when this landed, but we had an effort to plug the remaining
2007 May 02
0
KS test pvalue estimation using mctest (library truncgof)
Hi,
I'm trying to evaluate a Monte Carlo p-value (using truncgof package) on
a left truncated sample.
>From an empirical sample I've estimated a generalized pareto
distribution parameters (xi, beta, threshold) (I've used fExtremes pkg).
I'm in doubt on what of the following command is the most appropriate:
Let:
x<-sample
t<-threshold
xt<-x[x>t]
xihat<-gpdFit(x,
2007 Sep 27
2
center option of basehaz in survfit
I have a very general question about what the centering option in basehaz does to factors. (basehaz computes the baseline cumulative hazard for a coxph object using the Breslow estimator).
Lets say I'm interested in a survival model with two (dichotomous) factors and a continuous covariate.
Variable Possible Values
Factor1 0 or 1
Factor2 0 or 1
2016 May 13
2
A question about AArch64 Cortex-A57 subtarget definition
Hello everybody,
I'm reading the .td files defining the Cortex-A57 processor,
which is a subtarget of AArch64 target, and there is something
confusing me in the `AArch64SchedA57.td` file.
In the top of `AArch64SchedA57.td`, various processor resource are
defined, as follows
```
def A57UnitB : ProcResource<1>; // Type B micro-ops
def A57UnitI : ProcResource<2>; // Type
2008 Aug 29
1
nls() fails on a simple exponential fit, when lm() gets it right?
Dear R-help,
Here's a simple example of nonlinear curve fitting where nls seems to get
the answer wrong on a very simple exponential fit (my R version 2.7.2).
Look at this code below for a very basic curve fit using nls to fit to (a)
a logarithmic and (b) an exponential curve. I did the fits using
self-start functions and I compared the results with a more simple fit
using a straight lm()
2005 Jul 20
1
aregImpute in Hmisc
Hi,
I have a dataframe ds1.2 - 503 categorial variables
and 1 continuous response variables. I ran aregImpute
to deal with NA's and got the followig error:
> fmla = terms( Response ~ . ,data=ds1.2)
> ds.i = aregImpute(fmla,data=ds1.2)
Error in matrix(as.double(1), nrow = n, ncol = p,
dimnames = list(rnam, :
length of dimnames [2] not equal to array
extent
Could you explain
2003 Mar 02
1
model.frame.default problem in function definition
Could someone point me in the right direction for the following issue:
A function is defined as follows:
tfun <- function(dat)
{
fmla <- as.formula("y~x+z")
dat2 <- dat
mdl <- lm(fmla,dat2)
mdl <- step(mdl)
}
Then the following code
dat <- data.frame(x=1:10,z=1:10,y=(1:10)^2+10*(1:10))
tfun(dat)
generates the output
Start: AIC= 43.67
2006 May 24
1
Problem with pasteing formulas (PR#8897)
Hi,
If I create a formula with say 100 terms and then paste it:
xnam <- paste("x", 1:100, sep="")
fmla <- as.formula(paste("y ~ ", paste(xnam, collapse= "+")))
paste(fmla)
The result seems to cut off everything after the first 500 characters
and gives no warning message.
I have the most recent version of R from the R website and the problem
occurs