Short answer: You don't want to override that limit in your R package.
Don't do it.
Long answer: You'll find the reason for this in the 'CRAN Repository
Policy' (https://cran.r-project.org/web/packages/policies.html).
Specifically, the following passage:
"Checking the package should take as littl
... or just put the R expression inside curly brackets, e.g.
tryCatch({
sexsnp[i] = fisher.test(table(data[,3], data[,i+38]))$p
}, error=function(e) print(NA))
Exercise: Compare
> list(a = 2)
$a
[1] 2
with
> list({ a = 2 })
[[1]]
[1] 2
and
> list(b = { a = 2 })
$b
[1] 2
BTW, note how the
ried this: sudo yum install netstat rather than sudo yum install
> net-tools
>
> By the by, what advantages does port4me have as compared to netstat?
>
> THanking you,
> Yours sincerely,
> AKSHAY M KULKARNI
>
>
> From: Henrik Bengtsson
ik,
> The error is:
>
> > library(netstat)
> > free_port()
> sh: netstat: command not found
> Error in system("netstat -n -a", intern = TRUE) :
> error in running command
>
> Thanking you,
> Yours sincerely
> AKSHAY M KULKARN
What's the error?!?
/Henrik
On Tue, Dec 6, 2022 at 10:19 AM akshay kulkarni wrote:
>
> dear members,
>
> I am using free_port() in netstat package in R. It is working in windows but
> not in linux. It is throwing an error in linux. ANy help please?
>
> THanking you,
> Yours sincerely
> AKSHAY M
You need to pass character.only = TRUE to require() whenever you
specify the package using a character variable.
I agree, the error message is confusing.
/Henrik
On Mon, Oct 24, 2022 at 9:26 AM Kelly Thompson wrote:
>
> # Below, when using require(), why do I get the error message "Error
> in i
Is R centrally installed? If so, environment variables 'HTTP_PROXY',
'HTTPS_PROXY', and 'HTTPS_PROXY_USER' could be set for all users by
setting them in the R_HOME/etc/Renviron.site file. R_HOME is the
folder where R is installed. You can find this file from within R by
calling:
> file.path(R.h
or connection objects in R has a
> statically-defined limit of 128. (A few connections are used by
> default, and a few more will likely be used by user code during the
> actual program run.)
>
> Try increasing the limit in #define NCONNECTIONS in
> src/main/connections.c and re-c
On Tue, Dec 14, 2021 at 1:17 AM Andy Jacobson wrote:
>
> Those are good points, Duncan. I am experimenting with a nice checkpointing
> tool called DMTCP. It operates on the system level but is quite OS-dependent.
> It can be found at http://dmtcp.sourceforge.net/index.html.
>
> Still, it would b
I agree with others that this suggests there is a hidden bug in the
code. In addition to running with Valgrind, R-hub's
> rhub::check(platform="linux-x86_64-rocker-gcc-san")
will compile the native code with the Address Sanitizer (ASan) and the
UndefinedBehaviorSanitizer (UBSan). Those have hel
Example illustrating what Duncan says:
> make_formula <- function() { large <- rnorm(1e6); x ~ y }
> formula <- make_formula()
# "Apparent" size of object
> object.size(formula)
728 bytes
# Actual serialization size
> length(serialize(formula, connection = NULL))
[1] 8000203
# A better size est
I just tried on an up-to-date CentOS 7 with R 4.1.1 built from source
using gcc 8.3.1 (from SCL devtoolset-8; so not the default gcc 4.8.5),
and it works there. If of any help, here's the output when installing
to user's personal package library:
> chooseCRANmirror(ind = 1)
> install.packages("fo
You need to use %dorng% from the doRNG package instead of %dopar% when
parallelizing with foreach::foreach() to get reproducible random
numbers. See also
https://www.jottr.org/2020/09/22/push-for-statical-sound-rng/.
/Henrik
On Thu, Aug 19, 2021 at 1:38 PM Eric Berger wrote:
>
> In that case, a
Ashim, as Martin says, there's something really weird going on with
your core R installation. This is definitely not expected, and I
don't know think if I've every seen this reported before. Here are
some questions/comments that might help you move forward and for
others to pitch in:
1. How did
isible(gc())
> > rm(cl)
> > invisible(gc())
> >
>
> The fact that he got 8 warnings when playing a cluster of size 8 makes
> me suspect that omitting stopCluster is the problem.
>
> -Bill
>
> On Thu, Mar 4, 2021 at 10:12 AM Henrik Bengtsson
> wrote:
&g
I don't think 'parallel' is to blame in this case. Those warnings:
Warning in for (i in seq_len(Ne + echo)) { :
closing unused connection 19
come from base::source()
[https://github.com/wch/r-source/blob/9caddc1eaad1f480283f1e98af34a328699d1869/src/library/base/R/source.R#L166-L244].
Unless th
uot;. I think this might be where the confusion is, it may mean
> the remote machine does not have a public IP, but the server machine does.
> I'm in the opposite situation, the server does not have a public IP, but the
> remote does. I'm not sure if this package can handle my cas
If you have SSH access to the workers, then
workers <- c("machine1.example.org", "machine2.example.org")
cl <- parallelly::makeClusterPSOCK(workers)
should do it. It does this without admin rights and port forwarding.
See also the README in https://cran.r-project.org/package=parallelly.
/Henrik
y the
content of .RData may trigger packages being loaded.
/Henrik
On Thu, Oct 22, 2020 at 7:54 PM Jeff Newmiller wrote:
>
> Can you be more specific about what conditions cause R to automatically load
> a package when a .RData file is loaded? My experience has actually been the
>
As Jeff says, it might be that you have a ~/.Rprofile file with
instructions to load packages when R starts. It could also be that
you have a .RData file, which is saved if you answer yes to:
> Save workspace image? [y/n/c]: y
when you quit R. If this file exists, then R loads it and all the
o
the *.RData to launch R, the tempdir() does not respect
> the environmental variable TMPDIR, but launch R by double clicking Rgui
> icon does.
>
> Best,
> Jinsong
>
> On 2020/8/30 0:36, Henrik Bengtsson wrote:
> > It is too late to set TMPDIR in .Renviron. It is one of t
Does serialize(..., version = 2L) do what you want?
/Henrik
On Sat, Aug 29, 2020 at 10:10 AM Sigbert Klinke
wrote:
>
> Hi,
>
> is there in R a way to "normalize" a vector from
> compact_intseq/compact_realseq to a "normal" vector?
>
> Sigbert
>
> Am 29.08.20 um 18:13 schrieb Duncan Murdoch:
> >
It is too late to set TMPDIR in .Renviron. It is one of the
environment variables that has to be set prior to launching R. From
help("tempfile", package = "base"):
The environment variables TMPDIR, TMP and TEMP are checked in turn and
the first found which points to a writable directory is used:
A version of Eric's answer is to use grepl(), which returns a logical vector:
mydata[grepl("ConfoMap", mydata) & grepl("GuineaPigs", mydata)]
with the OR analogue:
mydata[grepl("ConfoMap", mydata) | grepl("GuineaPigs", mydata)]
/Henrik
On Wed, Aug 19, 2020 at 8:24 AM Ivan Calandra wrote:
>
>
FWIW, see also the 'midi' R package
(https://github.com/moodymudskipper/midi). It's not on CRAN. /Henrik
On Thu, Jul 23, 2020 at 12:19 PM Rasmus Liland wrote:
>
> On 2020-07-23 14:19 -0400, Richard M. Heiberger wrote:
> > On Thu, Jul 23, 2020 at 7:21 AM bretschr wrote:
> > >
> > > Dear Vahid,
> On the other hand, [...], you can spawn 20 workers on each of the 10 hosts:
>
> makePSOCKcluster(names = rep(c('Host01', ..., 'Host10'), each = 20))
Unfortunately, this will most likely not work because it will require
200 open connections - one for each worker - but R limits you to 125
(see ?ba
Careful so you don't overwrite an existing ~/.Renviron file; it's safer to
use something like:
cat('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"\n', file="~/.Renviron"
append=TRUE)
/Henrik
On Wed, Apr 29, 2020, 15:33 Fox, John wrote:
> Dear Steven,
>
> It's possible that Windows will hide .Ren
Folks on this list, this is my personal opinion, but please refrain from
answering this person's requests. It's pretty clear by now that they are
misusing your good intentions of trying to help people interested in R to
get their homework-like "questions" answered. There are no indications that
thi
; Execution halted
>
>
> I also tried this:
> Rscript --no-save MR.R ENSG0154803.ld ENSG0154803.matrix
> [1] "ENSG0154803.ld" "ENSG0154803.matrix"
> Error: File not found: NA.matrix
> Execution halted
>
>
> Rscript --no-save MR.R
Maybe it would help to add:
file<-paste(gene,"matrix",sep=".")
if (!file.exists(file)) stop("File not found: ", file)
filecluster<-read.table(file,header=T,sep=" ",dec=".")
/Henrik
On Sat, Nov 23, 2019 at 11:55 AM Duncan Murdoch
wrote:
>
> On 23/11/2019 1:21 p.m., Ana Marija wrote:
> > Hi Dunca
The folder must exist. If not, .libPaths() *silently* ignores it. Could
that be it?
Henrik
On Mon, Oct 21, 2019, 02:32 Jinsong Zhao wrote:
> Hi there,
>
> I have a computer run Win10 with user names in Chinese. I installed R on
> it. It can run normally. When I installed a package, for exampl
Immediately after you get that error:
Error in if (any(diff)) { : missing value where TRUE/FALSE needed
what does
> traceback()
output? (I suspect this error occurs in tools:::checkMD5sums() used
to assert that the package files are correctly downloaded). Also,
going forward, let's try with a
On Sat, Jan 5, 2019 at 9:41 AM Dirk Eddelbuettel wrote:
>
>
> On 5 January 2019 at 09:14, William Dunlap via R-help wrote:
> | You would get these errors ("R: file or directory not found, version: file
> | or directory not found...") if you had a ~/.Rprofile file containing the
> | line 'cat(versi
deparse(graphics::box)
/Henrik
On Thu, Sep 27, 2018 at 3:30 AM Sigbert Klinke
wrote:
>
> Hi,
>
> I want to have a function, e.g. graphics::box, as text.
> Currently I'am using
>
> deparse(eval(parse(text='graphics::box')))
>
> It is important that '::' and ':::' can be used in the name.
>
> Is th
uot;).
Yes, it looks like a "connection problem" - this could be a firewall
issue or similar. I'm not on macOS, so I cannot help you there, but
maybe others can pitch in.
/Henrik
>
> Thanks,
> Zhihao
> --
> Zhihao (Daniel) Huang
> Graduate Student
> Departmen
Hi,
did you see my answer on StackOverflow? Specifically, if you set
argument 'outfile = NULL' to either of those two functions, you'll get
a little bit more information that *might* provide some clues.
/Henrik
On Sun, Sep 16, 2018 at 5:38 PM Zhihao Huang wrote:
>
> Hi all,
>
> The function ma
On Thu, Sep 13, 2018 at 7:12 PM Rich Shepard wrote:
>
> On Thu, 13 Sep 2018, Henrik Bengtsson wrote:
>
> >> sink('stat-summaries/estacada-se-precip.txt')
> >> print(summary(estacada_se_wx))
> >> sink()
> >>
> >> wh
On Thu, Sep 13, 2018 at 6:05 PM Rich Shepard wrote:
>
> On Thu, 13 Sep 2018, MacQueen, Don wrote:
>
> > In my experience, any path that can be used at the shell prompt in a
> > unix-alike can be used anywhere that R wants a file name.
>
> Don,
>
>That's been my experiences, too.
>
> > Hopefull
On Thu, Sep 13, 2018 at 3:33 PM Rich Shepard wrote:
>
>Neither ?sink nor ?capture.output indicates how the output file can be
> specified to be in a directory other than the cwd.
>
>When the cwd is ../analyses/ and I want the output to be in
> ../analyses/stat-summaries/ how do I write thi
On Mon, Aug 13, 2018 at 3:51 AM Rolf Turner wrote:
>
>
> OK everybody! You can relax. :-) I managed to spot the loony. After
> mucking around with valgrind, and before trying gdb, I had one more look
> at my code and *finally* saw the stupid thing that I had been doing.
>
> In the call to .Fort
The ll() function of R.oo returns a data.frame with various attributes that
you can subset on, e.g.
> subset(R.oo::ll(), data.class %in% c("zoo", "xts"))
member data.class dimension objectSize
2 fzzoo10 1344
4 sample.xtsxts c(180,4) 10128
5
Some more info:
1. The library folder have to exist; if not, then R will silently ignore it.
2. Try call your .libPaths(my_new_folder) setup in an interactive R
session. Then, in the same session, look at .libPaths(). The first
element should be your new folder. If not, make sure it exists, e.
This is intended/expected because the spdep package *depends* on the
spData package (see https://cran.r-project.org/web/packages/spdep/),
which means that the maintainer of spdep intends also spData to be
*attached* whenever spdep is attached.If they would have only
imported it, then spData wou
It turns out that that 'x' comes from the spData package and lives
inside that package (part of its namespace).
> spData::x
[1] 0 30 60 90 120 150 180 210 240 270 300 330 360 390 420 450
This is conceptually no different from other objects in package
namespace, although we are more used to
If you're installing packages to the default location in your home
account and you didn't remove those library folders, you still have
you R 3.4 package installs there, e.g.
> dir(dirname(.libPaths()[1]), full.names = TRUE)
[1] "/home/hb/R/x86_64-pc-linux-gnu-library/3.4"
[2] "/home/hb/R/x86_64-pc
I guess I misread your question. /Henrik
On Wed, Apr 11, 2018 at 12:15 PM, Marcos Fiorini
wrote:
> Hi Albrecht, thanks for your return.
>
> I'm using the SUSE Linux Enterprise Server 11 (x86_64) PATCHLEVEL = 4 and
> not the openSUSE. Do you know if exist a compatibility list of R and Linux
> v
Hi,
your question is nearly impossible to answer without actual testing of
your existing pipelines. But from my soon 20-year usage of R, it's
clear to me that the R Core Team strives to keep things backward
compatible as far as they can. The NEWS file:
https://cran.r-project.org/doc/manuals/r
FYI, in R devel (to become 3.5.0), there's isFALSE() which will cut
some corners compared to identical():
> microbenchmark::microbenchmark(identical(FALSE, FALSE), isFALSE(FALSE))
Unit: nanoseconds
expr min lqmean median uq max neval
identical(FALSE, FALSE) 984 113
On Sun, Mar 4, 2018 at 3:23 PM, Duncan Murdoch wrote:
> On 04/03/2018 5:54 PM, Henrik Bengtsson wrote:
>>
>> The following helps identify when .GlobalEnv$.Random.seed has changed:
>>
>> rng_tracker <- local({
>>last <- .GlobalEnv$.Random.seed
>>
On Sun, Mar 4, 2018 at 10:18 AM, Paul Gilbert wrote:
> On Mon, Feb 26, 2018 at 3:25 PM, Gary Black
> wrote:
>
> (Sorry to be a bit slow responding.)
>
> You have not supplied a complete example, which would be good in this case
> because what you are suggesting could be a serious bug in R or a pa
The following helps identify when .GlobalEnv$.Random.seed has changed:
rng_tracker <- local({
last <- .GlobalEnv$.Random.seed
function(...) {
curr <- .GlobalEnv$.Random.seed
if (!identical(curr, last)) {
warning(".Random.seed changed")
last <<- curr
}
TRUE
}
})
a
On Fri, Feb 23, 2018 at 1:55 PM, William Dunlap via R-help
wrote:
> Does setting the environment variable TMPDIR, before starting R,
> to a directory on a bigger file system help? On Linux I get
>
> % mkdir /tmp/RTMP-BILL
> % env TMPDIR=/tmp/RTMP-BILL R --quiet --vanilla
> > tempdir()
> [
It looks like OP uses a data.frame, so in order to use matrixStats
(I'm the author) one would have to pay the price to coerce to a matrix
before using matrixStats::rowMaxs(). However, if it is that the
original data could equally well live in a matrix, then matrixStats
should be computational effi
ER=localhost PORT=11414 OUT=/dev/null
TIMEOUT=2592000 XDR=TRUE
/Henrik
On Sun, Dec 3, 2017 at 9:06 PM, Andreas Leha
wrote:
> Hi Henrik,
>
> Thanks for the detailed in fast reply!
>
> My guess would be that the confusion comes from the different use of nice and
> renice.
>
You could try with png2() in the R.devices package, which is just a
convenient wrapper around the bitmap() device which can also produce PNGs.
It's not perfect but it might get you going.
Henrik
On Feb 1, 2018 08:24, "Sariya, Sanjeev" wrote:
> Thanks for your reply. I searched for the error on
The diffobj package (https://cran.r-project.org/package=diffobj) is
really helpful here. It provides "diff" functions diffPrint(),
diffStr(), and diffChr() to compare two object 'x' and 'y' and provide
neat colorized summary output.
Example:
> iris2 <- iris
> iris2[122:125,4] <- iris2[122:125,4]
To expand on what Bert suggests. Use:
loadToEnv <- function(file, ..., envir = new.env()) {
base::load(file = file, envir = envir, ...)
}
envA <- loadToEnv("a.RData")
envB <- loadToEnv("b.RData")
and then access the objects in environments envA and envB using
environment access methods, e.g.
This can be controlled by environment variables R_LIBS, R_LIBS_SITE,
and R_LIBS_USER, which support "conversion specifiers". See
help(".libPaths") or aliases help("R_LIBS") etc. You can set these in
in any of the Renviron files (~/.Renviron, /path/to/R/etc/Renviron,
/path/to/R/etc/Renviron.site).
The 'webshot' package (on CRAN) can do this.
Henrik
On Jan 6, 2018 05:27, "Christofer Bogaso"
wrote:
> Hi,
>
> I would appreciate if someone can give me a pointer on how to save a
> webpage programmatically using R.
>
> For example, let say I have this webpage open in my browser:
>
> http://www
Looks like a bug to me due to wrong assumptions about 'nice'
arguments, but could be because a "non-standard" 'nice' is used. If
we do:
> trace(system, tracer = quote(print(command)))
Tracing function "system" in package "base"
we see that the system call used is:
> cl <- parallel::makePSOCKclu
Here's my view on this:
CRAN = Comprehensive R Archive Network. The "Archive" part is very
important - it "promises" the research community that R packages that
have ever been published on CRAN, and all the versions of each
package, will be available also in the future. It requires quite a
bit f
I'm not sure I follow what.the problem is. Are you trying to
set R_LIBS_USER but R does not acknowledge it, or do you observe something
in R that you didn't expect to be there and you are trying to figure out
why that is / where that happens?
Henrik
On Sep 16, 2017 07:10, "Rene J Suarez-Soto" wr
There's also the alternative to use both, e.g. by having a system
environment variable set a corresponding R option, which then can be
overridden using options(). For instance, the R option mc.cores,
which is used by the parallel package, is set to the (integer) value
of system environment variabl
You can use:
> files <- list.files(path = "folder01")
> files <- gtools::mixedsort(files)
to order the files in a "human-friendly" order rather than
lexicographic order (which sort() provides).
FYI 1; it's preferred to use file.path("folder01", list[i]) rather
than paste('folder01',lists[i],sep=
This is what the R.rsp (https://cran.r-project.org/package=R.rsp; I'm
the author) and it's RSP markup is good at and was designed to handle.
We're using it lots in report generation where we iterate of elements,
e.g. over the 24 chromosomes. See Section 2.3 in
https://cran.r-project.org/web/packag
That Rscript stalls sounds like a bug, but not sure it's R or the
terminal that needs to be fixed:
Rscript -e "$long_expression"
WARNING: '-e
{x~+~<-~+~c(-1.31171,~+~-0.686165,~+~1.62771,~+~0.320195,~+~-0.322011,~+~1.66518,~+~-0.271971,~+~-0.665367,~+~0.516482,~+~-0.716343,~+~-0.317471,~+~0.068
I'd be really surprised if basically not all text editors could be
used here; it more that some have quirks making it less obvious. For
instance, with plain old Notepad that comes with all Windows distros
you can put (double) quotes around the file name in the Save As...
dialog to prevent Notepad
Did you try any of the troubleshooting I suggested? If you do that, I'm
99.99% certain it'll help you to resolve this.
Henrik
On Apr 17, 2017 03:07, "Bruce Ratner PhD" wrote:
David:
When I launch Rstudio the effects of the Rprofile do not show, e.g., I want
the prompt to be "R> " instead of th
Hi.
First, there should be no difference in where and how R and RStudio
locate the R startup file.
Second, if there is an .Rprofile in the working directory (i.e.
./.Rprofile), then that file with have higher priority than the file
located in ~/.Rprofile. You can use the following R calls, also
Today, it is been 20 years since Martin Mächler started the R-help
community list (https://stat.ethz.ch/pipermail/r-help/). The first
post was written by Ross Ihaka on 1997-04-01:
Subject: R-alpha: R-testers: pmin heisenbug
From: Ross Ihaka
When: Tue Apr 1 10:35:48 CEST 1997
Archive: https://stat
R for Windows is a bit peculiar where it locates your .Rprofile file,
or rather what it consider to be your home directory. If you look
from within R, the file you do want to create / edit is:
> f <- normalizePath("~/.Rprofile", mustWork = FALSE)
> f
[1] "C:\\Users\\joe\\Documents\\.Rprofile"
Fo
Quick comment: sapply() / parSapply() can behaves "unexpectedly". To
troubleshoot this, use parLapply() instead to see if you at least get the
individual results you think you should get.
Henrik
On Feb 2, 2017 08:03, "Art U" wrote:
> Hello,
>
> I have a data orig.raw that contains 8 predictors
On Wed, Jan 11, 2017 at 3:56 PM, Rolf Turner wrote:
> On 11/01/17 23:12, Benjamin Tyner wrote:
>>
>> Hi,
>>
>> On my linux machine (Ubuntu, and also tested on RHEL), I am curious to
>> know what might be causing file.exists (and also normalizePath) to not
>> see the final device file here:
>>
>>
On Tue, Jan 3, 2017 at 2:43 PM, William Dunlap via R-help
wrote:
> I am interested in measuring the time it takes to run an expression.
> system.time(expr) does this but I would like to have it report just 'more
> than xxx seconds', where xxx is a argument to the timing function, when it
> takes
On Windows 32-bit I think (it's been a while) you can push it to 3 GB but
to go beyond you need to run R on 64-bit Windows (same rule for all
software not just R). I'm pretty sure this is already documented in the R
documentation.
Henrik
On Nov 22, 2016 19:49, "Ista Zahn" wrote:
Not convenient
On Nov 13, 2016 13:54, "Henrik Bengtsson"
wrote:
>
> It looks like a bug. I don't think c.Date() is every called, because:
>
> > trace(c.Date, tracer = quote(message("c.Date() called")))
> Tracing function "c.Date" in package "base
It looks like a bug. I don't think c.Date() is every called, because:
> trace(c.Date, tracer = quote(message("c.Date() called")))
Tracing function "c.Date" in package "base"
[1] "c.Date"
Tracing works:
> c(as.Date(1L), as.Date(10001L))
Tracing c.Date(as.Date(1L), as.Date(10001L)) on ent
1. It could be that a virus checker locks the file.
2. There are Windows software tools that identify which process locks
a particular file, e.g. LockHunter (http://lockhunter.com/). Those
should help you figure out what's going on.
3. R.utils::downloadFile() tries it's best to download files
at
which(df == 1, arr.ind=TRUE) is useful here:
> df <- matrix(c(0,NA,0,0,0,1,1,1,0,0,1,0,0,0,NA), nrow=3)
> df
[,1] [,2] [,3] [,4] [,5]
[1,]00100
[2,] NA0110
[3,]0100 NA
> ## Identify (row,col) indices for 1:s
> idxs <- which(df == 1, arr
I second Mike's proposal - it works, e.g.
https://github.com/HenrikBengtsson/affxparser/blob/5bf1a9162904c56d59c4735a8d7eb427e4f085e4/R/readCcg.R#L535-L583
Here's an outline. Say each row consists of tuple (=4-byte
integer, =4-byte float, ss=2 byte integer) so that the
byte-by-byte content
nless there's a better way to do it* (which is my question
>>-
>>is there?). I'm possibly just pushing the whole procedural scripting
>>thing too far, but I also think that this likely isn't uncommon in R.
>>
>>Any thoughts greatly appreciated!
>&
In R.utils (>= 2.4.0), which I hope to submitted to CRAN today or
tomorrow, you can simply call:
R.utils::gcDLLs()
It will look at base::getLoadedDLLs() and its content and compare to
loadedNamespaces() and unregister any "stray" DLLs that remain after
corresponding packages have been unloaded
On Tue, Sep 6, 2016 at 2:00 AM, Rainer M Krug wrote:
> Please reply to the mailing list to keep the conversation available for
> everybody. I Send this mail to the mailing list as well.
>
> Simone Tenan writes:
>
>> Thanks Rainer,
>> it's very kind of you.
>> Unfortunately, I cannot save the (lar
Also, the recommended way to build file paths is to use file.path(), i.e.
file.path("C:", "temp", filename)
rather than
paste0("C:/temp/", filename)
BTW, R provides tempdir() that gives you the temporary directory that
R prefers to use on your OS. So, you might want to consider using:
Sounds like it would be helpful to find out exactly which process is
holding on to the file in order to figure out what's going on. From a
quick look, it seems that
http://superuser.com/questions/117902/find-out-which-process-is-locking-a-file-or-folder-in-windows
gives some useful info on how
On Wed, Apr 20, 2016 at 1:25 AM, Martin Maechler
wrote:
>>>>>> Henrik Bengtsson
>>>>>> on Tue, 19 Apr 2016 14:04:11 -0700 writes:
>
> > Using the Matrix package, how can I create a row-oriented sparse
> > Matrix from scratch pop
Using the Matrix package, how can I create a row-oriented sparse
Matrix from scratch populated with some data? By default a
column-oriented one is created and I'm aware of the note that the
package is optimized for column-oriented ones, but I'm only interested
in using it for holding my sparse row
value. If you use
the default
X <- matrix(nrow=1001*1001, ncol=3650)
you'll get a logical matrix, which will introduce a copy as soon as
you assign a double value (e.g. X[1,1] <- 3.14). The latter is a
complete waste of memory/time. See
http://www.jottr.org/2014/06/matrixNA-wrong-
On Fri, Mar 18, 2016 at 3:15 PM, Roy Mendelssohn - NOAA Federal
wrote:
> Thanks. That is what I needed to know. I don’t want to play around with
> some of the other suggestions, as I don’t totally understand what they do,
> and don’t want to risk messing up something and not be aware of it.
>
Don't know what `population` is, but a simple assignment
MVAR <- population
may provide what you need. Note, no c(). For example,
> foo <- rnorm
> foo(3)
[1] -0.08093862 -0.87827617 1.52826914
/Henrik
On Wed, Feb 3, 2016 at 9:41 AM, Amoy Yang via R-help
wrote:
> There is a %LET statement
FYI, the matrix you tried to allocate would hold
(3195*1290*495*35*35*35*15) * 3 = 3.936248e+15 values. Each value
would occupy 8 bytes of memory (for the double data type). In other
words, in order to keep this data matrix in memory you would require a
computer with at least 3.148998e+16 bytes o
The R.devices package provides functions for this. For instance, you
can open several devices with different labels and the close then in
whatever order you'd like:
> library("R.devices")
> devSet("foo")
> plot(1:10)
> devSet("bar")
> plot(10:1)
> devSet("foo")
> points(10:1)
> devSet("bar")
> de
On Sat, Dec 12, 2015 at 6:08 AM, Hadley Wickham wrote:
> On Sat, Dec 12, 2015 at 3:54 AM, Martin Maechler
> wrote:
>>>>>>> Henrik Bengtsson
>>>>>>> on Fri, 11 Dec 2015 08:20:55 -0800 writes:
>>
>> > On Fri, Dec 11, 2015 at 8
On Fri, Dec 11, 2015 at 8:10 AM, David Winsemius wrote:
>
>> On Dec 11, 2015, at 5:38 AM, Dario Beraldi wrote:
>>
>> Hi All,
>>
>> I'd like to understand the reason why stopifnot(logical(0) == x) doesn't
>> (never?) throw an exception, at least in these cases:
>
> The usual way to test for a leng
> filenames <- c("Q_Read_prist#1...@1.xls", "Q_Read_prist#1...@10.xls",
> "Q_Read_prist#1...@2.xls")
> filenames <- gtools::mixedsort(filenames, numeric.type="decimal")
> filenames
[1] "Q_Read_prist#1...@1.xls" "Q_Read_prist#1...@2.xls"
"Q_Read_prist#1...@10.xls"
/Henrik
On Fri, Dec 4, 2015 a
When choosing source format, it's probably helpful to know that if you
work with a Markdown-based format (e.g. Rmarkdown) you'll be able to
generate either/both HTML or/and PDF documents, whereas if you work
with LaTeX-based formats (e.g. Sweave/knitr) you will only be able
output PDF documents (at
On Tue, Nov 10, 2015 at 9:00 AM, Yihui Xie wrote:
> The short answer is you cannot. Inline R code is always evaluated.
> When it is not evaluated, I doubt if your output still makes sense,
> e.g. "The value of x is `r x`." becomes "The value of x is ." That
> sounds odd to me.
>
> If you want to d
My guess is that your on Windows. If so, make sure to change settings in
Explorer to always show filename extensions, because now I think it drops
.txt when it lists/displays your files (this is one of the most annoying
features in Windows).
Also, some basic editors add .txt extension when you sav
In addition,
if you go to https://stat.ethz.ch/mailman/listinfo/r-help (which is in
the footer of every R-help message), you'll find a link to 'R-help
Archives' (https://stat.ethz.ch/pipermail/r-help/). On that latter
page, you'll see all messages that have been sent out to the list.
That will al
14\tx")
> str(read.table(textConnection(kkk),
>sep="\t",
>header = TRUE))
>
> str(read.table(textConnection(kkk),
>sep="\t",
>header = TRUE,
>colClasses=c(b="character")
1 - 100 of 576 matches
Mail list logo