search for: file_

Displaying 20 results from an estimated 38 matches for "file_".

Did you mean: file
2012 Feb 14
4
save output of loop
I have some data files e.g 100 . and after for loop I would like to save all data in one single data frame file_s <- list.files(path = ".", pattern = "v2.0.2.txt", all.files = FALSE, full.names = FALSE, recursive = FALSE, ignore.case = FALSE) for (i in 1:100){ data = read.table(file_s[i],header=TRUE) lat = data[,7] # latitude lon = data[,8] #...
2014 May 20
1
[patch] Add support for editor function in edit.default
...?editor?: a non-empty string, or a function that is called with a file path as argument. edit.default currently calls the function with three arguments: name, file, and title. For example, running the following vimCmd <- 'vim -c "set ft=r"' vimEdit <- function(file_) system(paste(vimCmd, file_)) options(editor = vimEdit) myls <- edit(ls) gives "Error in editor(name, file, title) : unused arguments (file, title)". The attached patch changes edit.default to call the editor function with just the file path. There is at least one inconsistent behavi...
2012 Feb 23
4
saving all data in r object
...temp) Now I would like to save the all data of these 100 files in r object, so I can reload data any time. * Every file has different length of data latitude <- NULL longitude <- NULL time <- NULL temp <- NULL for ( i in 1:100) { data<- read.table(file_s[i],header=TRUE,skip=55 ) latitude [i] <- data[,6] longitude[i] <- data[,7] time[i] <- data[,8] temp[i ] <- data [,9] } save(latitude=latitude,longitude=longitude, time=time,temp=temp, file="data.RData") but it does not work. I am new in R and I...
2005 Sep 14
4
*** saving files ***
Hi, I need help :o( I want that my function saves result files in a for()-loop while it runs automatically. the filenames must be saved like: file_1 -> for 1. result file_2 -> for 2. result file_3 -> for 3. result and . . . file_n -> for n. result the file names are the same identified by _1, _2 , _3, ... , _n these files will loaded by a second function later in the same...
2018 Aug 24
3
[assembler + debuginfo] interaction with .file directive and debuginfo
What does gcc do? On Fri, Aug 24, 2018 at 9:05 AM via llvm-dev <llvm-dev at lists.llvm.org> wrote: > There are two forms of the .file directive. One is simply > > .file "path" > > and the other is > > .file <file-number> [ "dir"] "path" [ …. other stuff ] > > > > The latter is sometimes
2012 Mar 08
1
Save/Load function()-result to file in a loop
...luate() from the dismo package. I tried it with save() and load() but I am not sure if that is the way I should do it as I don't get the result I desire... ls <- list("A","B","C") for(i in ls){ x <- lm(c(1,2,3)~c(2,5,6)) save(x, file = paste("/path/to/file_",i,sep="")) } A <- load("/path/to/file_A") /Johannes -- Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
2012 Jul 18
1
Skip file
...at i have is a for loop to name files. I want it to skip over the file if it doesn't exist. Is there a way to do that? s=seq(from = chron("03/15/2012"), to = chron("06/15/2012")) day=format(as.Date(s), "%Y%m%d") for (k in 1:length(day)){ B1=read.csv(paste("S:/file_", day[k], ".csv", sep="")) Date=strptime(B1[,1], format="%m/%d/%Y %I:%M:%S %p") print(B1) } [[alternative HTML version deleted]]
2011 Mar 06
2
How to load load multiple text files and order by id
Hello R users, I am fairly new to R and was hoping you could point me in the right direction I have a set of text files (36). Each file has only two columns (id and count) , I am trying to figure out a way to load all the files together and then have them ordered by id into a matrix data frame. For example If each txt file has : ID count id_00002 20 id_00003 3 A Merged File: ID
2013 Nov 21
1
how can I import a number of datsets in a folder in my working directory to a list in R
Hi, Suppose, if I create 15 files in my working directory. set.seed(48) lapply(1:15,function(i) {m1 <- matrix(sample(1:20,1686*2,replace=TRUE),nrow=1686,ncol=2); write.table(m1,paste0("file_",i,".txt"),row.names=FALSE,quote=FALSE)}) ?D <-dir() D1 <- D[order(as.numeric(gsub("\\D+","",D)))] D1 ?res <- t(sapply(D1,function(x) {x1<- read.table(x,header=TRUE); x1[,2]})) dim(res) #[1]?? 15 1686 #or res1 <- do.call(rbind,lapply(D1,function(x...
2009 Jul 23
2
alternative to rbind within a loop
...y data.frame and copy it in a large number of csv files test <- file.path("test") a <- 1:350 b <- rnorm(350,100,10) c <- runif(350, 0, 100) d <- month.name[runif(350,1,12)] the.data <- data.frame(a,b,c,d) for(i in 1:850){ write.csv(the.data, file=paste(test, "/file_", i, ".csv", sep="")) } # now lets make a single dataframe from all these csv files all.files <- list.files(path=test,full.names=T,pattern=".csv") new.data <- NULL system.time({ for(i in all.files){ in.data <- read.csv(i) if (is.null(new.data)) {ne...
2006 Jun 20
2
Problem with "can''t dump anonymous class Class"
...lobal_document'' -e:4 Any ideas on how to fix this? If I change GlobalDocument to Document below, it works fine. Here is the relevant code: ** Models ** class Document < ActiveRecord::Base attr_accessor :uploaded_file def after_create if !File.exists?(File.dirname(self.file_path)) Dir.mkdir(File.dirname(self.file_path)) end if @uploaded_file.instance_of?(Tempfile) FileUtils.copy(@uploaded_file.local_path, self.file_path) else File.open(self.file_path, "wb") { |f| f.write(@uploaded_file.read) } end end def after_de...
2012 Oct 02
41
Puppet 3.0: Not authorized to call find on /file_metadata, more issues?
...og, on the client system: Oct 1 20:02:28 test-fms puppet-agent[11062]: Starting Puppet client > version 2.7.17 > Oct 1 20:02:31 test-fms puppet-agent[11062]: > (/Stage[main]/Ntp-client/File[/etc/ntp.conf]) Could not evaluate: Error 400 > on SERVER: Not authorized to call find on /file_metadata/etc/ntp.conf Could > not retrieve file metadata for puppet:///etc/ntp.conf: Error 400 on SERVER: > Not authorized to call find on /file_metadata/etc/ntp.conf at > /etc/puppet/manifests/classes/ntp-client.pp:10 The permissions from /etc/puppet/files are correct: -rw-r--r--....
2004 Jun 16
1
Problem with symlinks
I'm using samba 3.0.4 compiled from sources on a linux box (RH 7.3). My smb.conf contains in a share section the setting: follow symlinks = yes In that share I created a symlink to a local file. When I open the symlink from Windows box (the symlink appear as a regular file) I access correctly the target file, but when I edit&save the file, sometime the symlink is deleted and a regular
2012 Mar 24
1
Append to file in loop
My files are on disk and they are regular text files named file_1 file_2 file_3 file_4 and file_5 with extension .saam The separator is sep='' (ie, white space) I want to append 'XFile' at the end of those files. XFile is also on disk. file.append("file_1.saam", "XFile.saam"); file.append("file_2.saam", "XFil...
2009 Apr 24
3
Running in non-dev envs. with script/runner shebang setup
All, I have a script that runs script/runner via the shebang mechanism at the top o the file, like so: #!/usr/bin/env ./script/runner This works fine in development, how would I get it to run in non-development environments? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
2009 Apr 09
8
ZIL SSD performance testing... -IOzone works great, others not so great
...on this test machine shows absolutely no performance improvement of the Fireball+SSD Zil over the Fireball by itself. Watching zpool iostat -v shows no activity on the ZIL at all whatsoever. Other tests I''ve tried to run: A scripted batch job of 10,000 - dd if=/dev/urandom of=/fireball/file_$i.dat bs=1k count=1000 A scripted batch job of 10,000 - cat /sourcedrive/$file > /fireball/$file A scripted batch job of 10,000 - cp /sourcedrive/$file /fireball/$file And a scripted batch job moving 10,000 files onto the fireball using Apache Webdav mounted on the fireball (similar to my pr...
2012 Oct 09
2
Text file: multiple matrix
Hi there! I'm a newbie in R This is my problem: I have a txt file composed by 100 matrix (256x256) separated by a blank line! How can I save automatically the matrix in separated txt file (100)? e.g. 1? matrix from line 1 to line 256 257 blank line 2?matrix from line 258 to line 513 514 blank line 3? matrix from line 515 to line 770 771 blank line 4? matrix from line 772 to line 1027......
2013 Apr 04
6
replacing mkdir -p
...lah/blah/blah/", "/blah/blah/blah/and/","/blah/blah/blah/and/blah/"]: ensure => directory, } Then it occurred to me I could parse the path and produce the array of elements needed. Something like: $path = "/blah/blah/blah/and/blah" $file_list = split($path, $file_separator) $paths = inline_template(''<% parent = nil %><%=@file_list.collect{ |file| parent.nil? ? parent = "#{@file_separator}":parent = "#{parent}#{file}#{@file_separator}"}.join(@path_separator) %>'') $path_list...
2007 Nov 15
1
program I used to test xattrs
Hello, This is the little basic program I used to test xattrs. First thing I did was something like this cd /mnt/btrfs-test for i in $(seq 0 100000); do touch file_$i; done and then run time ./xattr-test /mnt/btrfs 0 time ./xattr-test /mnt/btrfs 1 time ./xattr-test /mnt/btrfs 2 the 0 test creates 100 xattrs for every file in the directory. the 1 test just does a listxattr for every file in the directory, which is enough to read in all the xattrs. The last...
2012 Jul 11
0
Announce: Puppet 2.7.18 Available [ Security Release ]
...cefile, lastrunfile, and lastrunreport. 4d7c9fd Use "inspect" when listing certificates bd2820e Don''t allow the creation of SSL objects with invalid certnames f341962 Validate CSR CN and provided certname before signing 38c5a4e Add specs for selector terminuses of file_{content,metadata} 9e920a8 Fix whitespace inside parentheses 2d01c2b Use head method to determine if file is in file bucket 40ee670 Always use the local file_bucket on master d881b4b Fail more gracefully when finding module files if no file is specified 20ab0e9 Reject file reques...