similar to: Loop stopping after 1 iteration

Displaying 20 results from an estimated 120 matches similar to: "Loop stopping after 1 iteration"

2011 May 23
2
days between dates
Hello, I have some unbalanced panel data that is measured on weekdays only (i.e., excluding Saturday and Sunday). I would like to get the number of days between dates such that the number of days between a Friday and a Monday is 1 (and not 3). Here is some code to illustrate my problem: library('Hmisc'); DATE <-
2009 Aug 05
2
acf Significance
Hi List, I'm trying to calculate the autocorrelation coefficients for a time series using acf at various lags. This is working well, and I can get the coefficients without any trouble. However, I don't seem to be able to obtain the significance of these coefficients from the returned acf object, largely because I don't know where I might find them. It's clear that the acf
2011 May 25
1
rake task: uninitialized constant
I have this rake taks: CUSTOM_MONTHS = [nil, "GEN", "FEB", "MAR", "APR", "MAG", "GIU", "LUG", "AGO", "SET", "OTT", "NOV", "DIC"] def parse_date_string(date_string) begin day, month, year = date_string.split("-") Time.mktime(year, CUSTOM_MONTHS.index(month),
2002 Dec 09
2
netcdf
Hello, I have been having difficulties opening netcdf files using the netcdf library. I am able to successfully open the file and I can determine the names and size. However, when I try to read it I receive an error. Reading the documentation, I am wondering if this might be due to a difference between netcdf version 2 and more recent netcdf format? I've tried using different values for the
2011 Sep 10
0
npreg: plotting out of sample, extremely large bandwidths
Hello r-help, I am using the excellent np package to conduct a nonparametric kernel regression and am having some trouble plotting the results. I have 2 covariates, x1 and x2, and a continuous outcome variable y. I am conducting a nonparametric regression of y on x1 and x2. The one somewhat unusual feature of these data is that, to be included in the dataset, x1 must be at least as large as x2.
2012 Feb 24
6
strange behaviour of "POSIXlt" "POSIXt" object
Hi, Does anybody know why get I this kind of strange situation: Browse[2]> hcEnd [1] "2009-03-29 06:30:00" Browse[2]> class(hcEnd) [1] "POSIXlt" "POSIXt" Browse[2]> is.na(hcEnd) [1] TRUE This issue is the source of my all issues in my program, Thanks for your help -- View this message in context:
2006 Apr 21
13
Sorttable.js
I have come across this neat Javascript table sorter at http://kryogenix.org/code/browser/sorttable/ It seems straigh forward to use but i cant get it to work. I have included in the head <script src="javascripts/sorttable.js" type="text/javascript"></script> In the View <table class="sortable" id="anyid"> <thead>
2008 Jul 18
0
spreading the risk
This is for ACroske but I can't find his email so I'll just send it to the list. Hi ACroske: The code below takes a zeros and ones matrix and puts ones in the places you wanted. It can be made shorter ( maybe ?. i haven't thought about that ) but first let me know if that's what you wanted ? The original matrix is called binary.matrix and the final matrix is called tempbinmat.
2006 Jan 25
4
Cannot :order when using :offset and :limit in find
Hello all. I am using the Paginate_with_ajax code as described on the wiki but I am running into the following problem. The following code will work fine and retrieved unsorted records in a hunky dory fashion: @componentlogs = Componentlog.find(:all, :conditions => [ "cl_compname like ?", @criteria ], :offset => offset, :limit => items_per_page ) However if I try and add an
2006 Jan 26
1
Help constructing a find_by_sql command
Hello all. I am trying to do the equivalent of: @componentlogs = Componentlog.find(:all, :conditions => [ "cl_compname like ?", @criteria ], :offset => offset, :limit => items_per_page, :order => "cl_spr DESC" ) in a find_by_sql statement. I cannot use the build in because the adaptor isn''t quite right (OCI8) When I use it I get the following error
2006 Jul 04
1
[Fwd: formatting using the write statement]
>I have a series of write statements because >i am writing to a file >where the characters strings are the column names of a dataframe >and the numbers are the elements in a particular row. >So, a file might look like > >AAA 2.1 >BB 3.1 >AHLZ 0.2 > >and it would be named "rowname".mls. > >so, each time i get to a new row, i create a new file and
2011 Apr 04
1
moving mean and moving variance functions
Hello Lets say as an example I have a dataframe with the following attributes: rownum(1:405), colnum(1:287), year(2000:2009), daily(rownum x colnum x year) and foragePotential (0:1, by 0.01). The data is actually stored in a netcdf file and I'm trying to provide a conceptual version of the data. Ok. I need to calculate a moving mean and a moving variance for each cell on the following
2010 May 30
1
Count the number of consecutive 1's
Hi All, We have a raw dataset that, on the sampling time column, for example: t <- c(0,1,2,5,0,5,0,2,5) And we need to create a second column that indicates the day of the sampling, so the end result of what we want is a vector: 1,1,1,1,2,2,3,3,3 Additional information that might simplify the matter is that, for each day, the time starts with zero and ends with 5. I am a beginner with R.? So
2004 Mar 19
2
for loop or Hmisc library trap.rule function syntax error
Hello: I am new R user stumped why the R code after this paragraph generates "Error: syntax error" messages after each of the last 2 lines. I have tried searching the manuals, Hmisc documentation, contributed manuals, help archives, and Internet. I am running R 1.7.1 under Windows 2000 (I will upgrade when my imminent OS upgrade happens). My data was successfully entered and
2008 Aug 11
2
sampling
Hello, I have a matrix and I want to sample 20 rows that are the the percentiles of 0-100 in 0.05 increments. I have a vector of my sequence (0, 0.05, 0.10, 0.15,....1.0) and also a normalised vector of rownumbers. That is, there are 234 rows (for example) so I do perc<-c(1:234/234) which looks like a bunch of numbers from 0 - 1. In Excel (which I try not to use at every possible
2011 Jun 23
2
Confidence interval from resampling
Dear R gurus, I have the following code, but I still not know how to estimate and extract confidence intervals (95%CI) from resampling. Thanks! ~Adriana #data penta<-c(770,729,640,486,450,410,400,340,306,283,278,260,253,242,240,229,201,198,190,186,180,170,168,151,150,148,147,125,117,110,107,104,85,83,80,74,70,66,54,46,45,43,40,38,10) x<-log(penta+1) plot(ecdf(x),
2006 Jul 06
4
Oracle HR on Rails
Interesting read...apologies if it has been posted already. http://www.oracle.com/technology/pub/articles/saternos-rails.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060706/619e650a/attachment.html
2006 Jan 13
19
Problems with scaffold''s parameter on Oracle
Hi I run Ruby on Rails on Oracle XE. I have a simple table: create table customer(id number primary key, name varchar2(100)); And ruby script\generate model Customer ruby script\generate controller Customer http://localhost:3000/customer/ - show a fine list, but when I click show/edit/destroy, I get an ORA-01722: OCIError: ORA-01722: invalid number: select * from (select raw_sql_.*,
2009 Nov 07
1
after PCA, the pc values are so large, wrong?
rm(list=ls()) yx.df<-read.csv("c:/MK-2-72.csv",sep=',',header=T,dec='.') dim(yx.df) #get X matrix y<-yx.df[,1] x<-yx.df[,2:643] #conver to matrix mat<-as.matrix(x) #get row number rownum<-nrow(mat) #remove the constant parameters mat1<-mat[,apply(mat,2,function(.col)!(all(.col[1]==.col[2:rownum])))] dim(yx.df) dim(mat1) #remove columns with numbers of
2009 Feb 16
24
como consultar en oracle
holaa todos ante todo un cordial saludo alguien que me pueda ayudar. se plantea lo siguiente necesito mostrar 2 campos de una tabla los cuales son mtin_mtin,mtin_descri de una tabla llamada re_tmtinv de esos dos campos se necesita obtener el codigo y la descripcion,y luego ser mostrado para despues ser agregados a un formulario. el problema que tengo es que ya tengo la vista pero esta en blanco