similar to: median for time data

Displaying 20 results from an estimated 2000 matches similar to: "median for time data"

2012 Sep 04
1
tapply to data.frame or matrix
Dear R users, imagine i have a dataframe and an indexing vector with the length of the amount of columns of the dataframe. Is there any convenient way to combine the colums of the dataframe into vectors (or straight away apply fundtions to these subsets) according to the indexing vector in a similar manner to the tapply function? For example, in the follwoing case, I would like to combine
2007 Apr 20
4
Change the mode of a list
Hello, can anybody tell me a easy way to change the mode of an "aggregate list" to "numeric"? I found a solution but I looks cruel. Thank's Felix PS: In the past you have asked what I am doing. I have to evaluate measures of two gauges of our university. The aim is to get an answer which one is better. > mode(MEAN) [1] "list" > mode(MEASURE) [1]
2009 Jan 26
2
Getting data from a PDF-file into R
Hello I have around 200 PDF-documents, containing data i want organized in R as a dataframe. The PDF-documents look like this; http://www.nabble.com/file/p21667074/PRRS-billede%2Bmed%2Bfarver.jpeg or like this; http://www.nabble.com/file/p21667074/PRRS-billede%2Bmed%2Bfarver%2B2.jpeg So i want to pull out the data in coloured boxes it become organized like this (just in R instead of
2004 Jul 18
2
a problem: factors, names, tables ..
Hi all, I am *completely* lost in trying to solve a relatively simple task. I want to compute the relative number of occurences of an event, the data of which sits in a large table (read from file). I have the occurences of the events in a table 'tt' 0 2 10 11 13 14 15 15 6 1 3 8 15 10 .. meaning that event of type '0' occurs 15 times, type '2' occurs 6 times
2008 Nov 20
1
convert factors to numbers
Hello, I have a problem with reading a csv-file. One colum of the inputfile consists of characters and numbers. After reading the csv-file I create a new dataframe by dividing the values of that colum into more colums (then a colum contains just characters or numbers) but the numbers are converted to factors. How can I create the new dataframe without having the numbers converted to factors?
2004 Nov 21
3
Help with ooplot(gplots) and error bars
Dear All I am trying to graph a proportion and CI95% by a factor with ooplot (any other better solution ?) It works well until I try to add the confidence interval. this is the error message and and a description of the data: > dat1 PointEst TT1 1 3.6 TT2 2 5.0 TT3 3 5.8 TT4 4 11.5 TT5 5 7.5 TT5 6 8.7 TT7 7 17.4 > dat2
2006 Apr 13
1
Subset rows over multiple columns
I have a data frame where I need to subset certain rows before I compute the mean of another variable. However, the value that I need to subset by is found in multiple columns. For example, in the data below the value R0000160 is found in the first and second columns (itd_1 and itd_45). These data are student responses to multiple choice test items from a computer adaptive test. So, the variable
2002 Apr 02
1
cbind.ts bug?
The following creates a time series tt1 whose values rise from 1 to 20 and another time series tt2 each of whose values are 10 larger than the corresponding value in tt1. When we attempt to bind them together as columns, the entry after Dec 1960 is erroneously listed as NA 1960 instead of Jan 1961. If n is changed to either 19 or is changed to 21 in the example below, the example suddenly
2007 May 02
1
Get the difference of values to their own median value
Hello, I've got a matrix (mail end) with the colnames x, y, z. In this matrix are different measurements. x and y are risign coordinates. With the following line I got the median value of z for all "x" AND "y" witch are the same (not every measurment in my list hast the same number of "x" and "y" values. Sometimes lines are missing. >MEDIAN <-
2010 Oct 04
2
Combinations
Hi all, I´ve been ill and I have lost a lot of time without seen the pc. I want you to help if you can if you want. Only I need an initial guide. I´ve been out a lot of time and I need a hope. Is only for "joby" purposes. The problem: I want to simulate each of the posible combination in a play. Imagine they play to games (football games) and you can choose "1",
2008 Oct 03
1
Problem with strptime
Hello, I have a column with dates in the form %Y-%m-%d %H:%M:%S; I want to substract the line i+1 to the line i and get a numeric result (in seconds for instance). This is what I did (I take the data from a database): res<- dbSendQuery (con, "SELECT Date_Heure FROM data.meteo ")Time<-fetch(res, n=-1)TimeDifferencetime<-as.numeric(diff(strptime(Time, format='%Y-%m-%d
2008 Dec 05
2
xtable html links
Hi, I was trying to get hyperlinks using xtable, but couldn't get the hyperlinks to function properly. For example, if I use ## Try to link NY times website to every figure in column 4 mat <- matrix(1:43,6,5) mat[,5] <- "http://nytimes.com" for(i in 1:nrow(mat)){ strr <- paste('<a href="', mat[i,5],'">', mat[i,4], '</a>',
2011 Aug 05
3
excel dates and times in R
Hello, I am having some fun dealing with dates and times. My input is a excel csv file with two columns with data in the following format: date time 25-Jun-1961 04:00:00 i.e. day - month - year hour:min:sec I would like to have a single object in R that combines these and converts them into a sensible R format (e.g.
2006 Nov 23
1
Problem with as.ts(zoo-object)
Dear all, I have an error message, when I try to convert a zoo object (called test) to ts (on R 2.4.0, Package zoo version 1.2-1, Windows XP) > test 1994-05-10 1994-06-09 1994-07-09 0.0024943889 0.0024881824 0.0006955831 > str(test) atomic [1:3] 0.002494 0.002488 0.000696 - attr(*, "index")=Class 'Date' num [1:3] 8895 8925 8955 > is.regular(test) [1] TRUE
2011 Jan 30
4
Extract time only from POSIXlt object
How can I extract only the time component from an POSIXlt object? For example if I try the following it still returns both the date and time... >as.POSIXlt(tr.date[1]) [1] "2010-10-18 21:46:53" >as.POSIXlt(tr.date[1],"%H:%M:%S") [1] "2010-10-18 21:46:53" round and trunc don't help... is there an "as.Time" equivalent to as.Date ? Thanks,
2003 Oct 16
1
A data frame of data frames
Hello, I'm trying to set up the flowwing data structure in R: A data frame with 7,000 rows and 4 colums. The rownames have some special meaning (they are names of genes). The 1st column per row is itself a data frame, and columns 2 to 4 will keep numeric values. The data frame contained in the 1st column will have 54 rows (with special names) and 4 colums (1st col is a response, cols 2- 4
2010 Dec 16
5
test whether all elements of a vector are identical
Dear list, this might be an easy one, but I could figure out a solution (or how to google the right term). Is there any way to test whether all elements of a vector are identical? For numeric vectors I would use sum(diff(vector)==0)==0 but I have character vectors. Any Ideas? Cheers Jannis
2010 Oct 12
2
Fwd: undefining and redefining a Domain from libvirt java bindings
hi, i am trying to undefine a domain by using dm.undefine(); and then trying to create one with same name is giving me error saying 'Domain not found: no domain with matching uuid 'aeae9d4e-17cb-b661-a612-88ac677c28c1' i have attached my test program which reproduces the issue. please let me know where i am going wrong? configuration: libvirt : 0.6.3 Java
2006 Feb 09
1
List Conversion
Hello, I have a list (mode and class are list) in R that is many elements long and of the form: >length(list) [1] 5778 >list[1:4] $ID1 [1] "num1" $ID2 [1] "num2" "num3" $ID3 [1] "num4" $ID4 [1] NA I'd like to convert the $ID2 value to be in one element rather than in two.?? It shows up as c(\"num2\", \"num3\") if I try to use
2011 Apr 27
3
setting options only inside functions
Dear list members, is it possible to set some options only inside a function so that the original options are restored once the function is finished or aborted due to an error? Until now I do something like: dummy=function() { old.options=options(error=dummy1()) .... options(old.options) } This works for most cases but when the function terminates because of an error and its last