ed <- predict(mymodel, mynewdata)
> Thanks in advance for your help!
>
> Axel.
Axel,
I think mice package solve your problem
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing
lled 'stringr' pakage
2- Your R is outdated
Try this two things and after this mail me
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-h
ypur problem using the options colClasses in the
read.table command, something like this
rea.table('name.of.table',colClasses=c(rep(30,'integer'),rep(5,'numeric'),etc))
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
_
P = 5 * Q * H
>
> and get a value with a tolerance +-
>
> What is the elegant way of doing this in R?
>
> Thank you,
> Jan
Hi Jan,
If I understood your problem this script solve your problem:
q<-0.15 + c(-.1,0,.1)
h<-10 + c(-.1,0,.1)
5*q*h
[1] 2.475
s use leveneTest (?levene.test
again)If you type ?leveneTest you get examples
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
l code is in C o
FORTRAN
So I think the F# is not a good alternative, if your concern is velocity
dou you look Littler
http://code.google.com/p/littler/
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-projec
eems to work the same/right as with R64 under MacOS.
>
> Pms.
>
Type .Machine$sizeof.pointer
If respond is 8 your R is 64 bits
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.o
ifelse (sum(rep(1.1,100))>sum(rep(11,100))/10, "greater than",
> "less than orequal")
>
> [1] "greater than"
Hi Roger,
First of all, is true
> sum(rep(1.1,100))==sum(rep(11,100))/10
[1] FALSE
But is true too
> all.equal(sum(rep(1.1,
ad: What Every Computer Scientist Should Know
About Floating-Point Arithmetic
( http://docs.sun.com/source/806-3568/ncg_goldberg.html )
I think your question and others like this question is answer in this
paper
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
Nation
ersity of Ilorin
Hi Yemi!
Your problem is solve wiht "!" and "%%", Look this example
> x <- 1:11
> x
[1] 1 2 3 4 5 6 7 8 9 10 11
> x%%2
[1] 1 0 1 0 1 0 1 0 1 0 1
> !(x%%2)
[1] FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE
--
4
F-statistic: 77.76 on 1 and 2 DF, p-value: 0.01262
betax <- fm1$coeff[2] * sd(x) / sd(y)
# cd is coefficient of determination
cd <- betax * cor(y, x)
cd
x
0.974924
The formula "fm1$coeff[2] * sd(x) / sd(y)" is valid only the model have
a intercept...
--
Bernardo Ran
;- data.frame(v1=v1, v2=v2, v3=v3)
And now is simple, sample the row of data frame
aa[sample(1:nrows(aa),3),]
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mai
st .
>
> F.
Hi!
Do you need use optim, something like this
test <- function(parameters){
m.error <- mean(distribution(x1,x2,x3) ) - observed mean
m.sd <- std(distribution(x1,x2,x3)) - observed std
res <- cbind(m.error,sd.error)
return(res)
}
>
> The one I wrote for myself discards any partial bin (101-107 in my
> example) and leaves a warning note that this took place.
>
> Carl
Hi Carl,
I think the syntactically correct is x[10*i:(11*i-1)]
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
my direct approach but why you don't use
data <- c(runif(25,number,540),runif(50,540,715),runif(25,715,number))
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.c
w if you can do with R.
>
> Thank you very much
>
> Juan
>
>
> Bernardo Rangel Tura escribió:
> > On Fri, 2010-04-02 at 20:52 +0200, Juan Antonio Gil Pascual wrote:
> >
> >> Hello
> >> I wanted to compare two fingerprint images. How do yo
w exactly what you
need but try this;
require(ReadImages)
x <- read.jpeg(image1)
x1 <- read.jpeg(image2)
table(x1==x)
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://st
nge to lower case
Second: try merge (East,pcs,by.x=str_1,by.y=str_1) to fusion data frames
Third: I don't recreate your database East in my computer do you give a
small part to I try solve your problem?
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
f dispatch rate 0.4, use the command
times <- rexp(10,0.4)
If I need the total delay for each person, use the command
cumsum(times)
If I need the average time in the queue, use the command
means(cumsum(times))
--
Bernardo Rangel Tura, M.D,M
rt")
temp_nls6 <- nls(ECe~(100/(b-14.7127 *
WTD^(-1.01613))),data=US.final.values,start=list(b=70.4936),trace=TRUE,algorithm="port")
temp_nls7 <- nls(ECe~(a/(70.4936-14.7127 *
WTD^(-1.01613))),data=US.final.values,start=list(a=100),trace=TRUE,algorithm="port")
0: 2243
AQ 7.31, but look this command
all.equal(dput(fisher.test(matrix(c(14,14,29,29,16,16),byrow=T,ncol=2))$p.value),1)
1.000012
[1] TRUE
P.S
R FAQ 7.31 -
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
--
Bernardo Rangel Tura, M.D,MP
probabilities
data: freq
X-squared = 6.72, df = 5, p-value = 0.2423
About the third line You must read ?chisq.test for better know the
command, but you execute one chi-square test with uniform probability
distribution
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Br
5),3)
table(x)
x
3 4 5 6 7
3 3 3 3 3
In this example the values "1" and "2" are missing
Solution change your variable to factor and determine your leveal
x.factor<-factor(x,levels=1:7)
table(x.factor)
x
1 2 3 4 5 6 7
0 0 3 3 3 3 3
--
Bernardo Rangel Tura, M.D,M
eed
> your help.
>
> Thank you in advanced,
> Saji from Shanghai
Hi Sajj,
You hava NA in your data
try: fitdistr(na.exclude(mydata),"normal")
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-h
a,jitter(b))
Wilcoxon rank sum test
data: a and jitter(b)
W = 49, p-value = 0.9705
alternative hypothesis: true location shift is not equal to 0
look ?jitter for more information
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
_
an applicable function. thanks for any help.
>
John,
Do you show a example for this command?
I don't know stata so I don't help you
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.or
t is
pltit <- function(y,x,dat,dat1,dat2,sbst) {
subs <- subset(dat,sbst)
with(subs,plot(y~x))
subs1 <- subset(dat1,sbst)
with(subs1,lines(y~x))
subs2 <- subset(dat2,sbst)
with(subs2,points(y~x))
}
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
_
(model)
'log Lik.' -40.1177 (df=3)
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.o
(x>5 & y>15 & z>10,"UP",
ifelse(x<5 & y<15 & z<10,"DOWN",
"0"))
dta
First, I use ifelse command to simplify your nested conditional
situation.
Second, I know that R test this nested condition
ch a data.frame twice times, it use your memory twice
times.
I don't use attach I prefer with(data.frame, command)
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.
pratical use command mtx.exp
of Biodem package, something like this
require(Biodem)
#
# 10th step direct
#
initial%*%mtx.exp(transition,10)
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing lis
out of bounds
>
> Can any body point out the problem?
Hi Ashta,
If I understand your request you need select row 5,10,15, ...
In this case you can use this script:
x[1:nrow(n)%%5==0]
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
___
> This is because of the error I keep on getting below and I dont know how to
> solve it.
>
> Please help.
>
> Kind regards,
> Lazarus
Lazarus,
use options(repos="mirror URL")
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
e.plot(volcano, col = Satelite.Pallete(500), legend.lab="Scale")
contour(volcano, levels = seq(90, 200, by = 5), add = TRUE)
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https:
, 2.86, 2.33, 2.11, 1.98)
>
> with regards
Ok
temp<-data.frame(ph2,v2)
> drm(temp,, fct = LL.4())
A 'drc' model.
Call:
drm(formula = temp, fct = LL.4())
Coefficients:
b:(Intercept) c:(Intercept) d:(Intercept) e:(Intercept)
39.420 2.425 11.487
20
SD of value in sample.strat where type is Hypermarket:
> sd(sample.strat$value[sample.strat$type=="Hypermarket"] )
[1] 4679.336
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mai
gt;
> sample.strat
>
Try:
stra<-strata(sampleframe,size=c(20,80,200,300,400),method="srswor")
sample.strat<-getdata(sampleframe,stra)
sample.strat
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-proje
=5000))
> sampleframe=data.frame(type=c(rep("H",100)),value=c(H))
> sampleframe
>
> str=strata(sampleframe,c("type"),size=c(20,), method="srswor")
Try using
str=strata(sampleframe,c("type"),size=20, method="srswor")
or better
str <-
if you could post it.
>
> with regards
Hi,
I think do you need use drc package:
drc: Analysis of dose-response curves
Analysis of one or multiple curves with focus on concentration-response,
dose-response and time-response curves used, for example in biology,
environmental sciences,
, in most case I
convert numeric variables to factor (with loss of information) and make
CA
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PL
ilan.Pallete(50), legend.lab="Scale")
contour(volcano, levels = seq(90, 200, by = 5), add = TRUE)
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mai
mpPalette(c("green","yellow", "blue"))
require(fileds)
image.plot(volcano, col = Brazilan.Pallete(50), axes = FALSE)
contour(volcano, levels = seq(90, 200, by = 5), add = TRUE)
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
>
>
>
tract this color index?
>
> Thank you
> Fir
If I understand your question you need change the Palette of image plot.
So you need use "colorRampPalette" look my example
Brazilan.Pallete <- colorRampPalette(c("green","y
expect your Euclidean distance is 0,
so I suggest this script:
dist<-sqrt((x1-x2)^2+(y1-y2)^2) # Euclidean distance
t.test(dist) # test for mean equal 0
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-proje
but
if you think use SQL in your data frames do you use SQLDF
(http://cran.r-project.org/web/packages/sqldf/index.html)
if you thinks use a database server and access it in R i sugest you use
RMySQL (http://cran.r-project.org/web/packages/RMySQL/index.html)
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
> ..- attr(*, "dimnames")=List of 2
>
> .. ..$ : chr [1:15364] "6420681" "3610072" "2260458" "60689" ...
>
> .. ..$ : NULL
I'm not sure if understood your question, but look this code
a<-list(B=1:3,C=2:4,D=3:5)
matrix
this?
In this case with how commands?
Thanks in advance!
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
I appreciate any assistance!
>
> Warren N. Joyce
Hi Joice,
In my opinion you need think about 2 things.
1- This is a problem of McAfee 8.5 not a R problem, so do you contact a
McAfee support for fix this problem ?
2- I presume you use a windows but i do know your version (XP or Vista
or
t: 952381 is a round number not a real result of division.
This occur because R print only 7 significants digits in numbers, if you
test
> all.equal(21*952380.952380952,2000)
[1] TRUE
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
0 0 0 0 0 1
If you desire use simple code to find only cell>0 use this
table(interaction(c,drop=T))
(1,2].(1,2] (2,3].(2,3] (9,10].(9,10]
1 1 1
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
EL
output ~ I(i-country=="AUT"|j-country=="BEL")
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the p
t; male q1.bin q2.bin q3.bin ...
>0 0.6012 0.3421 0.9871 ...
>1 0.7121 0.6223 0.0198 ...
>
> I've tried various combinations of apply & cbind, but to no avail. It would
> be easy in SPSS crosstabs, but darnit, I want to use R!
Donald,
The other solutions is using c
code is:
s<-rep(0,207)
s<-as.vector(s)
s[0]<-0
for (i in 1:length(lambs)){
s[i]<-s[i-1]-mean(lambs)
}
But try this code:
s<-rep(0,207)
s<-as.vector(s)
s[1]<-0 # not s[0]
for (i in 2:length(lambs)){ #not 1:length(lambs)
s[i]<-s[i-1]-mean
saves but when I open the file in notepad it is just some characters
> meaningless.
>
> Thank you in advance,
>
> Kind Regards,
>
> Aysun
Hi Aysun,
Try write.csv something like this:
write.csv(f.mean.Rdata,"D:/Users/Ays/Documents/Results/f_mean.csv")
--
Be
gnormal
and density(data) is fine but when I use lines (red) the fit is bad (in
attach I send a PDF of my output)
Do you know why this happen?
Thanks in advance
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
P.S. my script is
x <- scan()
0.80010 0.72299 0.6
job at startup.
>
> Something like R cmd install -l pkgs ### where pkgs should mean all
> packages (is there an option to control overwriting?)
>
> Thanks a lot,
>
> N. Boehme
All packages in CRAN
install.packages(new.packages(),dep=T,clean=T)
--
Bernardo Rangel Tura
nomic Research Institute of Northern Ireland
>
Hi Jose Luis,
I think this script is sufficient for your problem:
tab<-matrix(c(1,1,1,2,2,2,3,3,NA,4,NA,4,NA,5,5),ncol=3,byrow=T)
tab[!is.na(tab[,1])&!is.na(tab[,2]),]
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
ompiled R 2.8.1 in AMD phenom using Ubuntu 8.10 AMD
64
> .Machine$double.xmax
[1] 1.797693e+308
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/
nd, something like this
options(max.print=5.5E5)
For more information type? ?options
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do re
lm.fit(x, y) : NA/NaN/Inf in foreign function call (arg 1)
Timing stopped at: 0 0 0.001
So routines ols2, ols3 and ols4 only functional in fully matrix if have
one NA this functions don't run.
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
ce, browser and
debug.
In special cases i use a debug package
( http://cran.r-project.org/doc/Rnews/Rnews_2003-3.pdf )
Article: Debugging without (too many) tears
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r
On Fri, 2009-03-20 at 17:23 -0400, Zheng, Xin (NIH) [C] wrote:
> Hi there,
>
> Is there any such package? I searched but found none. Thanks in advance.
>
> Xin Zheng
>
Hi Xin
Do you try package DBI?
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of
lls have counts at least 5.
3- Use "large tables" approach from Sir David Cox:
Law, G. R. and Cox, D. R. and Machonochie, N. E. S. and Simpson, J. and
Roman, E. and Carpenter, L. M. (2001) Large tables. Biostatistics
2(2):pp. 163-171.
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National In
;- 1 - 0.8
>
> > a == 0.2
>
> [1] FALSE
Hi Yu,
First of all read FAQ 7.31 (Why doesn't R think these numbers are
equal?)
Second, in this case, use all.equal
a <- 1 - 0.8
a == 0.2
[1] FALSE
all.equal(a,0.2)
[1] TRUE
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institut
lt;- lapply(splitdata,lm,formula=y~x)
> coefs <- sapply(linfits,coef)
>
> or something like that.
>
> Ben Bolker
Hi Ben Bolker
First of all I would like to thank the kindness with my countrywoman.
Second in her problem each 6 rows is a subset for a linear regression s
98 0.2800 0.9400 1.9800 2.6000 4.
[7] 4.0400 2.9200 1.6600 0.9200 0.4400 0.1000
[13] 0.0200
set.seed(123)
sum(hist(rnorm(1000,sd=.1),freq=FALSE)$density)
[1] 1
So the sum of probability is 1 but the sum of density 20
--
utine put a bias in your analysis
2- Is not a standard (check IEC 60559 about this)
3- Do you migrating a excell bug to R
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://sta
etails/id_vir/4142/heur_html.malware.html
HEUR/HTML.Malware Not a virus but a code this anti virus suspected may
be a virus
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://sta
ientific=FALSE)
[1] "12345678912345678
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
ime to obtain estimatives of effects and
uncorrelated error terms.
The systemfit package fit linear system and non-linear system but is
possible adjust a logistic system in R?
Thanks in advance
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
___
tives of effects and
uncorrelated error terms.
The systemfit package fit linear system and non-linear system but is
possible adjust a logistic system in R?
Thanks in advance
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
___
blem more
> precisely (and perhaps give some context) if you want
> a better answer ...
>
> Ben Bolker
Ben,
I think your routine need a little fix
x <- rlnorm(1e6,meanlog=1,sdlog=1) ## pick any parameters you like
y <- round((x-min(x)/diff(range(x)))*19+1)
What you thin
, so i
think de priori is a beta (1[0+1],73[72+1]).
The likelihood is oblivious beta(13[12+1],61[60+1])
So the posteriori is beta(1,73)*beta(13,61)=beta(14,134)
The expected valeu of posteriori is 0.1 in 72 cats is same 7.2 or 7 CATS
is almost a half of numbers of study.
--
Bernardo Rangel Tur
xamples Using runif
1- Random 10 number Retween 0 and 0.5 runif(10,0,0.5)
2 -Random 20 number Retween 0 and 0.7 runif(20,0,0.7)
3- Random 40 number of mixture two random uniforme random 1 and 2 with
p(random1)= 0.3 and p(random=2) = 0.7
ifelse(runif(40)>.3,runif(40,0,0.7),runif(40,0,0.5))
--
ome hints.
>
>
> Regards,
> Andreas.
Hi Andreas,
If I understand your problem this script solve tour question
t<-1:15
x<-rnorm(10)
y<-.2-.3*t+rnorm(15)
y.dif<-diff(y,1)
ccf(x,y.dif)
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
_
l (DTI). This includes
the calculation of anisotropy measures and, most important, the
implementation of our structural adaptive smoothing algorithm as
described in K. Tabelow, J. Polzehl, V. Spokoiny, and H.U. Voss,
Diffusion Tensor Imaging: Structural Adaptive Smoothing, Neuroimage
39(4), 1763-1773 (2
abase for other type of files.
If you export jnb file to csv file is possible read a database in R.
I will talk with a person work with me and tonight I send other mail
with more details.
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
Function3.txt)
...
source(MyFunctionn.txt)
}
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
EASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods
base
Well, do you already try update your R?
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
_
.
>
> Thank you so much,
> Maura
Maura you can use try to catch error for more information digit: ?try
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.ch
of significant digits for comparison.
In all example put in this thread we need only 1 decimal place so you
round for 1 decimal place, if for your job you need 3 decimal places
precision you round for 3 decimal place.
I think don't make sense you using 10 decimal place precision if your
pr
culation:
Look this
> round(8.8,1)-round(7.8,1)>1
[1] TRUE
> round(8.8-7.8,1)>1
[1] FALSE
> round(8.8-7.8,1)==1
[1] TRUE
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
-- Original Message ---
From: "Kenn Konstabel" <[EMAIL PROTE
; 1
> >FALSE
>
> 11.3 - 10.3>1
> > FALSE
>
> Emma Jane
Emma,
This solve two forms:
1- use all.equal
> all.equal((10.2 - 9.2),1)
[1] TRUE
2- use round
> round(10.2 - 9.2,0)>1
[1] FALSE
> round(10.2 - 9.2,0)>=1
[1] TRUE
--
Bernardo Rangel Tura,
ally here is a consequence of its
> implementation of floating point arithmetic.
>
> the faq you were pointed to, and its referring to the goldberg's
> article, show that r does not successfully isolate a user from details
> of the lower-l
stochastically wrong,i.e., sometimes it works well if
> no bad values return.
> I want to know how to ignore such errors and let the loop continue.
>
> thanks in advance.
> ___
>
Jiang Peng,
The default solution is using try command, something like this
t;-qnorm(m,0,1)
S0<-abs(S0*((1+mu*dt+sig*sqrt(dt)+ gam)- j*theta))
if(!is.nan(S0)&&(S0 <= 0)){
warning("S0 must be positive")
cat("NaN","\n")
}
cat(S0,"\n")
i<-i+(1/252)
}
On Fri, 2008-11-07 at 15:53 +0530, Shubha Vishwanath Karanth wrote:
>
> Hi R,
>
>
>
> I have certain checkings, which gives FALSE, but actually it is true. Why
> does this happen? Note that the equations that I am checking below are not
> even the case of recurring decimals...
>
>
>
> >
unif(6000,-1,1)
color<-ifelse(x>.35,"green",ifelse(x< -.35,"red","yellow"))
table(col)
plot(1:6000,x,col=color)
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.or
lop this code with you .
Do you have a paper about this?
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://ww
(...)
Hi Paulo
I think you need install JDK and JRE for using rJava
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read t
t?
>
> I’m using a Windows Vista system and I have the R version 2.7.2.
>
> Cheers,
>
> Fer
Fernando
I using R version 2.7.2 and Ubuntu 8.04 in my computer:
granova.1w - runs fine
granova.2w - don't run fine, actual only 1 of 2 graphical windows apear
a plot (rgl sur
ble (It works
> very well saving results from anova analysis) or is there any other way to
> save results in a file for future use..
>
> Thanks
> Himanshu
Hi Himanshu
Well the output of htests is a list so data_file.out is a lista to.
You don't put a list ins a data.frame so you
32.7599+2*(p+1)
#
# this is very important the model have two
# parameter, because sigma is a parameter to.
# so
#
AIC= 32.7599+2*(2+1)
AIC= 32.7599+6
AIC= 38.7599
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
__
R-h
>
> legend("bottom",legend=paste("Sigma1=", c(0.01,0.1,0.2,0.5,1,1.5,2,4,6,9.5),
> sep=""),
> fill=c("red","green","blue","black","pink","brown","purple","yellow","lig
level of test. What exist is
confidence level of your experiment.
If you plan your experiment with alpha probability you have
100*(1-alpha) confidence level and you p-value need minor than alpha to
named "significant"
So if you need 99% of significance the two groups is normal and you
using t.tes
Em Qui, 2008-10-02 às 14:36 -0400, Gang Chen escreveu:
> I want to run a R program, prog.R, interactively. My question is, is
> there a way I can start prog.R on the shell terminal when invoking R,
> instead of using source() inside R?
>
> TIA,
> Gang
Hi Gang
I my system just only type:
R --n
>
> [20] "here is the contents page of the R
> Project's"
> [21] "website."
>
> [22] ""
>
Em Ter, 2008-09-30 às 18:56 -0500, Frank E Harrell Jr escreveu:
> Bernardo Rangel Tura wrote:
> > Em Sáb, 2008-09-27 às 10:51 -0700, milicic.marko escreveu:
> >> I have a huge data set with thousands of variable and one binary
> >> variable. I know that most of the varia
ood
> predictor...
>
> Any suggestion is welcomed
milicic.marko
I think do you start with a rpart("binary variable"~.)
This show you a set of variables to start a model and the start set to
curoff for continous variables
--
Bernardo Rangel Tura, M.D,MP
lculate factorials up
> to 170.
>
>
> So is there a way to push that limit?
>
> to solve this formula:
>
> (factorial(365) / factorial((365-23))) / (365^23)
>
> (n=23)
Log experession
n<-23
exp(sum(log(1:365))-sum(log(1:(365-n)))-n*log(365))
[1] 0.492
1 - 100 of 130 matches
Mail list logo