Displaying 20 results from an estimated 101 matches for "dum".
Did you mean:
dom
2002 Dec 04
1
using edit.data.frame
dum is a simple data frame transferred to Splus using the dump()
command in Splus and the source() in R. All fields are numeric. There
are no missing data. The data frame looks like it is should:
> apply(dum,2,mode)
yrcl sland s02 s234
"numeric" "numeric" &...
2017 Jan 09
2
problem with print.generic(x)deparse(substitute(x))
Hi, All:
I'm having trouble getting deparse(substitute(x)) inside
print.generic to consistently
I'm having trouble getting a print.something to work
consistently. Consider the following toy example:
# Define an object of class 'dum'
k <- 1
class(k) <- 'dum'
str(k) # as expected
# Define print.dum
print.dum <- function(x, ...)
deparse(substitute(x))
print(k) # Prints "k" as expected
#####**** THE FOLLOWING PRINTS NOTHING:
k # Why?
### Thanks,
### Spencer Graves
sessionInfo()
R version 3....
2017 Jan 09
1
problem with print.generic(x)deparse(substitute(x))
Hi, Peter et al.:
On 2017-01-09 4:24 AM, peter dalgaard wrote:
> On 09 Jan 2017, at 10:53 , Spencer Graves <spencer.graves at prodsyse.com> wrote:
>
>> # Define an object of class 'dum'
>> k <- 1
>> class(k) <- 'dum'
>> str(k) # as expected
>>
>> # Define print.dum
>> print.dum <- function(x, ...)
>> deparse(substitute(x))
>>
>> print(k) # Prints "k" as expected
>> #####**** THE FOLLOWING...
2010 Mar 23
2
Adding matrix rows that have the same name?
...0 0 0
harry 0 0 1 0 0 0
harry 0 0 0 1 0 0
harry 0 0 0 0 1 0
harry 0 0 0 0 0 1
and make it like this? (that is, add together rows that have the same name?)
jim 1 1 1 0 0 0
bob 1 0 1 0 0 0
harry 0 0 1 1 1 1
here's the code I started with, if it helps
library (dummies)
a <- c(1,1,1,2,2,3,3,3,3)
b<- c("A","B","C","A","C","C","D","E","F")
name<- c("jim", "jim", "jim", "bob", "bob", "harry", "harry&q...
2005 Mar 09
2
Question about biasing in sd()???
Hi,
Can anyone help me with the following. I have been using R for Monte
Carlo simulations and got some results I couldn't explain. Therefor I
performed following short test:
--------------
mean.sds <- NULL
sample.sizes <- 3:30
for(N in sample.sizes){
dum <- NULL
for(I in 1:5000){
x <- rnorm(N,0,1)
dum <- c(dum,sd(x))
}
mean.sds<- c(mean.sds,mean(dum))
}
plot(sample.sizes,mean.sds)
--------------
My question is why don't I get 1 as a result from my sd() for small
sample sizes? According to the help, sd() is unbiased, which a...
2011 Mar 16
3
making dataframes
Dear all,
I have a dataframe which looks like this (dummy):
date<-c("jan", "feb", "mar", "apr", "may", "june", "july",
"aug","sep","oct","nov","dec")
col1<-c(8.2,5.4,4.3,4.1,3.1,2.5,1.1,4.5,3.2,1.9,7.8,6.5)
col2<-c(3.1,2.3,4...
2008 Oct 15
1
combining same-day lab measurements with 'apply'
...her, I'll use the dates later with difftime to figure
the subjects' age at the onset of their condition, so I'd like to
avoid converting between classes too much.
Any advice would be greatly appreciated. Here is the code to build
the sample data and the working for loop as well:
> dum <- data.frame(
+ id = c(2,2,2,3,4,4,4,4,5,5),
+ x = sample(15:30,length(id)),
+ date = as.Date(c("12/15/2005","1/13/2006","1/13/2006","4/5/2000","5/23/2003",
+ "7/8/2003","11/30/2003","11/30/2003","...
2017 Jan 09
0
problem with print.generic(x)deparse(substitute(x))
On 09 Jan 2017, at 10:53 , Spencer Graves <spencer.graves at prodsyse.com> wrote:
> # Define an object of class 'dum'
> k <- 1
> class(k) <- 'dum'
> str(k) # as expected
>
> # Define print.dum
> print.dum <- function(x, ...)
> deparse(substitute(x))
>
> print(k) # Prints "k" as expected
> #####**** THE FOLLOWING PRINTS NOTHING:
> k # Why?
Becaus...
2008 Aug 26
1
no output when run densityplot...
...,'_',status,'-','quantile','.png',sep='')
bitmap(file=filename)
qqnorm(x)
qqline(x)
grid()
dev.off()
if (par2 > 0)
{
filename <- paste(server,'_',status,'-','lagplot1','.png',sep='')
bitmap(file=filename)
dum <- cbind(lag(x,k=1),x)
dum
dum1 <- dum[2:length(x),]
dum1
z <- as.data.frame(dum1)
z
title <- paste('Lag plot (k=1), lowess, and regression line for
',server,'[',status,']',sep=' ')
plot(z,main=title)
lines(lowess(z))
abline(lm...
1999 Jul 15
2
S objects to R
I've tried to move objects from S to R.
In S+, I use data.dump() and data.restore().
I've made a file all.dum using
data.dump(ls()) in S+,
but the R command
load("all.dum") gives an error:
> load("/jaz/all.dum")
Error: restore file corrupted -- no data loaded
Is there any way to pass my objects from S+ to R?
Thanks
Agus
Dr. Ag...
2012 Jan 26
2
Quality of fit statistics for NLS?
Dear all,
I am trying to analyze some non-linear data to which I have fit a curve of
the following form:
dum <- nls(y~(A + (B*x)/(C+x)), start = list(A=370,B=100,C=23000))
I am wondering if there is any way to determine meaningful quality of fit
statistics from the nls function?
A summary yields highly significant p-values, but it is my impression that
these are questionable at best given the iterati...
2011 Aug 09
1
Matlab to R
I am trying to convert a matlab code to R.
Most of the conversion statements are simple, but problem is with return.
Since it's a recursive function it's a bit complicated. Anyway in matlab
we can have return statment like
[price, notional] = functionname()
and also for the same function...
notional(1) = functionname()
how to do this in R? i have tried using data frame but still
2006 Oct 27
1
Dum: problem installing (Don't install at all)
I'm on mandriva 2006
I did:
urpmi R-2.0.0-1mdk.i586.rpm
got the message:
Some asked package can't be intalled:
R-2.0.0-1mdk.i586 (due to unsatified)
Continue ? (Y/N)
Then after I try typping R on the shell and it does work. Of course there is
no R reposatory
Thank
Daniel
##################
Daniel Sarrazin
B.Sc Physics
Daniel_Sarrazin at hotmail.com
##################
2018 Jan 07
1
foverlaps data.table error
...ks and keep appending the columns
ideally the output should be
4/1/2013 0:00
4/1/2013 0:10
0.05 0
4/1/2013 0:10
4/1/2013 0:20
0.05 0
4/1/2013 0:20
4/1/2013 0:30
0.05 0
4/1/2013 0:30
4/1/2013 0:40
0.05 0
4/1/2013 0:40
4/1/2013 0:50
0.05 0.01
4/1/2013 0:50
4/1/2013 1:00
0.05 0.01
I tried
setkey(dums,start,end)
setkey(map,start,end)
foverlaps(map,dums,type="within",nomatch=0L)
I keep getting the error
Error in foverlaps(map, dums, type = "within", nomatch = 0L) :
All entries in column start should be <= corresponding entries in column
end in data.table 'y'
[...
2017 Jun 27
0
Slow write times to gluster disk
...2 root dri_fleat 4.0K May 1 15:14 dri_fleat
my user (phaley) does not own that directory but is a member of the
group dri_fleat and should have write permissions. When I go to the
nfs-mounted version and try to use the touch command I get the following
ibfdr-compute-0-4(dri_fleat)% touch dum
touch: cannot touch `dum': Permission denied
One of the sub-directories under dri_fleat is "test" which phaley owns
drwxrwsr-x 2 phaley dri_fleat 4.0K May 1 15:16 test
Under this directory (mounted via nfs) user phaley can write
ibfdr-compute-0-4(test)% touch dum
ibfdr-compute...
2019 Sep 18
2
How to debug passes
> opt -load libdummypass.so -dummypass hello.ll
Looks like you are loading a shared library different from "LLVMHello.so".
did you change the name of the compilation unit from "Hello.cpp" into
"dummypass.cpp"?
(As asked previously by Andrzej) did you register the dummy pass?
&g...
2017 Jun 30
2
Slow write times to gluster disk
...y 1 15:14 dri_fleat
>
> my user (phaley) does not own that directory but is a member of the
> group dri_fleat and should have write permissions. When I go to the
> nfs-mounted version and try to use the touch command I get the following
>
> ibfdr-compute-0-4(dri_fleat)% touch dum
> touch: cannot touch `dum': Permission denied
>
> One of the sub-directories under dri_fleat is "test" which phaley owns
>
> drwxrwsr-x 2 phaley dri_fleat 4.0K May 1 15:16 test
>
> Under this directory (mounted via nfs) user phaley can write
>
> ibfdr-c...
2019 Sep 16
2
How to debug passes
...you pass Hello
3. insert debug messages like:
errs() << "Visiting function " << F.getName();
4. get LLVM bitcode: clang -O3 -emit-llvm hello.c -c -o hello.bc5. disassemble the bitcode:
llvm-dis hello.bc
6. run the pass on your program:
opt -load libdummypass.so -dummypass hello.ll
The above steps did not work because the last step does not display any error message that has been added in the pass.
Could you please help to debug the pass by displaying the error messages?
Thank you.
Kind regards,Iulia
-------------- next part ------------...
2011 Nov 27
0
Need Help with my Code for complex GARCH (GJR)
Hello,
i want to estimate a complex GARCH-model (see below).
http://r.789695.n4.nabble.com/file/n4112396/GJR_Garch.png
W stands for the Day of the Week Dummies. r stands for returns of stock
market indices. I stands for the GJR-term.
I need some help with three problems:
1.) implementation of the GJR-term in the variance equation
2.) compute robust covariance matrix (Bollerslev/Wooldbridge,1992) for
robust standard errors
3.) extract the residuals am...
2008 Jul 15
0
implementation of Prentice method in cch()
...cohort
ncd <- sum(cc==1) #Number of failures in subcohort
X <- as.matrix(X)
aent <- c(tenter[cc>0],tenter[cc<2])
aexit <- c(texit[cc>0],texit[cc<2])
aX <- rbind(as.matrix(X[cc>0,]),as.matrix(X[cc<2,]))
aid <- c(id[cc>0],id[cc<2])
dum <- rep(-100,nd)
dum <- c(dum,rep(0,nc))
gp <- rep(1,nd)
gp <- c(gp,rep(0,nc))
fit <-
coxph(Surv(aent,aexit,gp)~aX+offset(dum)+cluster(aid),eps=eps,x=TRUE,
iter.max=35,init=fit1$coefficients)
db <- resid(fit,type="dfbeta")
db <-...