Displaying 20 results from an estimated 10000 matches similar to: "weighted.median function from package R.basic"
2019 Oct 11
2
New matrix function
I think you are confusing package and function here. Plus some of the R
Core packages, that you mention, contain functions that should probably be
replaced by functions with better implementation from packages on CRAN.
Best regards
Morgan
On Fri, 11 Oct 2019 15:22 Joris Meys, <jorismeys at gmail.com> wrote:
>
>
> On Fri, Oct 11, 2019 at 3:55 PM Morgan Morgan <morgan.emailbox
2018 Jun 09
4
Date class shows Inf as NA; this confuses the use of is.na()
And now I've seen I copied the wrong part of ?is.na
> The default method for is.na applied to an atomic vector returns a
logical vector of the same length as its argument x, containing TRUE for
those elements marked NA or, for numeric or complex vectors, NaN, and FALSE
otherwise.
Key point being "atomic vector" here.
On Sat, Jun 9, 2018 at 1:41 PM, Joris Meys <jorismeys at
2018 Sep 18
3
memory footprint of readRDS()
Dear all,
I tried to read in a 3.8Gb RDS file on a computer with 16Gb available
memory. To my astonishment, the memory footprint of R rises quickly to over
13Gb and the attempt ends with an error that says "cannot allocate vector
of size 5.8Gb".
I would expect that 3 times the memory would be enough to read in that
file, but apparently I was wrong. I checked the memory.limit() and that
2018 Jan 31
3
Best practices in developing package: From a single file
On 31/01/2018 6:33 AM, Joris Meys wrote:
> 3. given your criticism, I'd like your opinion on where I can improve
> the documentation of https://github.com/CenterForStatistics-UGent/pim.
> I'm currently busy updating the help files for a next release on CRAN,
> so your input is more than welcome.
After this invitation I sent some private comments to Joris. I would
say his
2018 Apr 24
1
data.table not available as win binary for R 3.5 yet?
Dear all,
to my astonishment data.table cannot be installed on R 3.5 Windows. When
checking the package page, the Windows binary is available for download.
When checking the server however, I can't seem to find data.table. Also
install.packages() says the package is only available in source form and
may need compilation.
Compiling using Rtools 35 is no problem.
Is this merely an issue of
2018 Jan 31
1
Best practices in developing package: From a single file
I fully agree with Joris and Hadley on roxygen2.
Additionally:
I wrote and published my first package before roxygen (or roxygen2) was
available. I found editing .Rd extremely terse (especially when code is
updated). For example, the fact that there are no spaces allowed between }
and { in \param{}{} has hurt my brain quite a few times, especially since R
CMD check did not give any useful error
2018 Mar 24
1
Possible bug: file.exists() always returns TRUE for prn.us.txt
Thank you. I was just replying my own message with the same information.
Sorry for not doing the research properly before filing.
Cheers
Joris
On Sat, Mar 24, 2018 at 11:36 AM, Duncan Murdoch <murdoch.duncan at gmail.com>
wrote:
> On 24/03/2018 6:16 AM, Joris Meys wrote:
>
>> Dear all,
>>
>> while preparing some exercises I came across some highly surprising
2018 Mar 16
2
Apparent bug in behavior of formulas with '-' operator for lm
Joris, the point is that 'z' is NOT used as a predictor in the model.
Therefore it should not affect predictions. Also, I find it suspicious that
the error only occurs when the response variable conitains missings and 'z'
is unique (I have tested several other cases to confirm this).
-Mark
Op vr 16 mrt. 2018 om 13:03 schreef Joris Meys <jorismeys at gmail.com>:
>
2018 May 30
1
CRAN checks give errors when no tests are included
Dear all,
as a follow-up to the question asked on R-package-devel (see link below):
Someone sent a package to CRAN with a few problems. There's more things
wrong with the submission, but one thing that really caught my eye was the
following error:
Warning message:
running command '"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" CMD BATCH --vanilla
"testthat.R"
2010 Apr 02
2
compare multiple values with vector and return vector
Dear all,
I have a vector, and for each element I want to check whether it is equal to
any element from another vector. I want a vector of logical values with the
length of the first one as return. In R this would be :
> x <- 1:10
> sapply(x,function(y){any(y==c("2","3","4"))})
[1] FALSE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE
It works pretty
2010 May 28
1
How to get values out of a string using regular expressions?
Dear all,
I have a vector of filenames which begins like this :
X <- c("OrthoP1_DNA_str.aln", "OrthoP10_DNA_str.aln",
"OrthoP100_DNA_str.aln",
"OrthoP101_DNA_str.aln", "OrthoP102_DNA_str.aln", "OrthoP103_DNA_str.aln",
"OrthoP104_DNA_str.aln", "OrthoP105_DNA_str.aln", "OrthoP106_DNA_str.aln",
2018 Mar 14
2
truncation/rounding bug with write.csv
I don't see the issue here. It would be helpful if people would report
their sessionInfo() when reporting whether or not they see this issue.
Mine is
> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Arch Linux
Matrix products: default
BLAS/LAPACK: /usr/lib/libopenblas_haswellp-r0.2.20.so
locale:
[1] LC_CTYPE=en_US.UTF-8
2018 May 24
2
Creating S3 methods for S4 classes (coming from r-package-devel)
Dear all,
I asked this question on r-package-devel but Martin Maechler pointed out
this was more suited on R-devel. So here it goes:
per the manual, one should create and register both the S3 and a S4 method
if one needs a method for an S4 class for a function using S3 dispatching.
This is cumbersome, and not very optimal.
I was wondering if there's a better way to do this. Currently I
2010 May 04
1
Avoiding for-loop for splitting vector into subvectors based on positions
Dear all,
I'm trying to optimize code and want to avoid for-loops as much as possible.
I'm applying a calculation on subvectors from a big one, and I get the
subvectors by using a vector of starting positions:
x <- 1:10
pos <- c(1,4,7)
n <- length(x)
I try to do something like this :
pos2 <- c(pos, n+1)
out <- c()
for(i in 1:n){
tmp <- x[pos2[i]:pos2[i+1]]
2018 May 02
7
download.file does not process gz files correctly (truncates them?)
Dear all,
I've noticed by trying to download gz files from here :
https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM907811
At the bottom one can download GSM907811.CEL.gz . If I download this
manually and try
oligo::read.celfiles("GSM907811.CEL.gz")
everything works fine. (oligo is a bioConductor package)
However, if I download using
download.file("
2018 Mar 14
2
truncation/rounding bug with write.csv
To my surprise, I can confirm on Windows 10 using R 3.4.3 . As tail is not
recognized by Windows cmd, I replaced with:
system('powershell -nologo "& "Get-Content -Path temp.csv -Tail 1')
The last line shows only 7 digits after the decimal, whereas the first have
15 digits after the decimal. I agree with Dirk though, 1.6Gb csv files are
not the best way to work with
2010 May 25
2
Calculation time of isoMDS and the optimal number of dimensions
Dear all,
I'm running a set of nonparametric MDS analyses, using a wrapper for isoMDS,
on a 800x800 distance matrix. I noticed that setting the parameter k to
larger numbers seriously increases the calculation time. Actually, with k=10
it calculates already longer than for k=2 and k=5 together. It's now
calculating for 6 hours, and counting...
There is quite a difference between the
2018 Aug 30
3
ROBUSTNESS: x || y and x && y to give warning/error if length(x) != 1 or length(y) != 1
On 08/30/2018 01:56 PM, Joris Meys wrote:
> I have to agree with Emil here. && and || are short circuited like in C and
> C++. That means that
>
> TRUE || c(TRUE, FALSE)
> FALSE && c(TRUE, FALSE)
>
> cannot give an error because the second part is never evaluated. Throwing a
> warning or error for
>
> c(TRUE, FALSE) || TRUE
>
> would mean
2010 Apr 05
1
use of random and nested factors in lme
Dear all,
I've read numerous posts about the random and nested factors in lme,
comparison to proc Mixed in SAS, and so on, but I'm still a bit confused by
the notations. More specifically, say we have a model with a fixed effect F,
a random effect R and another one N which is nested in R.
Say the model is described by Y~F
Can anyone clarify the difference between :
random = ~1|R:N
random
2018 Jan 31
3
Best practices in developing package: From a single file
Dear All:
stepping in late, but @Joris, if you would like to take 'from a single file' literally,
have a look at:
https://github.com/bpfaff/lp4rp
(lp4rp: literate programming for R packages);
Cheers,
Bernhard
ps: incidentally, within the noweb-file roxygen is employed.
-----Urspr?ngliche Nachricht-----
Von: R-devel [mailto:r-devel-bounces at r-project.org] Im Auftrag von Joris