Re: [R] Predictions with missing inputs

2011-02-12 Thread Bernardo Rangel Tura
-- 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.org/posting-guide.html and provide

Re: [R] can't find and install reshape2??

2010-10-12 Thread Bernardo Rangel Tura
(Reshape2, destdir=c:\\)but no luck!!! Does anyone have any ideas what could be going on? Chris Howden Hi Chris, I have two guess: 1- You don't have installed 'stringr' pakage 2- Your R is outdated Try this two things and after this mail me -- Bernardo Rangel Tura, M.D,MPH,Ph.D

Re: [R] read columns of quoted numbers as factors

2010-10-05 Thread Bernardo Rangel Tura
('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 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Calculating with tolerances

2010-09-09 Thread Bernardo Rangel Tura
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 7.500 12.625 -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology

Re: [R] levene.test

2010-07-14 Thread Bernardo Rangel Tura
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 read the posting guide http://www.R-project.org/posting

Re: [R] F# vs. R

2010-07-07 Thread Bernardo Rangel Tura
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-project.org mailing list https

Re: [R] How to determine if R is 64 bit compiled under Unix-alike?

2010-07-05 Thread Bernardo Rangel Tura
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.org mailing list https://stat.ethz.ch

Re: [R] Best way to compute a sum

2010-07-04 Thread Bernardo Rangel Tura
think you need read about Guard Digits approach -- 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

Re: [R] Best way to compute a sum

2010-07-03 Thread Bernardo Rangel Tura
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 National Institute of Cardiology Brazil __ R

Re: [R] identifying odd or even number

2010-07-01 Thread Bernardo Rangel Tura
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 -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil

Re: [R] Calculation of r squared from a linear regression

2010-06-11 Thread Bernardo Rangel Tura
- 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 Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil __ R-help@r-project.org mailing list https

Re: [R] How sample without replacement on more than one variables?

2010-05-23 Thread Bernardo Rangel Tura
, 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/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Minimization problem

2010-05-20 Thread Bernardo Rangel Tura
(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) } -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil __ R-help@r

Re: [R] Simple question on binning data

2010-05-15 Thread Bernardo Rangel Tura
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 National Institute of Cardiology Brazil

Re: [R] Generate Numbers

2010-04-04 Thread Bernardo Rangel Tura
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.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] compare two fingerprint images

2010-04-03 Thread Bernardo Rangel Tura
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://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] compare two fingerprint images

2010-04-03 Thread Bernardo Rangel Tura
. 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 you do with R?. Is there a role for cross-correlation of images? Thanks Hi

Re: [R] Changing content of column in data.frame + efficient join extraction between 2 data.frames

2010-03-23 Thread Bernardo Rangel Tura
Hi Corrado! First: tolower(pcs$str_1) change 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

Re: [R] queue simulation

2010-03-22 Thread Bernardo Rangel Tura
) 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,MPH,Ph.D National Institute of Cardiology Brazil __ R-help@r

Re: [R] different forms of nls recommendations

2010-03-21 Thread Bernardo Rangel Tura
3: 1359.8819: 187.530 -- 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.org

Re: [R] fisher.test gives p1

2010-03-04 Thread Bernardo Rangel Tura
-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f -- 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: [R] Problem in performing goodness of fit test in R.

2010-02-14 Thread Bernardo Rangel Tura
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 Brazil __ R-help@r-project.org mailing list

Re: [R] using tabble

2010-01-18 Thread Bernardo Rangel Tura
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,MPH,Ph.D National Institute of Cardiology Brazil __ R-help@r-project.org mailing list https

Re: [R] Help with function fitdistr in MASS

2010-01-03 Thread Bernardo Rangel Tura
(mydata,normal) meansd NA NA (NA) (NA) the help doc of fitdistr does not mention anything about that, thus I need 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

Re: [R] Problem with Cannot compute correct p-values with ties

2009-12-22 Thread Bernardo Rangel Tura
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 __ R-help@r-project.org

Re: [R] areg (stata) equivalent in R?

2009-12-01 Thread Bernardo Rangel Tura
. 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.org mailing list https://stat.ethz.ch/mailman

Re: [R] subset or condition as argument to a function

2009-11-21 Thread Bernardo Rangel Tura
) 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 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] negative log likelihood

2009-11-09 Thread Bernardo Rangel Tura
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.org/posting-guide.html and provide commented, minimal

Re: [R] operation with if/else on a dataframe

2009-10-29 Thread Bernardo Rangel Tura
the original data.frame so I use dta$NEW to create a new column in data.frame -- 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: [R] attach

2009-10-18 Thread Bernardo Rangel Tura
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.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] stochastic process

2009-10-13 Thread Bernardo Rangel Tura
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 list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] row selection

2009-10-11 Thread Bernardo Rangel Tura
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 __ R-help@r-project.org mailing list https

Re: [R] Setting a mirror permanently on R on ubuntu

2009-10-10 Thread Bernardo Rangel Tura
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 __ R-help@r-project.org mailing list

Re: [R] Satellite ocean color palette?

2009-10-09 Thread Bernardo Rangel Tura
in R, using colorRampPalette, look this example Satelite.Pallete - colorRampPalette(c(blue3,cyan,aquamarine,yellow,orange,red)) require(fields) image.plot(volcano, col = Satelite.Pallete(500), legend.lab=Scale) contour(volcano, levels = seq(90, 200, by = 5), add = TRUE) -- Bernardo Rangel Tura, M.D

Re: [R] How to use Subpopulation data?

2009-10-02 Thread Bernardo Rangel Tura
==Hypermarket]) [1] 4586.854 length of value in sample.strat where type is Hypermarket: length(sample.strat$value[sample.strat$type==Hypermarket] ) [1] 20 SD of value in sample.strat where type is Hypermarket: sd(sample.strat$value[sample.strat$type==Hypermarket] ) [1] 4679.336 -- Bernardo Rangel

Re: [R] aproximate a titration kurve to the measure data.

2009-10-02 Thread Bernardo Rangel Tura
) 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 7.002 -- Bernardo Rangel Tura, M.D,MPH,Ph.D National

Re: [R] aproximate a titration kurve to the measure data.

2009-10-01 Thread Bernardo Rangel Tura
: 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, medicine, pharmacology, toxicology. -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute

Re: [R] How to use Subpopulation data?

2009-10-01 Thread Bernardo Rangel Tura
=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 - strata(sampleframe,c(type),size=20, method=srswor) -- Bernardo Rangel Tura, M.D,MPH,Ph.D National

Re: [R] How to use Subpopulation data?

2009-10-01 Thread Bernardo Rangel Tura
) sample.strat-getdata(sampleframe,stra) sample.strat -- 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

Re: [R] PCA or CA

2009-09-30 Thread Bernardo Rangel Tura
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.org/posting-guide.html and provide commented, minimal

Re: [R] Color index in image function

2009-09-11 Thread Bernardo Rangel Tura
) -- 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.org/posting-guide.html and provide

Re: [R] Color index in image function

2009-09-10 Thread Bernardo Rangel Tura
)) 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 - Original Message From: Bernardo Rangel Tura t

Re: [R] Color index in image function

2009-09-07 Thread Bernardo Rangel Tura
example Brazilan.Pallete - colorRampPalette(c(green,yellow, blue)) image(x, y, volcano, col = Brazilan.Pallete(50), axes = FALSE) -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil __ R-help@r-project.org mailing list https

Re: [R] correlation between two 2D point patterns?

2009-08-30 Thread Bernardo Rangel Tura
in finding such a statistic and calculating it using R. Bill Hi Bill, If your 2 points set is similar I 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

Re: [R] SQL on R

2009-07-05 Thread Bernardo Rangel Tura
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 National Institute

Re: [R] Convert a lis to matrix

2009-06-07 Thread Bernardo Rangel Tura
) -- 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.org/posting-guide.html and provide commented

[R] Help with a cumullative Hazrd Ratio plot

2009-05-13 Thread Bernardo Rangel Tura
for 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

Re: [R] R and McAfee 8.5

2009-05-11 Thread Bernardo Rangel Tura
- 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 win 95 etc) neither your R configuration (do you use R --internet2 or not?) -- Bernardo Rangel Tura, M.D,MPH,Ph.D National

Re: [R] Division ?

2009-05-03 Thread Bernardo Rangel Tura
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 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] omit empty cells in crosstab?

2009-04-26 Thread Bernardo Rangel Tura
only cell0 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 __ R-help@r-project.org mailing list

Re: [R] Dummy (factor) based on a pair of variables

2009-04-18 Thread Bernardo Rangel Tura
if the country is in the pair (i.e. EITHER an i-country OR an j-country). Thank you for your help, Serguei Hi Serguei, If I understand your doubt, the solution is something like this for pair i-country is AUT or j-country is BEL output ~ I(i-country==AUT|j-country==BEL) -- Bernardo Rangel

Re: [R] newbie query: simple crosstabs

2009-04-08 Thread Bernardo Rangel Tura
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 command CrossTable of package gmodels. -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil

Re: [R] Sequences

2009-04-07 Thread Bernardo Rangel Tura
(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(lambs) } The vector in R begin in 1 not in 0... -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil __ R-help@r

Re: [R] How to save the variables in R to a file

2009-04-06 Thread Bernardo Rangel Tura
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) -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil

Re: [R] threshold distribution

2009-04-05 Thread Bernardo Rangel Tura
? 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.69893 0.99597 0.89200 0.69312 0.73613 1.13559 0.85009 0.85804 0.73324 1.04826 0.84002 1.76330 0.71980 0.89416 0.89450 0.98670 0.83571 0.73833 0.66549 0.93641

Re: [R] Installation of all packages under Unix

2009-04-02 Thread Bernardo Rangel Tura
. 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, M.D,MPH,Ph.D National Institute of Cardiology Brazil

Re: [R] A query about na.omit

2009-04-01 Thread Bernardo Rangel Tura
(tab[,2]),] -- 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.org/posting-guide.html

Re: [R] how to increase the limit for max.print in R

2009-03-31 Thread Bernardo Rangel Tura
475569 rows Can somebody please provide me the pointers with how to increase the limit for max.print . Thanks, Pooja Hi Pooja, You must use options command, something like this options(max.print=5.5E5) For more information type? ?options -- Bernardo Rangel Tura, M.D,MPH

Re: [R] how to increase the limit for max.print in R

2009-03-31 Thread Bernardo Rangel Tura
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/r-help PLEASE do read

Re: [R] very fast OLS regression?

2009-03-26 Thread Bernardo Rangel Tura
system.time(for (mc in 1:MC) ols4(y[, mc], x[, mc, drop = FALSE])) Error in 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

Re: [R] Search Errors

2009-03-25 Thread Bernardo Rangel Tura
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-project.org mailing list https

Re: [R] fisher.test - FEXACT error 7

2009-03-23 Thread Bernardo Rangel Tura
. 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 Institute of Cardiology Brazil __ R-help@r-project.org mailing list https

Re: [R] any package for connecting berkeley db in R?

2009-03-23 Thread Bernardo Rangel Tura
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 Cardiology Brazil

Re: [R] numeric equality

2009-03-20 Thread Bernardo Rangel Tura
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 Institute of Cardiology Brazil __ R-help@r-project.org mailing list https

Re: [R] Regressão linear

2009-03-06 Thread Bernardo Rangel Tura
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 so the command is splitdat - split(mydata,rep(1:(nrow(mydata)/6),each=6)) -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute

Re: [R] Does The Randvar package contain a virus(Malware) ?

2009-03-02 Thread Bernardo Rangel Tura
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://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] rounding problem

2009-03-02 Thread Bernardo Rangel Tura
- 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://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] density 1?

2009-03-02 Thread Bernardo Rangel Tura
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 -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil

Re: [R] 1.095e+09 for integers

2009-02-23 Thread Bernardo Rangel Tura
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.org/posting-guide.html and provide commented, minimal

[R] System of logistics Equations

2009-02-20 Thread Bernardo Rangel Tura
-- 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.org/posting-guide.html and provide

[R] System of logistics Equations-correction

2009-02-20 Thread Bernardo Rangel Tura
-- 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.org/posting-guide.html and provide

Re: [R] Generating Numbers With Certain Distribution in R

2009-02-11 Thread Bernardo Rangel Tura
x - rlnorm(1e6,meanlog=1,sdlog=1) ## pick any parameters you like y - round((x-min(x)/diff(range(x)))*19+1) What you think? -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil __ R-help@r-project.org mailing list https

Re: [R] Choosing a random number between x and y

2009-02-10 Thread Bernardo Rangel Tura
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)) -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute

Re: [R] How to analyse and model 2 time series, when one series needs to be differenced?

2009-02-01 Thread Bernardo Rangel Tura
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 __ R-help@r-project.org mailing list https

Re: [R] R for Computational Neuroscience?

2009-01-25 Thread Bernardo Rangel Tura
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 (2008). -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil

Re: [R] Is it possible for R to import a SigmaPlot file?

2009-01-23 Thread Bernardo Rangel Tura
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 __ R-help@r-project.org

Re: [R] pchisq error

2009-01-19 Thread Bernardo Rangel Tura
? -- 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.org/posting-guide.html and provide

Re: [R] easiest way to integrate own functions on startup

2009-01-19 Thread Bernardo Rangel Tura
? I tried load() but I get an error message... Hi Jörg, I do you not use .Fisrt. Something like this: .First - function(){ source(MyFunction1.txt) source(MyFunction2.txt) source(MyFunction3.txt) ... source(MyFunctionn.txt) } -- Bernardo Rangel Tura, M.D,MPH

Re: [R] How-To capture and handle errors with R

2008-12-14 Thread Bernardo Rangel Tura
-- 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.org/posting-guide.html and provide

Re: [R] Logical inconsistency

2008-12-11 Thread Bernardo Rangel Tura
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 PROTECTED] To: emma jane [EMAIL PROTECTED] Cc: R help [EMAIL

Re: [R] Logical inconsistency

2008-12-11 Thread Bernardo Rangel Tura
, 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 problem need 2 decimal places precision ... -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil

Re: [R] Logical inconsistency

2008-12-10 Thread Bernardo Rangel Tura
((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, M.D,MPH,Ph.D National Institute of Cardiology Brazil __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Logical inconsistency

2008-12-06 Thread Bernardo Rangel Tura
] TRUE So the problem is the code write and no the software -- 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

Re: [R] how to ignore errors

2008-12-01 Thread Bernardo Rangel Tura
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 for(i in 1 : 100 ) { try(source(test.r,echo =T )) } -- Bernardo Rangel Tura, M.D,MPH,Ph.D National

Re: [R] help for code in jump diffusion

2008-11-22 Thread Bernardo Rangel Tura
*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) } -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil

Re: [R] Mismatch in logical result?

2008-11-07 Thread Bernardo Rangel Tura
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... 1.4^2 ==

Re: [R] How to plot with different colours

2008-11-02 Thread Bernardo Rangel Tura
(col) plot(1:6000,x,col=color) -- 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.org

Re: [R] group sequential analysis - stopping for futility

2008-10-30 Thread Bernardo Rangel Tura
stopping bounds for various spending functions, but it does not appear to do the same for futility (sometimes called the 'inner wedge'). Thanks for any assistance! -Alice Hi alice, I have interest in develop this code with you . Do you have a paper about this? -- Bernardo Rangel

Re: [R] about granova library

2008-10-20 Thread Bernardo Rangel Tura
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 surface) -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil

Re: [R] Saving results of Kruskal Walis test

2008-10-16 Thread Bernardo Rangel Tura
data_file.out is a lista to. You don't put a list ins a data.frame so you need make this data.frame(unlist(data_file.out)) -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] help about how can R compute AIC?

2008-10-15 Thread Bernardo Rangel Tura
) AIC= 32.7599+6 AIC= 38.7599 -- 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.org

Re: [R] legend

2008-10-15 Thread Bernardo Rangel Tura
(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,lightblue,orange)) -- 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

Re: [R] interpreting Shapiro-Wilks test result

2008-10-11 Thread Bernardo Rangel Tura
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.test. -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology

Re: [R] Load a program at the front end

2008-10-06 Thread Bernardo Rangel Tura
svn rev46532 language R version.string R version 2.7.2 Patched (2008-09-11 r46532) -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil

Re: [R] cannot open connection: Authorization Required

2008-10-05 Thread Bernardo Rangel Tura
] [25] [26] I run R.2.7.2 in Ubuntu AMD 64 machine -- Bernardo Rangel Tura, M.D,MPH,Ph.D

Re: [R] Logistic regression problem

2008-10-01 Thread Bernardo Rangel Tura
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 variables are correlated

Re: [R] birthday problem (factorial limit)

2008-09-30 Thread Bernardo Rangel Tura
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.4927028 -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology

Re: [R] Logistic regression problem

2008-09-30 Thread Bernardo Rangel Tura
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,MPH,Ph.D National Institute of Cardiology Brazil

Re: [R] cannot allocate memory

2008-09-24 Thread Bernardo Rangel Tura
; if 'TRUE' the values for maximum space used are reset to the current values. Other issue is options for rgui command. Have a option --max-mem-size that you modify to expand you RAM avaiable -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil

Re: [R] Confidence Interval

2008-08-20 Thread Bernardo Rangel Tura
of TeachingDemos package? It's a very good example -- 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

  1   2   >