Displaying 20 results from an estimated 10000 matches similar to: "Subset by Factor by date"
2009 Apr 16
3
"reverse truncate" to extract only decimal values
hello there,
Is there a way of truncating in the opposite direction so as to retain only
the values to the right of the decimal??
i.e. rather than:
> trunc(39.5)
[1] 39
i would get something like:
> revtrunc(39.5)
[1] 0.5
I've been searching to no avail but I imagine there is a very simple
solution!
Tyler
--
View this message in context:
2008 May 05
3
merge numerous columns of unequal length
I have numerous objects, each containing continuous data representing the
same variable, movement rate, yet each having a different number of rows.
e.g.
d1<-as.matrix(rnorm(5))
d2<-as.matrix(rnorm(3))
d3<-as.matrix(rnorm(6))
How can I merge these three columns side-by-side in order to create a table
regardless of the difference in length? I wish to analyze the output in a
spreadsheet
2008 Jun 02
4
NOT-SO-SIMPLE function!
I am trying to set up a function which processes my data according to the
following rules:
1. if (x[i]==0) NA
2. if (x[i]>0) log(x[i]/(number of consecutive zeros immediately preceding
it +1))
The data this will apply to include a variety of whole numbers not limited
to 1 & 0, a number of which may appear consecutively and not separated by
zeros. Below is an example with a detailed
2008 Sep 16
1
analyze subsample of dataframe
Hi there,
I'm dealing with a pretty big dataset (~22,000 entries) with numerous
entries for every day over a period of several years. I have a column
"judy" (for Julian Day) with 0 beginning on Jan. 1st of every new year (I
want to compare tendencies between years). However, in order to control for
a leap year (2004), I simply need to subtract 1 from every judy value for
the year
2009 Mar 28
1
Find inflection points using smooth.spline
Is there any way to identify or infer the inflection points in a smooth
spline object? I am doing a comparison of various methods of time-series
analysis (polynomial regression, spline smoothing, recursive partitioning)
and I am specifically interested in obtaining the julian dates associated
with the inflection points inferred by the various models.
Tyler
e.g.
2008 Jun 19
2
Advanced Filtering problem
http://www.nabble.com/file/p18018170/subdata.csv subdata.csv
I've attached 100 rows of a data frame I am working with.
I have one factor, id, with 27 levels. There are two columns of reference
data, x and y (UTM coordinates), one column "date" in POSIXct format, and
one column "diff" in times format (chron package).
What I am trying to do is as follows:
For each day
2008 Oct 13
2
split data, but ensure each level of the factor is represented
Hello,
I'll use part of the iris dataset for an example of what I want to
do.
> data(iris)
> iris<-iris[1:10,1:4]
> iris
Sepal.Length Sepal.Width Petal.Length Petal.Width
1 5.1 3.5 1.4 0.2
2 4.9 3.0 1.4 0.2
3 4.7 3.2 1.3 0.2
4 4.6 3.1 1.5
2009 Sep 09
1
change character to factor in data frame
Dear all
I have a simple problem which I thought is easy to solve but what I tried
did not work. I want to change character variables to factor in data
frame. It goes easily from factor to character, but I am stuck in how to
do backwards conversion.
Here is an example
irisf<-iris
irisf[,2]<-factor(irisf[,2]) # create second factor
str(irisf)
'data.frame': 150 obs. of 5
2010 Feb 19
3
plot circular histogram
In conducting studies of animal orientation and displacement, I need to
produce circular histograms of angles (bearings in radians 0-2pi) where the
centre of the circle indicates very few observations for a given bin of
angles and outwardly concentric circles indicate greater frequencies of
observations for a given bin of angles. I'd like not to have to write the
function myself but I
2012 Jul 19
2
Subsetting problem data, 2
Hello,
I didn't give enough information when I sent an query before, so I'm trying
again with a more detailed explanation:
In this data set, each patient has a different number of measured variables
(they represent tumors, so some people had 2 tumors, some had 5, etc). The
problem I have is that often in later cycles for a patient, tumors that
were originally measured are now missing (or
2015 Nov 19
7
[Bug 93004] New: Guild Wars 2 crash on nouveau DX11 cards
https://bugs.freedesktop.org/show_bug.cgi?id=93004
Bug ID: 93004
Summary: Guild Wars 2 crash on nouveau DX11 cards
Product: Mesa
Version: git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/DRI/nouveau
Assignee: nouveau at
2008 Feb 26
2
Subsetting within xyplot()
All,
I'm having problems w/ a simple attempt to subset an xyplot.
The first plot below is a plot of y versus x for certain values of a third
categorical variable z. Now I'd like to further restrict this to certain
values of variable y. Neither of the two attempts below work. Any
suggestions much appreciated. (note: I don't want to merely use ylim since
I have a loess plot and I
2019 Mar 23
4
topenv of emptyenv
I was surprised just now to find out that `topenv(emptyenv())` equals
? `.GlobalEnv`, not `emptyenv()`. From my understanding of the
description of `topenv`, it should walk up the chain of enclosing
environments (as if by calling `e = parent.env(e)` repeatedly; in
fact, that is almost exactly its implementation in envir.c) until it
hits a top level. However, `emptyenv()` has no enclosing
2015 Dec 10
6
How do I reliably and efficiently hash a function?
I?ve got the following scenario: I need to store information about an
R function, and retrieve it at a later point. In other programming
languages I?d implement this using a dictionary with the functions as
keys. In R, I?d usually use `attr(f, 'some-name')`. However, for my
purposes I do not want to use `attr` because the information that I
want to store is an implementation detail that
2010 Jul 18
2
simple loop(?) analysing subsets
Hi All,
I have a large data set with many columns of data. One of these columns is a
species identifier and the remainder are variables such as temperature or
mass. Currently I am carrying out a single regression on subsets of the data
set, e.g. separated data sets with only the data from one species at a time.
I have been searching for a thread that will help me to understand how best
to repeat
2012 Apr 01
1
trouble with small multiples on a date variable
Hello,
I am loading a DBF file into R via JGR and am having trouble creating small
multiple histograms on a date variable. Hist() handles the variable
correctly. But I've been unable to work with lattice or ggplot2 despite
trying format() and as.POSIXct(). Dates are in the format "2010-05-15" and
the grouping variable is categorical. I'd appreciate it if someone would
provide an
2003 Sep 12
2
Sorting a vector by date
Hello out there....
Again I have a problem and I stuck...
How can I sort a vector of dates?
For example I have the vector
a<-ISOdate(2001, 1, 1) + 70*86400*runif(10)
How can this vector be sorted chronological?
And what's the function I should work with to handle these entries?
(in sense of: which(a>2001-01-04) or somehting like that)
Thank you for helping
M.Kirschbaum
2006 Jun 22
5
(Still) no printing possible in wine 0.9.15
Hello List,
since my first posting with the same subject was somehow incomplete, i
decided to repost my question.
I just installed wine-0.9.15, because I wasn't able to print with
wine-0.9.8, but unfortunately the problem persists.
My systems:
Workstation:
Gentoo 2006.0
Cups-1.1.23
no /etc/printcap
no local printer connected
Print server:
Gentoo 2006.0
Cups-1.1.23
Printer: Canon i560
2011 Feb 14
1
Selecting particular rows in a table
Hi,
I have a huge table with 134,000 entries. I want to choose only rows 60,000
to 90,000.
Please help me on how to do this.
V1 V2 V3 V4
1 31.10267 168.3204 41 0.4
2 31.19941 168.1488 41 0.4
3 31.29580 167.9764 41 0.4
4 31.39183 167.8034 41 0.4
5 31.48750 167.6297 41 0.4
6 31.58280 167.4553 41 0.4
7 31.67774 167.2803 41 0.4
8 31.77229 167.1045 41 0.4
9 31.86648 166.9281
2005 Jun 03
1
factor vector manipulation
Hi,
I have one question on factor vector.
I have 3 factor vectors:
a<-factor(c("1", "2", "3"))
b<-factor(c("a", "b", "c"))
c<-factor(c("b", "a", "c"))
what I want is like:
c x
1 b 2
2 a 1
3 c 3
which means, I use b as keys and vector a as values and I find values for c.
I used the following