search for: fnam

Displaying 20 results from an estimated 22 matches for "fnam".

Did you mean: fname
2001 Nov 01
3
Lost backslashes in parse()
I'm comparing R-1.3.0 on Solaris 2.6 to R-1.3.1 on WindowsNT. The following 5-line script returns TRUE on Unix but FALSE on NT: fnam <- tempfile() file.create(fnam) txt <- paste("file.exists(\"", fnam, "\")", sep="") expr <- parse(text=txt) eval(expr) The issue seems to be that backslashes get lost in the parsing. A workaround is to change the 3rd line to the rather ugly: txt...
2007 Mar 09
1
Applying some equations over all unique combinations of 4 variables
...lculations need to be done on one factor at a #I then have a set of different rates that are applied #to it. #dataset cata <- c( 1,1,6,1,1,2) catb <- c( 1,2,3,4,5,6) doga <- c(3,5,3,6,4, 0) data1 <- data.frame(cata, catb, doga) rm(cata,catb,doga) data1 # start rates # names for lists fnams <- c("af", "pf", "cf", "mf") mnams <- c("am", "pm", "cm", "mm") # Current layout of the rate data frames alphahill <- list(af <- c("a1","a2","a3"), pf <- c("d1&quot...
2013 Apr 10
1
Issue with Control-Z in a text file on Windows - readLines() appears to truncate
...0.0 I get the message #Warning message: #In readLines("h3.txt") : incomplete final line found on 'h3.txt' h3a # [1] "1,34,44.4,\" A" # so it drops from the Control-Z onwards #### # The following is my rough and ready workaround - I'm sure there is a cleaner way fnam <- 'h3.txt' tmp.bin <- readBin(fnam, raw(), size=1, n=max(2*file.info(fnam)$size, 100)) tmp.char <- rawToChar(tmp.bin) txt <- unlist(strsplit(tmp.char, '\r\n', fixed=TRUE)) txt # [1] "1,34,44.4,\" A\032A \",99" This was on 64-bit R on a 64-bit Window...
2012 Sep 26
3
Reading multiple files
Hi, I have 35 data files for reading. I would like get a program for performing reading of 35 files at once. All are of the type: Dados1.raw, Dados2.raw and so on. If the files have the same number of columns, I can read with the following commands: rm(list=ls()) filenames = list.files(path="~/Silvano/Arq", pattern="Dados+.*raw") names = substr(filenames, 1, 7) for(i in
2010 May 07
0
A fix that for 'bquote' that may work (PR#14031)
...nction(e) if (length(e) <= 1L) e else if (e[[1L]] == as.name(".")) eval(e[[2L]], where) else if (is.pairlist(e)) as.pairlist(lapply(e, unquote)) else as.call(lapply(e, unquote)) unquote(substitute(expr)) } <environment: namespace:base> > fnam <- as.name("f") > bquote( .(fnam)() ) .(fnam)() > bquote( .(fnam)(x) ) f(x)
2011 Feb 14
3
R command line and pipe using in Linux?
Hi, I have a very large data file(GB) from which I only want to extract one column to draw histogram. This would be done several times, so I would like to ask if there is anyway to plot this using R from the linux command line, something look like this cut -f1 xxx.txt |RplotHist .... Thanks and hope to hear from you. Best regards, Hang [[alternative HTML version deleted]]
2012 Jan 17
2
How to loop on file names
Dear all, I need to do the same procedure on several files. But I don't know how to refer to the file name. Here is an example of what I am trying to do. List of files: file1(A,B,C, D1...Dn), file2(A,B,C,E1,...,En), file3(A,B,C,F1,...,Fn) Procedure I want to apply on each file: dft <- melt(df,id=c('A','B','C')) dft$X <- substr(dft$variable,1,3) dft$Y <-
2019 Mar 11
0
R 3.5.3 is released
...7 has been improved: in particular if CXX??STD is set, it is tried first with no additional flags. PACKAGE INSTALLATION: * New macro F_VISIBILITY as an alternative to F77_VISIBILITY. This will become the preferred form in R 3.6.0. BUG FIXES: * writeLines(readLines(fnam), fnam) now works as expected, thanks to Peter Meissner's PR#17528. * setClassUnion() no longer warns, but uses message() for now, when encountering "non local" subclasses of class members. * stopifnot(exprs = T) no longer fails. -- Peter Dalgaard, Professor, C...
2019 Mar 11
0
R 3.5.3 is released
...7 has been improved: in particular if CXX??STD is set, it is tried first with no additional flags. PACKAGE INSTALLATION: * New macro F_VISIBILITY as an alternative to F77_VISIBILITY. This will become the preferred form in R 3.6.0. BUG FIXES: * writeLines(readLines(fnam), fnam) now works as expected, thanks to Peter Meissner's PR#17528. * setClassUnion() no longer warns, but uses message() for now, when encountering "non local" subclasses of class members. * stopifnot(exprs = T) no longer fails. -- Peter Dalgaard, Professor, C...
2019 Mar 11
0
R 3.5.3 is released
...7 has been improved: in particular if CXX??STD is set, it is tried first with no additional flags. PACKAGE INSTALLATION: * New macro F_VISIBILITY as an alternative to F77_VISIBILITY. This will become the preferred form in R 3.6.0. BUG FIXES: * writeLines(readLines(fnam), fnam) now works as expected, thanks to Peter Meissner's PR#17528. * setClassUnion() no longer warns, but uses message() for now, when encountering "non local" subclasses of class members. * stopifnot(exprs = T) no longer fails. -- Peter Dalgaard, Professor, C...
2013 Apr 09
1
Fwd: R unzip method gives filenames as character
Question: would it be better if the contents list of the unzip() function returned the filenames as character rather than factor since they are probably unique strings? > tmp <- unzip(fnam, list=TRUE) > str(tmp) 'data.frame': 31 obs. of 3 variables: $ Name : Factor w/ 31 levels "fred1.csv",..: 1 2 3 4 5 6 7 8 9 10 ... $ Length: num 424486 2664277 219798 442383 480857 ... $ Date : POSIXct, format: "2012-12-01 04:05:00" "2012-12-02 04:06:00&...
2011 Aug 16
1
PBSmapping, where is Ireland?!
Hi folks, I've been using 'PBSmapping' to make a map of Europe with some labels. I've been using the 'worldLL' PolyData, as my computer is too slow to make my own from the GSHHS files. The only problem is this PolyData does not seem to include Ireland. I have no idea why this should be so, other European islands such as Sardinia etc. are included.
2010 Jan 09
4
parsing pdf files
I have a pdf file that I would like to parse into R: http://www.williams.edu/Registrar/geninfo/faculty.pdf For now, I open the file in Acrobat by hand, then save it "as text" and then use readLines(). That works fine but a) I am concerned that some information may be lost and b) I may be doing this a lot, so I would rather have R grab the information from the pdf file directly. So: is
2009 Sep 10
2
"Read.csv" in R with dynamic file (1st) argument
Dear R users, I have numerous data sets (csv files) saved in the folder which has the same name as individual data. (i.e data x1 saved in x1 folder, data x2 in x2 folder etc) I would like to read in the desired data set name using 'scan' function and assign this inputted value to an object so that it can be used in the 'read.csv' function. For example, x <- scan() 1: 0708
2009 Nov 09
3
Hand-crafting an .RData file
Hello, I frequently have to export a large quantity of data from some source (for example, a database, or a hand-written perl script) and then read it into R. This occasionally takes a lot of time; I'm usually using read.table("filename",comment.char="",quote="") to read the data once it is written to disk. However, I *know* that the program that generates
2004 Jan 27
1
Differentiating debug messages from both sides
...", + rprintf(FINFO, "[%c] expand file_list to %.0f bytes, did%s move\n", + *who_am_i, (double)sizeof(flist->files[0]) * flist->malloced, (new_ptr == flist->files) ? " not" : ""); @@ -781,8 +783,10 @@ struct file_struct *make_file(char *fnam skip_excludes: - if (verbose > 2) - rprintf(FINFO, "make_file(%s,*,%d)\n", fname, exclude_level); + if (verbose > 2) { + rprintf(FINFO, "[%c] make_file(%s,*,%d)\n", + *who_am_i, fname, exclude_level); + } file = new(struct file_struct); if (!file) @@ -...
2004 Jan 19
1
File that "vanish"es between readdir and stat is not IO error
Using rsync 2.6.0 with --verbose and doing a pull. >?receiving file list ... readlink "{FILENAME}" failed: >?No such file or directory >?done >?IO error encountered - skipping file deletion The file was a temporary file that was being deleted just as the rsync was run. So while the file list was being built, it was there when the directory was read but had vanished by the
2004 May 02
1
SEGV on FreeBSD 4.8-STABLE with 2.6.2
...numeric-ids --delete --exclude=/opt/dist/cdrom \ [paths] [server]:[path] If I whittle down what appears in [paths], then it works. $ gdb rsync rsync.core gdb> bt #0 0x280faf0d in strncmp () from /usr/lib/libc.so.4 #1 0x7 in ?? () #2 0x80597f7 in send_file_name (f=-1, flist=0x808a100, fname=0xbfbfe994 "etc/opt/TWWfsw", recursive=1, base_flags=1) at flist.c:929 #3 0x805a2fc in send_file_list (f=-1, argc=0, argv=0xbfbffa44) at flist.c:1178 #4 0x804c0ff in delete_files (flist=0x808a0c0) at receiver.c:102 #5 0x805177e in do_recv (f_in=0, f_out=1, flist=0x808a0c0, local_n...
2004 Feb 02
1
[PATCH] --one-file-system and automounter
...0 +0100 @@ -618,32 +618,6 @@ static void receive_file_entry(struct fi } -/* determine if a file in a different filesstem should be skipped - when one_file_system is set. We bascally only want to include - the mount points - but they can be hard to find! */ -static int skip_filesystem(char *fname, STRUCT_STAT * st) -{ - STRUCT_STAT st2; - char *p = strrchr(fname, '/'); - - /* skip all but directories */ - if (!S_ISDIR(st->st_mode)) - return 1; - - /* if its not a subdirectory then allow */ - if (!p) - return 0; - - *p = 0; - if (link_stat(fname, &st2)) { - *p = '/'...
2004 Feb 06
4
memory reduction
....o \ zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \ zlib/zutil.o zlib/adler32.o diff -rupNP --exclude-from cvs/.ignore cvs/backup.c pool2/backup.c --- cvs/backup.c Wed Feb 4 03:49:36 2004 +++ pool2/backup.c Wed Feb 4 22:11:26 2004 @@ -189,6 +189,7 @@ static int keep_backup(char *fname) backup_dir[--backup_dir_len] = '\0'; if (verbose > 0) rprintf(FINFO, "backup_dir is %s\n", backup_dir); + initialised = 1; } @@ -199,7 +200,7 @@ static int keep_backup(char *fname) if (do_stat(fname, &st)) return 1; #endif - file = make_file(fname,...