similar to: Minor "bug" in source()

Displaying 20 results from an estimated 6000 matches similar to: "Minor "bug" in source()"

2005 May 16
2
a problem sourcing a file using chdir=TRUE
Dear R-users, I used to give commands such as: > source(file="~/path/to/file.R", chdir=TRUE) but with the latest v. 2.1.0 it does not seem to work anymore. I tried to figure out what it was going on and it seems that the string for which > class(file) [1] "character" is changed to > class(file) [1] "file" "connection" when the connection is
2005 Jun 15
1
source() chdir does not work (PR#7940)
Full_Name: Alex Galakhov Version: 2.1.0 OS: Linux (Debian) Submission from: (NULL) (195.19.131.68) After software upgrade source() does not work properly anymore. It completely ignores the chdir= parameter. This is because is.character(file) is always false after the assignment file<-file(file). The fix is (written by hand in diff-like syntax, hopefully, you'll understand it):
2005 May 02
2
"Special" characters in URI
Hello! I am crossposting this to R-help and BioC, since it is relevant to both groups. I wrote a wrapper for Entrez search utility (link for this is provided bellow), which can add some new search functionality to existing code in Bioconductor's package 'annotate'*. http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esearch_help.html Entrez search utuility returns a XML document
2010 Sep 29
2
Script auto-detecting its own path
Hi all, Forgive me if this question has been addressed, but I was unable to find anything in the r-help list or in cyberspace. My question is this: is there a function, or set of functions, that will enable a script to detect its own path? I have tried file.path() but that was not what I was looking for. It would be nice to be able to put all the related scripts I use in the same folder with a
2010 Jun 11
4
setting the current working directory to the location of the source file
AFAIK a script run through source() does not have any legit way to learn about it's own location. I need this to make sure that the script will find its datafiles after I move the whole directory. (The datafiles are in the same directory.) Here is a hack I invented to work around it: print(getwd()) source_pathname = get("ofile",envir = parent.frame()) source_dirname =
2014 Dec 03
2
[PATCH] test_compression.sh
* Use `mktemp` instead of playing with date(1). * Use -f instead of removing the file every time. * "echo ERROR; exit 1" is what die() is for. * Some cosmetic renamings ('k' to 'comp' for compression etc). * Remove the MacOSX comment. It's not MacOSX specific, and it's not a problem anyway. The number behaves just right. * Remove the $((${size}+10)). It's
2005 May 08
2
Extract just some fields from XML
Hello! I am trying to get specific fields from an XML document and I am totally puzzled. I hope someone can help me. # URL URL<-"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id=11877539,11822933,11871444&retmode=xml&rettype=citation" # download a XML file tmp <- xmlTreeParse(URL, isURL = TRUE) tmp <- xmlRoot(tmp) Now I want to extract only
2020 Jun 22
2
Possible Bug: file.exists() Function. Due to UTF-8 Encoding differences on Windows between R 4.0.1 and R 3.6.3?
Hi Tomas, I received a report about R 4.0.0 in the knitr package (https://github.com/yihui/knitr/issues/1840), and I think it is related to the issue here. I created a minimal reproducible example below: owd = setwd(tempdir()) z = 'K\u00e4sch.txt' file.create(z) list.files() file.exists(list.files()) setwd(owd) Output: > owd = setwd(tempdir()) > z = 'K\u00e4sch.txt' >
2000 Jul 06
1
R 1.1.0 dev.print()
Hi, I just upgraded to 1.1.0 from 1.0.1 this morning on my OSF/1 machine. I now have problems with the following code: %E /tmp 43% R --vanilla Version 1.1.0 (June 15, 2000) ... > test2 <- function () { plot(runif(30)) ofile <- "/tmp/newfile.ps" dev.print(file = ofile) } + + + + + > > test2() Error in device(...) : Object "ofile" not found However, if
2013 Feb 26
5
Glassfish automatic installation in Puppet
Hi All, Can any one help to install my jar file automatically, When I tried to install /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar,its is asking for confirmation like Accept or Decline? [A,D,a,d]. So how can I pass answer with command. Please find my puppet code below exec { ''glassfishInstaExe'':
2007 Dec 14
6
Analyzing Publications from Pubmed via XML
I would like to track in which journals articles about a particular disease are being published. Creating a pubmed search is trivial. The search provides data but obviously not as an R dataframe. I can get the search to export the data as an xml feed and the xml package seems to be able to read it. xmlTreeParse("
2010 Nov 29
1
map() and pdf clipping
Hello, Below is a function (test.map) that permits drawing the same map using three different devices. The "pdf" device doesn't clip polygons to the plot region as I see it does by both the native device (in my case "Quartz") and the "png" device. test.map("pdf") # produces "test-map.pdf" with no clipping test.map("png") #
2019 Feb 14
1
Proposed function file.backup
Dear R Core: In the kutils package, I wrote a function that is so handy that I would like to ask you put it in R itself. file.backup() will look at a file, find its last modification time, and create a new backup with a name that appends YYYYMMDD-HHMM to the file name. So now, whenever I worry that running write.csv or saving a graph might destroy something valuable, I use an idiom like fn
2007 Apr 23
1
Bug in R 2.4.1 ?
Hello everybody, I'm using hdf5 files to store results from intermediate calculations. These are usually part of a list, called "res". As I want the hdf-files to contain all the members of res in its top "directory", I used to do attach(res) do.call("hdf5save", args=c(fileout=file.path(dir, ofile), as.list(names(res)))) detach(res) which did what I
2016 Jul 11
2
CentOS 7 and Glassfish 2.1.1
El 11/07/2016 a las 05:11 p. m., John R Pierce escribi?: > On 7/11/2016 2:40 PM, Efra?n D?ctor wrote: >> >> I have a server with CentOS 7 installed, on this server I installed >> Java 1.7 (java version "1.7.0_80") and Glassfish 2.1.1. The last few >> days I've ran into a problem: Glassfish process got killed twice and >> I don't have a clue why
2009 Jul 03
1
Zimbra IMAP authentication - SOLVED
Hello, everyone. No need to read this message. I'm posting for documentation for other poor, ignorant slobs like me who are struggling to pull together the many technologies to make converged networks happen. Hopefully, this will help save someone else the time I spent. I started the below email until I realized I had solved multiple parts of a compound problem but not all at the same time.
2010 Feb 22
3
relative file path
Hello, Is there a way to find where a script is located within a script? getwd() doesn't do what I want because it depends on where R was called from. I want something like source("randomFile") and within randomFile there is a function called whereAmI() which returns c:\blah\blah2\randomFile.R In perl there is a library called FindBin and $FindBin::Bin has the directory of the file
2005 Aug 26
1
Memory leakage/violation?
Hi, I've spotted a possible memory leakage/violation in the latest R v2.1.1 patched and R v2.2.0dev on Windows XP Pro SP2 Eng. I first caught it deep down in a nested svd algorithm when subtracting a double 'c' from a integer vector 'a' where both had finite values but when assigning 'a <- a - c' would report NaNs whereas (a-c) alone would not. Different runs
2005 Jun 27
2
R v2.1.1 for Windows and "non-reproducible" crashes
Hi, R v2.1.1 patched (2005-05-26) for Windows crashes. The sympotoms are like "memory leakage". The patched version from two days ago crashes at a different position in R CMD check compared to todays version. A "REPRODUCIBLE" EXAMPLE: Unfortunately, I cannot create a minimal code example reproducing the crash, but here is at least a simple way to reproduce it: 1. Make
2006 Mar 24
2
How to avoid for or while loops when one index depends on another
Dear R Community, I'm trying to exploit the elegance of R by doing the following pseudocode routine without a WHILE or FOR loop in R: for i = 1 to length-1 for j = (i+1) to length print a[i], a[j] That is, I want i and j to be the indices of a half-matrix 1 2, 1 3, 1 4, ..., 1 length, 2 3, 2 4, ..., 2 length, 3 4, ..., 3 length 1. Can this be done with the 'whole