Displaying 20 results from an estimated 10000 matches similar to: "Sorting"
2006 Nov 23
1
how to loop this?
Hi,
I have the next procedure:
t1<-data.frame(table(substr(names(subset(lasker[[1]], lasker[[1]] >=
4)), 1, 7)))
t1[1:5,]
Var1 Freq
1 1988-02 3
2 1988-03 1
3 1988-04 1
4 1988-05 2
5 1988-06 3
How to make a new list?, dataframe? having 189 elements in the 'lasker'
list:
> str(lasker[[1]])
'table' int [, 1:1274] 1 1 3 2 1 5 4 1 1 4 ...
-
2006 Nov 22
3
dataframe manipulation
Hi,
Having a dataframe 'l1' (dput output is below):
>dim(l1)
1274 2
>l1[1:12,]
Var1 Freq
1 1988-01-13 1
2 1988-01-16 1
3 1988-01-20 3
4 1988-01-25 2
5 1988-01-30 1
6 1988-02-01 5
7 1988-02-08 4
8 1988-02-14 1
9 1988-02-16 1
10 1988-02-18 4
11 1988-02-24 2
12 1988-03-04 1
I want to extract the times
2006 Nov 26
1
adding elemens to a list
Hi,
I have a list of 20 elements, each of them of variable length and with a
structure like this:
lasker[[1]][1:10,]
Var1 Freq
1 1988-02 3
2 1988-03 1
3 1988-04 1
4 1988-05 2
5 1988-06 3
6 1988-07 1
7 1988-08 1
8 1988-09 1
9 1989-03 1
10 1989-04 1
How do I can insert in this list:
1988-01 0
1988-10 0
1988-11 0
1988-12 0
1989-01 0
2017 Jun 07
0
Determining which.max() within groups
cumsum() seems to be what you need.
This can probably be done more elegantly, but ...
out <- aggregate(Q ~ wyr, data = Daily, which.max)
tbl <- table(Daily$wyr)
out$Q <- out$Q + cumsum(c(0,tbl[-length(tbl)]))
out
## yields
wyr Q
1 1990 4
2 1991 6
3 1992 9
4 1993 15
5 1994 18
I leave the matter of Julian dates to you or others.
Cheers,
Bert
Bert Gunter
"The trouble
2008 May 09
2
Tabulation of aggregated data.frame
Hi useRs!
I would like to know how to make aggregated data.frame with
aggregate() tabulated.
For example, I run the following command to aggregate re with respect
to group1 and group2.
> (aggr <- with(final, aggregate(re, group1, group2, mean)))
Group.1 Group.2 x
1 1992 15 0.16392
2 1993 15 0.15467
3 1994 15 0.15456
4 1995 15 0.15391
2017 Jun 07
4
Determining which.max() within groups
Using the dataset below, I got close to what I'm after, but not quite all
the way there. Any suggestions appreciated:
Daily <- read.table(textConnection(" Date wyr Q
1911-04-01 1990 4.530695
1911-04-02 1990 4.700596
1911-04-03 1990 4.898814
1911-04-04 1990 5.097032
1911-04-05 1991 5.295250
1911-04-06 1991 6.569508
1911-04-07 1991 5.861587
1911-04-08 1991 5.153666
2006 Dec 28
3
Dates in R
Hello all,
Can somebody point me to references or provide some code on dealing with
this date issue. Basically, I have two vectors of values that represent
dates. I want to convert these values into a date format and subtract the
differences to show elapsed time in days. More specifically, here is the
example:
Date1 Date2
032398 061585
032398 061585
111694 101994
111694
2009 Jul 11
2
Date conversions
Hi all,
I'm having a little bit of trouble with some date conversions and
am hoping someone can help me out. Thanks in advance.
OK, I have two sources of data that provide date info in a csv file
differently. I've attached a small zipped file with two text files
that illustrate both. (Is it ok to send attachments to this list? Not
sure. It's very small.) I need to be able to
2009 Aug 07
3
How do I plot a line followed by two forecast points?
Good day all,
I'm trying to plot a continuous line plot, which is followed by two
forecast points eg. one forecast point is 12 months out, and another
24 months out from the last date of the line plot.
In my attempts so far, the second plot (the forecast points) is scaled
against a new axis scale, thus the two plots are not directly
comparable (I need the forecast points to be scaled
2012 Nov 10
4
help on date dataset
Hi everybody,
I am beginer in R and I need your precious help.
I want to create a small function in R as in sas to retrieve date.
I have a file with data that import in R.
DATE PAYS nb_pays.ILI.
1 24/04/2009 usa 0
2 24/04/2009 usa 0
3 24/04/2009 Mexique 0
4 24/04/2009
2005 Oct 13
1
subsetting data frame using by() or tapply() or other
Ok so I see the problem that I'm having creating a new variable (LAG1DBC)
in the example data transformation below is that tapply() is creating a
list that is not dimensionally consistent with the data frame (data). So
how do I go from the list output of tapply() to create a dimensionally
consistent vector that can create the new variable in my original data
frame? I've been trying
2013 Mar 14
1
ggplot2 problem
Hello all!
I have a problem with ggplot2 library. I want to do an heat map and the y
variables are the year months. If I use the following code, he y values are
in alphabetical order, but I want it in month order.
The code is:
library(reshape)
library(ggplot2)
library(scales)
p <- ggplot(data.m, aes(variable, Month)) + geom_tile(aes(fill = value),
2009 Jan 14
1
publication statistics from Web of Science
Dear list,
This is a bit of an off-topic question, but I'm hoping to get some
advice from more experienced people. I've used the website "Web of
Science" to manually collect publication counts responding to several
keywords as a function of date, since the 1960s.
http://apps.isiknowledge.com/RAMore.do?product=UA&search_mode=&SID=P1g9lFJp9 at
2005 Nov 17
1
Help with read.csv2
Hello,
I am importing the following file
;aa;bb;cc
1988;12;12;12
1989;78;78;12
1990;78;78;12
1991;78;78;12
1992;78;78;12
1993;78;78;12
1994;78;78;12
------------------------------------------------
data<-read.csv2("test.csv",header=T)
------------------------------------------
it gives
X aa bb cc
1 1988 12 12 12
2 1989 78 78 12
3 1990 78 78 12
4 1991 78 78 12
5 1992 78 78 12
6
2013 Feb 14
3
Problems plotting and regression w.r.t. date data type on x axis
Hello,
probably a newbie question, but i didnt find any information on
plotting/regressing w.r.t. a date data type. My trials were unfruitful. Can
anyone help ? Thanks in advance!
Here is my interaction with R:
> tabelle
date number date2
1 2009-01-1 1673 2009-01-01
2 2009-12-1 2111 2009-12-01
3 2010-7-1 2487 2010-07-01
4 2013-2-1 4301 2013-02-01
> regression.punkte<-lm(tabelle$number
2007 Dec 19
3
plot cummulative sum from calendar time
I have the following list of observations of calendar time:
[1] 03-Nov-1997 09-Oct-1991 27-Aug-1992 01-Jul-1994 19-Jan-1990 12-Nov-1993
[7] 08-Oct-1993 10-Nov-1982 08-Dec-1986 23-Dec-1987 02-Aug-1995 20-Oct-1998
[13] 29-Apr-1991 16-Mar-1994 20-May-1991 28-Dec-1987 14-Jul-1999 27-Nov-1998
[19] 09-Sep-1999 26-Aug-1999 20-Jun-1997 05-May-1995 26-Mar-1998 15-Aug-1994
[25] 24-Jun-1996 02-Oct-1996
2005 Feb 24
2
Row median of Date class variables in a data frame
I am trying to calculate the median of each row of a
data frame where the data frame consist of
columns of class Date.
Below are my test data and best attempt at using apply.
I didn't see a solution via Google or the Baron search
site.
I'd be grateful for any suggestions or solutions.
I'm using R 2.0.0 on Mac OS X.
Thank you,
Stephen Weigand
### Test data
date1 <- c(1000,
2015 Nov 06
4
Puzzled by eval
I am currently puzzled by a seach path behavior. I have a library of a dozen routines
getlabs(), getssn(), getecg(), ... that interface to local repositories and pull back
patient information. All have a the first 6 arguments in common, and immediately call a
second routine to do initial processing of these 6. The functions "joe" and "fred" below
capture the relevant
2011 Dec 07
2
plotting and coloring longitudinal data with three time points (ggplot2)
Dear list,
I have been struggling with this for some time now, and for the last hour I have been struggling to make a working example for the list. I hope someone out there have some experience with plotting longitudinal data that they will share.
My data is some patient data with three different time stamps. First the patients are identified at different times (first time stamp). Second, they
2009 Dec 09
1
reshape() makes R run out of memory (PR#14121)
Full_Name: Alexander L. Belikoff
Version: 2.8.1
OS: Ubuntu 9.04 (x86_64)
Submission from: (NULL) (67.244.71.200)
I'm trying to reshape the following data frame:
ID DATE1 DATE2 VALUE_TYPE VALUE
'abcd1233' 2009-11-12 2009-12-23 'TYPE1' 123.45
...
VALUE_TYPE is a string and is a factor with only 2 values