Displaying 20 results from an estimated 4000 matches similar to: "RUnit detects parse error, but why?"
2012 Jan 19
2
POSIXct value display incorrect for some values
First, the reproducable example, showing how converting from character to
POSIXct to character changes the milliseconds in the first time stamp
though not in the second:
> as.POSIXct('2010-06-03 9:03:58.324')
[1] "2010-06-03 09:03:58.323 PDT"
> as.POSIXct('2010-06-03 9:03:58.325')
[1] "2010-06-03 09:03:58.325 PDT"
This seems to be due to truncation of
2008 Aug 28
1
Interaction between aggregate() and length()
Folks,
I've been running into an odd situation that occurs when I use length()
function with aggregate(), but not with either one separately. Together,
the results looks correct but is given an unexpected name. 'if
(stringsAsFactors) factor(x) else x' instead of just 'x'.
# Numbers work ok
tt <- data.frame(idx=c(1,1,1,1,1,1,2,2,2,2,2,2)
2009 Apr 02
1
Updating a data frame
Folks,
Updating values in a table is simple in SAS or SQL, but I've wracked my
brain looking for an elegant solution in R to no avail thus far. Certainly
this is a common need that's been solved in dozens of different ways.
Given an initial dataframe nn and a smaller dataframe of updates uu, I'd
like to replace the values in
nn <- expand.grid('a'=1:4, 'b'=1:3)
2009 Jul 02
1
Package 'operators'
Folks,
In brief -- how many of you have found the 'operators' package to be
valuable in their work?
Not that I lack respect for the amount of work involved in creating and
maintaining a package, but I am unsure about the utility of these new
operators. Several of the operators appear to offer different ways of
accomplishing tasks that are already relatively easy in base R -- regular
2009 Feb 10
1
aggregate taking way too long to count.
Folks,
I'm checking the structure of a dataframe for duplicate parameters at a
site station (i.e depth should be measured once, not twice), using
aggregate to count each parameter within a site station. The fake data
below has only 26000 rows, and takes roughly 14 seconds. My real data has
750000 rows and I had to stop execution after about an hour. The by()
function is faster, but I
2005 Oct 07
2
Assign references
Folks,
I've run into trouble while writing functions that I hope will create
and modify a dataframe or two. To that end I've written a toy function
that simply sets a couple of variables (well, tries but fails).
Searching the archives, Thomas Lumley recently explained the <<-
operator, showing that it was necessary for x and y to exist prior to
the function call, but I haven't
2005 Jul 12
4
Calculation of group summaries
I know R has a steep learning curve, but from where I stand the slope
looks like a sheer cliff. I'm pawing through the available docs and
have come across examples which come close to what I want but are
proving difficult for me to modify for my use.
Calculating simple group means is fairly straight forward:
data(PlantGrowth)
attach(PlantGrowth)
stack(mean(unstack(PlantGrowth)))
2012 Sep 27
1
Is there a way to source from a specific Git repository without hardcoding the location everywhere?
Folks,
A small group of us are working together to develop a set of R functions
to support data management and analysis using Eclipse/StatET in a Windows
environment. We are using Git/EGit for version control. We work within
our own repository and occasionally push to a common remote location.
I'd like to have the code source files from the 'local' git repository
without
2011 Apr 19
0
doSMP package works better than perfect, at least sometimes.
Some might have noticed that REvolution Computing released the doSMP
package to the general public about a month and a half ago, which allows
multiple cores to be accessed for parallel computation in R. Some of our
physical habitat calculations were taking an extraordinary amount of time
to complete and required over-weekend runs, which prompted our interest in
this package. What follows
2011 Apr 19
3
How to program with colleagues
Dear all,
my colleagues and I have to write some R code for some of our projects.
I would like to ask you help to organize us a little.
a. Do you know if there is any system that can convert our R scripts to html pages with some nice dependency graphs (which functions calls which).
b. Could you please suggest me an easy way to exchange the R code with my colleagues. I know about these version
2006 Mar 18
2
ANN: capistrano-runit-tasks 0.1.0
I''d like to announce the first release of capistrano-runit-tasks.
This came about as I wanted to use runit rather than spinner/spawner/
reaper on my memory limited VPS but should be useable for any setup.
From the README:
This library extends Capistrano to allow processes to be supervised
using the
runit package. It replaces some of the standard tasks with runit
versions and
2017 Oct 28
0
Variable selection in clusters using 1-R2 ratio
Folks,
I am looking for a means for calculating the 1-R^2 ratio for variable selection to mimic the values of PROC VARCLUS in SAS. While there may be better methods for variable selection, we are trying to duplicate published results at this time.
To date, I have been unable to find a way to obtain this value from Hmisc::varclus , stats::hclust and clustvarsel::clustvarsel. Can any of you give
2004 Aug 09
2
Approaches to using RUnit
Having used JUnit and PyUnit, I was pleased to see the release of the
RUnit package on CRAN.
I'm wondering if there are any RUnit users out there that would be
willing to share some tips on how they organize their code to work with
RUnit.
Specifically, I'm wondering about the best way to load/import/source the
functions to be tested. I would like to end up with a script, testall
or some
2007 Sep 05
2
RUnit testing with R CMD check and more (was: R CMD check recursive copy of tests/)
Hello!
I have looked at Martin's recent work on "merging" unit tests with R CMD check,
fused it with my and Tony's contributions and developed it a bit further. Take
a look into the attached demo package on how it works.
In essence:
PKG/inst/RUnitTests
|- runRUnitTests.R (script to run RUnit tests)
\- ... (any RUnit test file)
2006 Mar 23
4
ANN: capistrano-runit-tasks 0.2.0
I''d like to announce the second release of capistrano-runit-tasks,
available from http://rubyforge.org/projects/cappy-runit/
It now supports:
* File based templates
* sv as the service control command in addition to runsvctrl
* A much simpler interface for creating additional services.
More work still needs to be done though!
== TODO
* Allow add_service to create more than one
2006 Aug 05
1
R CMD check and RUnit
Hi!
I appologize for crossposting, but this might be of broader interest.
In case you are interested in fusing RUnit with R CMD check under unix
alike OS, here is one way of doing/hacking this.
My aim was to perform unit tests:
(1) during R CMD check
(2) at any other time
Say you have a package PKG in a map PKG. I use the following structure
PKG
|- R
|- ...
|- inst
| |- doc
| `-
2009 Jul 01
8
productivity tools in R?
Hi all,
Could anybody point me to some latest productivity tools in R? I am
interested in speeding up my R programming and improving my efficiency
in terms of debugging and developing R programs.
I saw my friend has a R Console window which has automatic syntax
reminder when he types in the first a few letters of R command. And
he's using R under MAC. Is that a MAC thing, or I could do the
2013 May 20
2
Unicorn + RUnit Rails Not Killing Old Master
Hi,
I''m deploying Unicorn on a Rails application with RUnit. Technically
I''m using Chef''s deployment tools, if any of you are familiar with it
(https://github.com/opscode-cookbooks/application_ruby) but to be clear
they aren''t doing anything magical, so this is purely an issue with
RUnit and Unicorn.
The TL;DR of the following post, which has lots of
2006 Feb 04
1
RUnit - need advice on a good directory structure or tips...
I made my own RUnit testing convention, and I want to introduce this to one
of my friends.
Before that, I'd like to review my codes.
The problem that I met when I tried to polish my codes is: How can I get the
file path in the file???
I.e., I want to get the path to the file that I'm writing using some magic R
functions. But I couldn't find any good magic.
Is there any magic?
So, I
2010 Sep 01
2
invert order
Dear R-help list users,
I have a huge vector of numbers, how I can invert orden?
For example
x <- 1:10000000
I would like to obtain
x_r <- 10000000:1
Thanks,
Sebastian.