[R] an issue about subsetting a vector

2024-03-24 Thread Paulo Barata
elow, if the invalid index -99 is presented to a, the result is the whole vector: > a[-99] [1] 1 2 3 4 5 If -integer(0) is an invalid index, why do we have this? > a[-integer(0)] integer(0) Why a[-integer(0)] is not the whole vector a? Thank yo

[R] R-package imputeTS / warning messages

2022-10-26 Thread Paulo Barata
ll me about the implications of such a message? To my eyes, the imputation results I am getting look perfectly acceptable. Thank you very much. Paulo Barata (Rio de Janeiro - Brazil) __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and

Re: [R] {Link Suspeito} Re: variable (column) in a data frame

2012-07-17 Thread Paulo Barata
Dear Bert and Sarah, Thank you very much for your clarifications on this matter. I will have to study more closely the way extracting subsets of data structures is performed, and I will change my programming habits accordingly. Best regards, Paulo Barata

Re: [R] variable (column) in a data frame

2012-07-17 Thread Paulo Barata
ferent kinds of response. Couldn't this situation be fixed? Isn't it possible to make the df$var notation to issue an error when referring to a non-existent variable inside the data frame? Thank you very much. Paulo Barata --

Re: [R] variable (column) in a data frame

2012-07-15 Thread Paulo Barata
with()? Is there any reason why R does not have such a kind of error message? Thank you again. Paulo Barata - -- Original Message --- From: peter dalgaard To: "Paulo Barata" Cc: r-help@r-project.org Se

Re: [R] variable (column) in a data frame

2012-07-15 Thread Paulo Barata
t aaa==1 ## My point is, if we make a spelling mistake in a program when referring to a variable inside a data frame, using the df$var notation, there seems to be no way of getting warned about that. Thank you once again. Paul

[R] variable (column) in a data frame

2012-07-15 Thread Paulo Barata
make R issue either a warning or an error message in such a situation? I am using R version 2.15.1 64-bit on Windows 7 Professional. Thank you very much. Paulo Barata ----- Paulo Barata ENSP - Fundação Oswaldo Cruz Rua Leopoldo Bul

[R] histograms - function hist() - problems in R 2.13.1

2011-07-17 Thread Paulo Barata
32-bit and 64-bit) on Windows 7 Professional 64-bit. Regards, Paulo Barata ---- Paulo Barata Fundacao Oswaldo Cruz - Oswaldo Cruz Foundation Rua Leopoldo Bulhoes 1480 - 8A 21041-210 Rio de Janeiro - RJ Brazil E-mail: p

[R] histograms - function hist() - problems in R 2.13.1

2011-07-17 Thread Paulo Barata
32-bit and 64-bit) on Windows 7 Professional 64-bit. Regards, Paulo Barata ---- Paulo Barata Fundacao Oswaldo Cruz - Oswaldo Cruz Foundation Rua Leopoldo Bulhoes 1480 - 8A 21041-210 Rio de Janeiro - RJ Brazil E-mail: p

Re: [R] R 2.12.0 - malware detect by antivirus software

2010-10-19 Thread Paulo Barata
Dr. Murdoch and Dr. Ligges, After my contacts with Avira, it seems that the issue caused by their antivirus software (a false positive alarm) has been solved. Now I have been able to install R 2.12.0 flawlessly. Thank you. Paulo Barata

Re: [R] R 2.12.0 - malware detect by antivirus software

2010-10-17 Thread Paulo Barata
this the first time that this happened? Will this be the last time? Best regards, Paulo Barata On 17/10/2010 17:10, Duncan Murdoch wrote: Uwe Ligges wrote: I checked with two online services which ran more than 40 different vi

[R] R 2.12.0 - malware detect by antivirus software

2010-10-17 Thread Paulo Barata
s. Should I proceed with the installation of that version of R? Thank you very much. Paulo Barata ------ Paulo Barata Fundacao Oswaldo Cruz - Oswaldo Cruz Foundation Rua Leopoldo Bulhoes 1480 - 8A 21041-210 Rio de Janeiro - RJ Brazil E-mail: pba

Re: [R] question on "optim"

2010-09-08 Thread Paulo Barata
N web page, but today (8 September 2010) it does not show in the list obtained through the menu. Thank you. Paulo Barata (Rio de Janeiro - Brazil) -- -- On 8/9/2010 11:01

[R] gam (package gam) - diagonal of smoother matrix

2010-07-26 Thread Paulo Barata
=0.5),family=poisson) pr <- predict(r,type='response') o <- order(x) lines(x[o],pr[o]) Thank you very much. Regards, Paulo Barata ---------- Paulo Barata Fundacao Oswaldo Cruz - Oswaldo Cruz Foundation Rua Leopoldo Bulhoes

[R] logistic regression - glm() - example in Dalgaard's book ISwR

2010-07-02 Thread Paulo Barata
s in regression 3 slightly different from those calculated in regressions 1 and 2? I am using R version 2.11.1 on Windows XP. Thank you very much. Paulo Barata ##== begin = ## data in: P. Dalgaard, Introductory Statistics with R, ## 2nd. edition,

[R] function density (stats): parameter n

2010-05-16 Thread Paulo Barata
nsity is estimated". Of course, given that n=800, the next power of 2 would be 1024. With regard to the parameter n, does the R documentation match what function density() actually does? I am using R 2.11.0 running on Windows XP. Thank

[R] packages gdata / gtools - installation in R 2.11.0

2010-04-22 Thread Paulo Barata
w to correctly install package gdata (which depends on gtools) in R 2.11.0? Both R 2.10.1 and R 2.11.0 are running on Windows XP, in the same computer. Thank you very much. Paulo Barata Paulo Barata Fundacao Oswaldo Cruz - Os

[R] data file - function write.fwf - library gdata

2009-02-24 Thread Paulo Barata
--- These are the results: Output file test-1.txt (the correct results): aaa bbb 1 111 2 222 3 333 4 444 5 555 6 666 --- Output file test-2.txt (each line has been split in two lines):

[R] function prop.trend.test (stats)

2008-12-21 Thread Paulo Barata
it generally happens with other statistical functions. I currently use R 2.8.0 running on Windows XP. Regards, Paulo Barata --- Paulo Barata Fundacao Oswaldo Cruz - Oswaldo Cruz Foundation Rua Leopoldo Bulhoes 1480 - 8A 21041-210 Rio de

[R] plotting on the figure margin

2008-09-16 Thread Paulo Barata
equivalent function) to plot a legend on the figure margin? 3. Any other way to plot either symbols or a legend on the margin? I use R 2.7.2, running on Windows XP. Thank you very much. Paulo Barata -------- Paulo Barata Fundacao Oswaldo

[R] barplot with anchored bars

2008-08-21 Thread Paulo Barata
<- c(1,2,3,4) op <- par(yaxs='i') barplot(x) box() par(op) The parameter yaxs='i' does not seem to work with barplot. I use R version 2.7.1, running on Windows XP. Thank you very much. Paulo Barata --------

Re: [R] drawing segments through points with pch=1

2008-07-21 Thread Paulo Barata
completely white: points(x,ybarv,pch=16,col='white') ## just write a black border over the white points (with pch=1) points(x,ybarv,pch=1,col='black') The two new commands are layered on top of the previous ones. To write "on top" of a plot command, use the points co

[R] coin package (conditional inference / permutation): parameter teststat

2008-07-20 Thread Paulo Barata
the relative merits of the "max" and "quad" test statistics, in the case of a two-sample problem with continuous multivariate responses, when using permutation tests. Just for information, I currently use R 2.7.1 running

Re: [R] Problem reading a CSV

2008-07-01 Thread Paulo Barata
Nina, In which way have you obtained your CSV file? Did you export data from an Excel spreadsheet? Regards, Paulo Barata --- Paulo Barata Fundacao Oswaldo Cruz Rua Leopoldo Bulhoes 1480 - 8A 21041-210 Rio de Janeiro - RJ

Re: [R] tiff()-bug (was re:Preparing high quality figures with, tiff as end result)

2008-06-25 Thread Paulo Barata
To the R colleagues, I do not have any problems when running this code, everything works well: tiff() plot(1:1000) dev.off() I am using R 2.7.1 and Windows XP Professional (service pack 2). Regards, Paulo Barata --- Paulo