search for: temp_data

Displaying 7 results from an estimated 7 matches for "temp_data".

Did you mean: dump_data
2011 Jul 21
1
nested loop for
...uite well: kk<-data.frame(Pma, Plot, dbh2, SBA2, BAL2, aa) kkk<-kk[kk$Plot=="1",] The loop: for(j in 1:length(kkk$Pma)){ for(i in 1:length(kkk$Pma)){ if(kkk$dbh2[j]<kkk$dbh2[i]) kkk$aa[i]<-kkk$SBA2[i] else temp_data$aa[i]<-0 kkk$BAL2[j]<-sum(kkk$aa) } } But, I have tried a million of forms to calculate this for each stand... and no one looks fine. The closest code that I have got is: for(k in 1:length(kk)){ temp_data<-kk[kk$Plot==Plot[k],] for(j i...
2011 Oct 03
1
xts/time-series and plot questions...
...): > head(temp.data) DateTime Temperature 1 2009-11-23 23:20:00 62.9 2 2009-11-23 23:30:00 63.4 3 2009-11-23 23:40:00 63.6 4 2009-11-23 23:50:00 64.2 5 2009-11-24 00:00:00 64.5 6 2009-11-24 00:10:00 64.7 Converted to an xts object: > str(temp_data) xts [1:83089, 1] 62.9 63.4 63.6 64.2 64.5 64.7 65.2 65.3 65.8 65.6 ... - attr(*, "index")= atomic [1:83089] 1.26e+09 1.26e+09 1.26e+09 1.26e+09 1.26e+09 ... ..- attr(*, "tzone")= chr "" ..- attr(*, "tclass")= chr [1:2] "POSIXct" "POSIXt&quot...
2012 May 16
1
Merging multiple data sets
...?t know where I am going wrong? Please help me. Thanks for your help. subsetname <- "x1" file_no <- 4 output_data_prod <- data.frame() for(n in 1:file_no){ myfile <- gsub("( )", "", paste(subsetname , "_", n,".rda")) temp_data <- load(file = myfile) data_22 <- get(temp_data) if(dim(output_data_prod)[1]==0){output_data_prod <- data_22 }else{ output_data_prod <- merge(inData1 = output_data_prod, inData2 = data_22 ,type = "inner", all=FALSE , by =c("x11"))} } ----- Bhara...
2011 Nov 15
2
Putting directory path as a parameter
...to R, this may be simple. I want to store directory path as parameter which in turn to be used while reading and writing data from csv files. How I can use dir defined in the below mentioned example while reading the csv file. Example: dir <- "C:/Users/Desktop" #location of file temp_data <- read.csv("dir/bs_dev_segment_file.csv") If I run this it will show errors: Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file 'dir/bs_dev_segment_file.csv': No such file or direc...
2007 Aug 22
8
How to spec an attachment_fu model
...uploaded_data=(file_data) return nil if file_data.nil? || file_data.size == 0 self.content_type = file_data.content_type self.filename = file_data.original_filename if respond_to?(:filename) if file_data.is_a?(StringIO) file_data.rewind self.temp_data = file_data.read else self.temp_path = file_data.path end end While I was digging I found out that "file_data" is a ruby Tempfile object. So, I tried to create a dummy file and pass it, but it failed. I found out in the CGI library, it actually extends t...
2009 Feb 17
1
cloning an already uploaded image using attachment_fu
Hi, I have an Image model that is attached to a item. The image was uploaded through attachment_fu. Now, I want to reuse the same image for a new item. I tried several tips found online. For example in http://danieloshea.com/articles/254-cloning-images # Create a clone of an image and it''s thumbnails. def create_clone c = self.clone self.thumbnails.each do
2007 Jun 07
6
Can't download files with send_data or send_file
I have a form_remote_tag that calls a method to print out a csv file for download. If I tell the form_remote_tag to update a div the data comes up in that div, but otherwise I can''t get the browser to acknowledge the sent file. >From view: <%= form_remote_tag :url => {:action => "csv_dump" }%> <%= submit_tag "Download Complete List" ,:name