Displaying 20 results from an estimated 30000 matches similar to: "Notes on R Objects"
2011 Mar 09
1
Regular Expressions in Column Headings
Hi all,
I am hoping that someone can help me with a problem I am having with column
headings. I have read a table into R using read.table: the rows are
documents, and the columns are counts of regular expression matches (so that
the column heading is the given regular expression). My problem is that
read.table seems to be trying to interpret the regular expressions, or has
trouble with the
2004 Oct 04
2
Identifying time series
Hello,
I am currently attempting to introduce R at my company and am trying to
import time series data from a text file into R to graph. The format of the
text file is in date, data (e.g., 20040929 3.361). My problem is that I do
not know how to get R to recognize the first column as a business date
series. Or at the very least, I am unable to find a function that will grap
the second column
2010 Oct 21
2
Calculating variances in a moving window
I am trying to create basic descriptive statistics for a spatial dataset
using moving windows of variable sizes.
I found the filter(dataset, rep(1/a,1)) very useful for obtaining
averages for a given moving window size "a"
(a is the window size within a column of data in a matrix - the filter
is applied to all columns automatically)
I could not find anything analogous for
2010 Oct 25
2
dataframe, transform, strsplit
Hi,
I have a dataframe that has a column of vectors that I need to extract off
the character string before the first '.' character and put it into a
separate column. I thought I could use 'strsplit' for it within
'transform', but I can't seem to get the right invocation. Here is a sample
dataframe that has what I have, what I want, and what I get. Can someone
tell
2015 Aug 07
2
[RFC] BasicAA considers address spaces?
On Fri, Aug 7, 2015 at 12:01 PM, Matt Arsenault <Matthew.Arsenault at amd.com>
wrote:
> On 08/07/2015 11:35 AM, Jingyue Wu wrote:
>
> + the new llvm-dev
>
> On Fri, Aug 7, 2015 at 11:30 AM, Jingyue Wu <jingyue at google.com> wrote:
>
>> Hi folks,
>>
>> Unsurprisingly, leveraging the fact that certain address spaces don't
>> alias can
2011 Oct 21
1
How to create time series objects combining two vectors
I am new to R and trying to understand time series objects.
I have 2 vectors, one containing rainfall values (lets call the vector
"rain") and the other the time/date in seconds (lets call it "time"). Is
there a method to create a time series object simply by giving the "rain"
and "time" vectors as inputs? Something in the line of:
time_series_object
2011 Mar 10
2
Create an environment and assign objects to it in one go?
Hi,
I've just created:
newEnvEval <- function(..., hash=FALSE, parent=parent.frame(), size=29L) {
envir <- new.env(hash=hash, parent=parent, size=size);
evalq(..., envir=envir);
envir;
} # newEnvEval()
so that I can create an environment and assign objects to it in one go, e.g.
env <- newEnvEval({ a <- 1; b <- 2; });
print(env$a);
Does this already exists somewhere?
2011 Mar 15
2
Pointwise division of two zoo objects?
Just trying to create returns from prices, and do something like:
returns.z = tail(prices.z,-1)/head(prices.z,-1) - 1 # should be equivalent
to returns = exp(diff(log(prices.z))) - 1
Curiously, I get a zoo object back with zeros everywhere and also with the
index having one fewer element than it should.
Does anyone know how to pointwise divide zoo objects, and what exactly "/"
is
2011 Mar 19
2
Referring to objects themselves
Is it possible to refer to an object from within a method, as in *this *in
Java? I can't find anything about this in the documentation. Sorry if I
missed it.
Thanks.
*-- Russ Abbott*
*_____________________________________________*
*** Professor, Computer Science*
* California State University, Los Angeles*
* Google voice: 747-*999-5105
* blog: *http://russabbott.blogspot.com/
vita:
2011 Apr 03
2
converting "call" objects into character
Dear all,
I would like to log the calls to my functions. I am trying to do this using the function match.call():
fTest<-function(x)
{
theCall<-match.call()
print(theCall)
return(x)
}
> fTest(2)
fTest(x = 2)
[1] 2
I can see "theCall" printed into the console, but I don't manage to convert it into a character to write it into a log file
2012 May 02
1
select month data in ts objects
In a time series ts object, like the z1.ts below:
z1 = array(1:235)
z1.ts = ts(z1, frequency =12)
I would like to select only a certain month, for instance the "February"
data
If I transform the data to a matrix, I have the problem that 235 is not
a multiple of 12
I do not like to cut or add data, or program a loop to pick out the
correct data.
I am wondering if exist an easier
2006 Jun 27
1
multiple tunnelling problem
Hello all,
I have a problem with one of my routing requirements when using IPSec
along with a proprietary Mobile IP implementation. And sorry for such a
long mail :(
Here is a brief description of my situation: My client (mobile-node) has
an IP address of 10.10.10.40, my gateway (actually home-agent) has an IP
address of 10.10.10.1 and systems in my home network are in 10.0.0.0
network.
2011 May 28
1
How to do operations on zoo/xts objects with Monthly and Daily periodicities
Is there an elegant way to do operations (+/-/*/ / ) on zoo/xts objects when
one serie is monthly (end of month) and the other daily (weekdays only) -
typically a monthly economic indicator and a stock index price?
Thanks,
TDB
--
View this message in context: http://r.789695.n4.nabble.com/How-to-do-operations-on-zoo-xts-objects-with-Monthly-and-Daily-periodicities-tp3558081p3558081.html
2013 Apr 08
2
cbind for list of zoo objects
Can someone explain why this happens when one of the list elements is named 'all'?
> zz <- list( zoo(1:10,1:10), zoo(101:110,1:10), zoo(201:210,1:10) )
> names(zz)<-c('test','bar','foo')
> do.call(cbind,zz)
test bar foo
1 1 101 201
2 2 102 202
3 3 103 203
4 4 104 204
5 5 105 205
6 6 106 206
7 7 107 207
8 8 108 208
9
2011 Nov 24
2
proper work-flow with 'formula' objects and lm()
Dear all
I have a work-flow issue with lm(). When I use
> lm(y1~x1, anscombe)
Call:
lm(formula = y1 ~ x1, data = anscombe)
Coefficients:
(Intercept) x1
3.0001 0.5001
I get as expected the formula, "y1 ~ x1", in the print()ed results or
summary(). However, if I pass through a formula object
> (form <- formula(y1~x1))
y1 ~ x1
> lm(form, anscombe)
Call:
2016 Apr 12
2
Failed to re-index objectSid after botched DLZ back-end update
Alright, I'm taking the plunge: We're switching our three AD DCs from Samba internal to BIND_DLZ back end.
I needed a version of BIND with DLZ, as it appears support for that is not so ubiquitous.
I went here first: https://wiki.samba.org/index.php/Using_BIND_DLZ_backend_with_secured_/_signed_DNS_updates
We use Ubuntu 14.04 here, and the Debian/Ubuntu instructions fail on apt-get
2012 Mar 29
4
Handling functions as objects
I learnt that functions can be handled as objects, the same way the variables
are. So, the following is perfectly valid:
> f = function(a, b) {
+ print(a)
+ print(b)
+ }
>
> f1 = function(foo) {
+ foo(1,2)
+ }
>
> f1(f)
[1] 1
[1] 2
>
I also know that operators are functions, so, I can call:
> '+'(1,2)
[1] 3
>
However, when I want to pass the
2012 Feb 15
7
matching a sequence in a vector?
Hi All,
I've been trawling through the documentation and listserv archives on this topic -- but
as yet have not found a solution. I'm sure this is pretty simple with R, but I cannot work out how without
resorting to ugly nested loops.
As far as I can tell, grep, match, and %in% are not the correct tools.
Question:
given these vectors --
patrn <- c(1,2,3,4)
exmpl <-
2011 Mar 09
2
SQLDF - Submitting Queries with R Objects as Columns
Fellow R programmers,
I'd like to submit SQLDF statements with R objects as column names.
For example, I want to assign "X" to "var1" (var1<-"X") and then refer to
"var1" in the SQLDF statement. SQLDF needs to understand that when I
reference "var1", it should look for "X" in the dataframe.
This is necessary because my SQLDF
2010 Oct 15
7
Problem with merging two zoo objects
Dear all, I have following 2 zoo objects. However when I try to merge those 2 objects into one, nothing is coming as intended. Please see below the objects as well as the merged object:
> dat11
V2 V3 V4 V5
2010-10-15 13:43:54 73.8 73.8 73.8 73.8
2010-10-15 13:44:15 73.8 73.8 73.8 73.8
2010-10-15 13:45:51 73.8 73.8 73.8 73.8
2010-10-15 13:46:21 73.8 73.8 73.8 73.8