similar to: strange behaviour of "POSIXlt" "POSIXt" object

Displaying 20 results from an estimated 500 matches similar to: "strange behaviour of "POSIXlt" "POSIXt" object"

2011 May 18
4
Loop stopping after 1 iteration
Hi all, This is a very basic question, but I just can't figure out why R is handling a loop I'm writing the way it is. Here is the script I have written: grid_2_series<-function(gage_handle,data_type,filename) series_name<-paste(gage_handle,data_type,sep="_") data_grid<-read.table(file=paste(filename,".txt",sep=""))
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
2008 Sep 17
4
cron job not working
Here's a perl script that works when I run it manually. But when I run it via cron, it won't create the directory. But worse than that, an email isn't sent to the account running the job. So I'm not getting an error, but it does work when I run it manually. If I put an obvious error in the script, cron does generate an email giving me the STDERR. What could it be? === Al
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
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
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
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
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
2010 Oct 01
3
Converting a dataframe column from string to datetime
Hi, I have a dataframe column of the form v<-c("Fri Feb 05 20:00:01.43000 2010","Fri Feb 05 20:00:02.274000 2010","Fri Feb 05 20:00:02.274000 2010","Fri Feb 05 20:00:06.34000 2010") I need to convert this to datetime form. I did the following.. lapply(v,function(x){strptime(x, "%a %b %d %H:%M:%OS %Y")}) This gives me a list that looks like
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
2020 Oct 23
2
The presence/absence of `zone` in POSIXlt depending on time zone as a cause of possible inconsistences?
Dear all, I have just detected what seems a minor inconsistence with data types. If one unlists a POSIXlt time with GMT zone gets a numeric vector, since the POSIXlt list has no `zone` element, while if one unlists a POSIXlt time with a non GMT zone (also non specifying tz if the Sys.timezone is not GMT) gets a character vector due to including the `zone` element. > x <-
2007 Jan 17
2
problem with unlist POSIX date at midnight
Dear R-users, I use unlist of POSIX dates to extract the year, hour etc. With that I can search for files in my database which are in the form 'yyyymmddhh_synops.txt' However, I get stucked during midnight where unlist just gives NA's. The script is given below, the problem accurs at acc.period[16] (midnight). However when I write out the character, unlist works well. But
2011 May 14
2
changing the day of the week in dates format
Dear all, I have a question related to the POSIXlt function in R. I have a set of dates and times, for exmaple: startx <- as.POSIXct("2011-01-01 00:00:00") finx <- as.POSIXct("2011-12-31 00:00:00") daysx<- seq(startx, finx, by="24 hours") I want to change the dates of all the days falling on a Saturday to the next working day (i.e. Monday). So I
2007 Dec 11
3
Wrong length of POSIXt vectors (PR#10507)
Full_Name: Petr Simecek Version: 2.5.1, 2.6.1 OS: Windows XP Submission from: (NULL) (195.113.231.2) Several times I have experienced that a length of a POSIXt vector has not been computed right. Example: tv<-structure(list(sec = c(50, 0, 55, 12, 2, 0, 37, NA, 17, 3, 31 ), min = c(1L, 10L, 11L, 15L, 16L, 18L, 18L, NA, 20L, 22L, 22L ), hour = c(12L, 12L, 12L, 12L, 12L, 12L, 12L, NA, 12L,
2005 Oct 06
2
isdst
Can someone, please, explain the difference is results below (notice the isdst value) > unlist(as.POSIXlt('2005-7-1')) sec min hour mday mon year wday yday isdst 0 0 0 1 6 105 5 181 1 > unlist(as.POSIXlt(as.Date('2005-7-1'))) sec min hour mday mon year wday yday isdst 0 0 0 1 6 105 5 181 0
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_.*,
2006 Mar 01
4
Oracle Bug
I''m using 2 database. The first wrote in MySQL and the second in Oracle. If i use the command "SET_TABLE_NAME" to forge the model to use another table, there isn''t no error with MySQL, while with Oracle if i ask the view "_Form.rhtml" The compiler tell me "No sequence in SELECT TableName_seq.nextval id from dual"(???). Could someone tell me where
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),