similar to: Source Code for zoo?

Displaying 20 results from an estimated 6000 matches similar to: "Source Code for zoo?"

2006 Aug 10
3
Is there a better way than x[1:length(x)-1] ?
Hi WizaRds, In MATLAB you can do x=1:10 and then specify x(2:end) to get 2 3 4 5 6 7 8 9 10 or whatever (note that in MATLAB the parenthetic index notation is used, not brackets as in R). The point is that 'end' allows you to refer to the final index point of the array. Obviously there isn't much gain in syntax when the variable name is x, but when it's something like
2007 Jan 25
2
Days of the week?
Hi WizaRds, What is the "standard" way to get the day of the week from a date such as as.Date("2006-12-01")? It looks like fCalendar has some functions but this requires a change in the R locale to GMT. Is there another way? Thanks! Jack. --------------------------------- Be a PS3 game guru. [[alternative HTML version deleted]]
2006 Mar 13
3
Incrementing a counter in lapply
Hi All, I'm looking for some hints on idiomatic R usage using 'lapply' or similar. What follows is a simple example from which to generalize my question... # Suppose, in this simple example, I want to plot a number of different lines in different colors; # I define the colors I wish to use and I plot them in a loop: d<-
2006 Feb 28
2
Elegant way to express residual calculation in R?
Hi All, I am illustrating a simple, two-way ANOVA using the following data and I'm having difficulty in expressing the predicted values succinctly in R. X<- data.frame(read.table(textConnection(" Machine.1 Machine.2 Machine.3 53 61 51 47 55 51 46 52 49 50
2007 Jul 12
1
WWW::Mechanize::Link.inspect needs some TLC
The problem: users trying to debug Mechanize apps with Komodo are finding the debugger times out once it''s loaded a web page. They don''t run into this in the ruby-debug debugger, or running in normal mode. The reason: Komodo''s debugger is graphical, which means that whenever it hits a breakpoint it automatically shows the contents of each local variable. It has a
2010 Dec 05
3
Strange problem with CSV and funny chars
I am using CSV in a rake task (db:seed) on Rails 3.0.3, Ruby 1.9.2 to read a file with some funny chars in it. Upon breaking in at a point where the row read using CSV is in variable row, with the string with the char in row[''price''] I get the following strange results which I cannot understand. (rdb:1) row[''price''] "\xA32.00" (rdb:1)
2005 Dec 06
1
array of lists? is this the best way to do it?
[Q.] How to create an array of lists, or structures the most elegant way? There have been questions in the past but none too recently...I want to know if the following looks OK to you guys or if there is a better way to create an array of lists: # PREAMBLE ... JUST TO GET THINGS GOING makeList<- function(data, anythingElse) { rval <- list( data = data, anythingElse =
2006 Nov 28
1
Can anyone read a S-PLUS .dmp file for me?
Hi WizaRds, I tried reading the S-PLUS file ftp://ftp.research.att.com/dist/bayes-meta/hblm.dmp into R using data.restore("hblm.dmp") but I got an error: Error in attributes(value) <- thelist[-match(c(".Data", ".Dim", ".Dimnames", : row names must be 'character' or 'integer', not 'double' In
2008 Mar 08
1
plotting NAs
Hi WizaRds, (I've cross-posted to r-sig-finance because a lot of people there use 'zoo' objects). I'm trying to plot 2 time series lined up with par(mfrow=c(2,1)), so that the time index is the same for the two series. The data have monthly frequency. An example will illustrate: # data for these dates (monthly frequency) do not have NAs: require(zoo) monthly.dates<-
2011 Apr 27
2
Can not create model instance via params on specific model but can on others....
Anyone have an idea on this? Got a weird situation where on a specific model I can not create an instance using params, yet it works fine on other models. The model which does not work is a stock model, there is no logic in it. Ruby 1.8.7/Rails 3.0.5. Does not work: (rdb:1) PaymentTransaction.create(:purchase_id => 3) #<PaymentTransaction id: 2, purchase_id: nil, action: nil, amount: nil,
2005 Dec 06
3
reading in data with variable length
I have very large csv files (up to 1GB each of ASCII text). I'd like to be able to read them directly in to R. The problem I am having is with the variable length of the data in each record. Here's a (simplified) example: $ cat foo.csv Name,Start Month,Data Foo,10,-0.5615,2.3065,0.1589,-0.3649,1.5955
2007 Apr 19
2
invalid geometry string in change_geometry
I get the following error at the browser: ArgumentError in ImagesController#upload invalid geometry string `110×'' ... for the call to change_geometry with an explicit size (''110x'') as the geometry string: def make_thumb (the_img) require ''RMagick'' size = "110x" debugger if ENV[''RAILS_ENV''] ==
2006 Aug 01
1
Tcltk package
Hi WizaRds, I ran into trouble trying to install the "debug" package, which requires TCL/TK support. It seems like the tcltk package is not installed on my system. From: http://tolstoy.newcastle.edu.au/R/help/05/07/7993.html it seems that the tcltk is bundled with the base R distribution. I'm running R under linux: > version _ platform i686-pc-linux-gnu
2007 Sep 13
2
Multivariate, multilevel regression?
Dear WizaRds, This is mostly a statistics question, but I'm figuring that R is the right solution (even before I start!) I have some bio data of heart rate versus time (rats taken from resting to maximal heart rate). I want to regress heart rate on time. The data have been normalized such that resting heart rate is zero at time=0, so that all curves intersect at the origin (and at the origin
2007 Sep 29
1
RODBC and Oracle
Hi WizaRds, I'm experiencing a problem connecting to an Oracle 10g database via RODBC (I'm getting this on Microsoft XP). The same SQL queries via PL/SQL Developer work just fine, but when I pump the query through sqlQuery in RODBC then I get a data frame back with 0 rows. I cut the query down alternating between PL/SQL and RODBC until I figured that it's some kind of row limit or
2010 Jun 21
1
Problem with package installation
Dear ComRades, I am having the "wrong MD5 checksums" error with every package I try to install. It happened with R 2.11.0, then I updated to R 2.11.1, same thing. sessionInfo() R version 2.11.1 (2010-05-31) i386-pc-mingw32 locale: [1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252 LC_MONETARY=Spanish_Spain.1252 [4] LC_NUMERIC=C
2017 Aug 18
4
No rule to make target all.R, needed by compiler.rdb building R 3.4.1 from source, Scientific Linux release 6.9 (Carbon)
Hello, I am trying to build R from source on Scientific Linux release 6.9 (Carbon), Linux version 2.6.32-696.3.2.el6.x86_64 (Red Hat 4.4.7-18). I load the needed modules and run: *./configure --prefix $install_dir --with-blas --with-lapack --enable-R-shlib 2>&1 | tee config-R-$version.log* The "configure" command seems to run ok: *R is now configured for
2006 Mar 16
1
Problem compiling R-Patched
I downloaded R-Patched today (to see if another problem I want to ask about is still present or if its just me - as per the posting guide). I ran "tools/rsync-recommended" successfully. I then ran "configure --enable-R-shlib" successfully. Then make stops with the following error. gcc -shared -L/usr/local/lib -o tools.so text.o init.o Rmd5.o md5.o -L../../../../lib -lR
2006 Jul 25
3
Overplotting: plot() invocation looks ugly ... suggestions?
Hi WizaRds, I'd like to overplot UK fuel consumption per quarter over the course of five years. Sounds simple enough? Unless I'm missing something, the following seems very involved for what I'm trying to do. Any suggestions on simplifications? The way I did it is awkward mainly because of the first call to plot ... but isn't this necessary, especially to set limits for the
2006 Aug 02
1
MATLAB 6.5 under Wine
Hi, I'm completely new to Wine (I'm running version 0.9.9 under Ubuntu 6.06). I have been able to install and run Windows apps and I can see that Wine really rocks! For speed, I'd rather run Wine than VMware, especially when it comes to running MATLAB under linux. I'm having difficulty with getting MATLAB (6.5.0.180913a (R13)) to run. There are several threads in the Wine