Displaying 20 results from an estimated 40000 matches similar to: "storing the return of system() function"
2011 Apr 22
3
Parametrized object name in Save statement
Greetings All,
I am looking to write a parametrized Rscript that will accept a variable
name(that also is the name of the flat file), transform the data into a data
frame and preform various modeling on the structure and save the output and
plot of the model. In this example i am using a rpart decision tree. The
only problem i am having is integrating the parameter into the internal
object name
2019 Jul 15
1
Possible bug in `class<-` when a class-specific '[[.' method is defined
Hello,
Inline.
?s 14:26 de 15/07/19, Duncan Murdoch escreveu:
> On 15/07/2019 8:57 a.m., Rui Barradas wrote:
>> Hello,
>>
>> Clean R 3.6.1 session on Ubuntu 19.04, RStudio 1.1.453. sessionInfo() at
>> the end.
>
> That's not what I'd call a "clean session" with all those packages loaded:
You are right, but when I wrote that it *was* clean.
2020 Jun 06
3
Change in package.skeleton behavior from R 3.6.3 to R 4.0.0 ?
The Rcpp package and some related packages such as RcppArmadillo make use of
(local) wrappers around the utils::package.skeleton() function for creating
(basic yet functional) packages using Rcpp or RcppArmadillo. RStudio also
exposes this under the graphical menu as a nice way to construct a package.
But it seems that something changed quite recently in R. I looked into this a
little yesterday
2024 Dec 17
1
R_CheckUserInterrupt() can be a performance bottleneck within GUIs
tl;dr: R_CheckUserInterrupt() can be a performance bottleneck
within GUIs. This also affects functions in the 'stats'
package, which could be improved by changing the position
of calls to R_CheckUserInterrupt().
Dear all,
Recently I was puzzled because some code in a package under development,
which consisted almost entirely of a .Call() to a function written in
2016 May 10
2
Codificacion de caracteres
Hola Javier:
Me alegra saber que no soy el único cenutrio que se ha topado con esto. ?
Se trata de un proceso de R que extrae datos de un fichero px descargado del INE y que contiene datos a nivel de municipio y de Comunidad Autónoma (que intento eliminar) antes de hacer la carga en el SQL Server porque solo me interesan las provincias.
La BD no es ningún problema (el error se produce al tratar
2011 Aug 17
1
A question about using getSrcDirectory() with R/Rscript
Good morning R-help,
I have an idiot question: I would like to use getSrcDirectory()
and friends to allow me to identify where an R file has been
called from when invoked using Rscript. If I understand the
documentation correctly, the following example should work:
In file test.R:
options(keep.source=T)
fn<-function(x){x<-x+1}
srcDir<-getSrcDirectory(fn)
print(srcDir)
I
2024 Dec 17
1
R_CheckUserInterrupt() can be a performance bottleneck within GUIs
A more generic solution would be for R to throttle calls to
R_CheckUserInterrupt(), because it makes no sense to check 1000 times
per second if a user has interrupted, but it is difficult for the
caller to know when R_CheckUserInterrupt() has been last called, or do
it regularly without over-doing it.
Here is a simple patch: https://github.com/r-devel/r-svn/pull/125
See also:
2011 May 17
1
Rscript hangs on exit with ubuntu 11.04
Hi,
I have run into a strange issue with Rscript and plyr. When running
the following Rscript:
#!/usr/bin/Rscript
library(plyr)
d = ddply(data.frame(a=1:101,b=1:101), .(a,b), nrow)
head(d)
the script does not terminate. It prints out the results from head(d),
but does not return to the shell. By changing the a and b to 1:100,
the script returns. The same code running within the R shell works
2024 Dec 17
1
R_CheckUserInterrupt() can be a performance bottleneck within GUIs
This seems like a great idea. Would it help to escalate this to a
post on R-bugzilla, so it is less likely to fall through the cracks?
On 12/17/24 09:51, Jeroen Ooms wrote:
> A more generic solution would be for R to throttle calls to
> R_CheckUserInterrupt(), because it makes no sense to check 1000 times
> per second if a user has interrupted, but it is difficult for the
> caller to
2024 Dec 18
2
R_CheckUserInterrupt() can be a performance bottleneck within GUIs
It seems benign, but has implications since checking time is actually not a cheap operation: adding jus ta time check alone incurs a penalty of ca. 700% compared with the time it takes to call R_CheckUserInterrupt(). Generally, it makes no sense to check interrupts at every iteration - you'll find code like if (++i % 10000 == 0) R_CheckUserInterrupt(); in loops to make sure it's not called
2023 Jun 06
2
Fwd: package interflex
On 6 June 2023 at 23:33, Johan Andresen wrote:
| Cheers - my response mixes up the order of things:
|
| The suggested apt way INSTALLED INTERFLEX nicely. Lesson learned: install
| dependencies from apt if a package/library isn't in apt search.
|
| Yes I also tried install.packages('interflex'). RStudio console complained
| about the same packages like this:
| ERROR: dependency
2016 Nov 15
2
Missing objects using dump.frames for post-mortem debugging of crashed batch jobs. Bug or gap in documentation?
Martin, thanks for the good news and sorry for wasting your (and others
time) by not doing my homework and query bugzilla first (lesson learned!
).
I have tested the new implementation from R-devel and observe a semantic
difference when playing with the parameters:
# Test script 1
g <- "global"
f <- function(p) {
l <- "local"
dump.frames()
}
2013 Jul 18
1
Looking for knitr example for beginner (NO RStudio)
Hi everyone,
I am using package knitr, FIRST TIME. I don't have access to RStudio.
Read through Yihui's page, didn't find it helpful. Stuck on terms
Rnw, GFM (GitHub Flavored Markdown). Never used Sweave, so the
reference is not helping.
Is there a simple step-by-step example WITHOUT RStudio?
My question:
What is the procedure? The documentation explains the functions, but
does
2018 Apr 24
0
Copy text from Script syntax into .txt
Look at the spin and stitch functions in the knitr package if you want
to process an existing script into an output that mixes the code run
with the output.
Look at the txtStart and related functions in the TeachingDemos
package if you want the code and output saved in a file from a session
where you are typing in commands.
If in general you want text, code, and output mixed, learn the knitr
2019 Jun 04
2
MacOS parallel::makeCluster fails
Hi all,
The call parallel::makeCluster(1L) hangs infinitely on my MacOS machine which seems to be already reported by some people (e.g., https://stat.ethz.ch/pipermail/r-devel/2018-February/075565.html).
However, the solutions posted on SO, GH or R-devel do not work in my case.
So far, I unsuccessfully tested ?
1. Couple of reboots
2. Adding 192.0.0.1 to /etc/hosts
3. Using R.app
2024 Dec 18
1
R_CheckUserInterrupt() can be a performance bottleneck within GUIs
On 12/18/24 01:19, Simon Urbanek wrote:
> It seems benign, but has implications since checking time is actually not a cheap operation: adding jus ta time check alone incurs a penalty of ca. 700% compared with the time it takes to call R_CheckUserInterrupt(). Generally, it makes no sense to check interrupts at every iteration - you'll find code like if (++i % 10000 == 0)
read.csv fails in R console in Ubuntu terminal but works in RStudio after R 3.6.3 upgrade to R 4.0.2
2020 Jul 15
2
read.csv fails in R console in Ubuntu terminal but works in RStudio after R 3.6.3 upgrade to R 4.0.2
Hi,
I am trying to download some data using read.csv and it works perfectly in
RStudio and fails in the R console in the terminal in Ubuntu 18.04 after
upgrading from R 3.6.3 to 4.0.2. Before upgrading this worked in the R
console in the terminal also without any issues.
Why would that be? How to fix this?
Below please find R code output and sessionInfo().
*Works in RStudio*
>
2018 Apr 24
6
Copy text from Script syntax into .txt
Hi everybody,
How can I get text from RScript (e.g. syntax, reminder) into the result
text.
Sink() does not do that - I only read the results and therefore I have to
'guess' which syntax was used where - reminders I wrote are lost.
Bw and thank you in advance,
Roberto
[[alternative HTML version deleted]]
2018 Apr 24
0
Copy text from Script syntax into .txt
Dear Roberto,
The easiest way IMHO is to convert your script into an R markdown
document. See https://rmarkdown.rstudio.com/
Best regards,
ir. Thierry Onkelinx
Statisticus / Statistician
Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE
AND FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
2011 Jul 01
2
methods package not loaded by default when using Rscript in R2.13
Dear all,
As the object of this mail suggests, the methods package is not loaded by
default in R2.13 when using Rscript whereas it is loaded when using an
interactive session.
An example with the metafor package :
library(metafor)
example(addpoly.rma)
this works in an interaction R shell, but put it in a .R file and use it with
Rscript, it won't work until you added
library(methods)