similar to: Calculate days with R

Displaying 20 results from an estimated 3000 matches similar to: "Calculate days with R"

2013 Jun 15
2
quick Help needed
Hi, i am new to this forum and not sure how it works, I am trying to do deskriptive descripe my data in terms of gender: head(scltotal) pbnr dat dep dys sop ago mis age female messpunkt2 messpunkt1 tage eintrittsjahr 1 10023 1994-02-21 0.75 1.00 0.50 0.50 0.75 35 1 8817 8817 0 1994 2 10023 1994-05-25 0.75 1.00 0.50 0.50 0.75 35 1 8910 8817
2006 Aug 11
1
x tick labels - sparse?
Hi, I'm stuck on creating a plot with x tick labels for every Nth tick mark - how is that done? I don't see a simple solution to this in help(plot) or help(par) and what I've tried is not working, eg, the following does not work, although it seems intuitive to me that it should work: x <- seq(-100,1000,25) y <- x * x % find all the x values that are multiples of 100 tmp <-
2008 Jun 15
1
Help finding the mode and maximum for a specified 'window' of time series data
I am relatively new to R, so apologize up front for my long question, particularly if there is too much or too little information. I have a large time series data set where each subject's behavior was originally coded on .25s intervals for 3min task. I am trying to determine if the findings are different depending on the coding interval (i.e. Compare .25s to 1s to 5s to 10s). I also need to
2017 Jun 03
0
New var
Ii is difficult to provide useful help, because you have failed to read and follow the posting guide. In particular: 1. Plain text, not HTML. 2. Use dput() or provide code to create your example. Text printouts such as that which you gave require some work to wrangle into into an example that we can test. Specifically: 3. Have you gone through any R tutorials?-- it sure doesn't look like
2017 Jun 03
4
New var
Hi all, I have a data set with time interval and depending on the interval I want to create 5 more variables . Sample data below obs, Start, End 1,2/1/2015, 1/1/2017 2,4/11/2010, 1/1/2011 3,1/4/2006, 5/3/2007 4,10/1/2007, 1/1/2008 5,6/1/2011, 1/1/2012 6,10/15/2004,12/1/2004 First, I want get interval between the start date and end dates (End-start). obs, Start , end, datediff
2006 Mar 17
1
nlme predict with se?
I am trying to make predictions with se's using a nlme (kew11.nlme below). I get an error indicating levels for a factor are not allowed. I have searched and read Rnews, MEMSS, MASS, R-Help, and other lists in Spanish where I found questions similar to mine but not solution. I do not really care about the method used. Any suggestions to obtain predictions with se's from an nlme
2017 Jun 04
0
New var
# read.table is NOT part of the data.table package #library(data.table) DFM <- read.table( text= 'obs start end 1 2/1/2015 1/1/2017 2 4/11/2010 1/1/2011 3 1/4/2006 5/3/2007 4 10/1/2007 1/1/2008 5 6/1/2011 1/1/2012 6 10/5/2004 12/1/2004 ',header = TRUE, stringsAsFactors = FALSE) # cleaner way to compute D DFM$start <- as.Date( DFM$start, format="%m/%d/%Y" ) DFM$end
2017 Jun 03
2
New var
Thank you all for the useful suggestion. I did some of my homework. library(data.table) DFM <- read.table(header=TRUE, text='obs start end 1 2/1/2015 1/1/2017 2 4/11/2010 1/1/2011 3 1/4/2006 5/3/2007 4 10/1/2007 1/1/2008 5 6/1/2011 1/1/2012 6 10/5/2004 12/1/2004',stringsAsFactors = FALSE) DFM DFM$D =as.numeric(difftime(as.Date(DFM$end,format="%m/%d/%Y"),
2011 Dec 01
0
pb with 4D dicom data and oro.dicom
Hello, I have the following problem. After a PACS upgrade in our hospital, the dynamic 3D images acquired after contrast media injection with a 3T Philips MRI are all saved in a single 4D file instead of a series of 2D images containing multiple 3D images over time. I used to convert this series of 2D dicom images in the format nfti with oro.dicom. However, I am no longer able to make oro.dicom
2017 Jun 04
0
New var
Since the number of choices is small (6), how about this? Starting with Jeff's initial DFM: DFM <- structure(list(obs = 1:6, start = structure(c(16467, 14710, 13152, 13787, 15126, 12696), class = "Date"), end = structure(c(17167, 14975, 13636, 13879, 15340, 12753), class = "Date"), D = c(700, 265, 484, 92, 214, 57), bin = structure(c(6L, 3L, 5L, 1L, 3L, 1L), .Label
2009 Jul 21
1
problem with heatmap.2 in package gplots generating non-finite breaks
I have written a wrapper for heatmap.2 called heatmap.w.row.and.col.clust which auto-generates breaks using breaks<-round((c(seq(from=(-20 * stddev), to=(20 * stddev))))/20, digits = 2) #(stddev in this case = 2.5) This has always worked well in the past but now I am getting an error that non-finite breaks are being generated. Drilling down, it seems that my wrapper is generating finite
2017 Jun 04
2
New var
Thank you Jeff and All, Within a given time period (say 700 days, from the start day), I am expecting measurements taken at each time interval;. In this case "0" means measurement taken, "1" not taken (stopped or opted out and " -1" don't consider that time period for that individual. This will be compared with the actual measurements taken (Observed-
2002 Jul 09
1
lines(predict(nls()) with NA's
Dear List, my exploration of R goes on... And I REALLY enjoy it ! (thanks to all guRus). Yesterday a colleague ask me for fitting some data presented as a data.frame, something like : >a x X158.7 X150.0 ... 1 -0.25 506 183.1 2 -0.75 633 210.7 3 -1.25 674 220.3 4 -1.50 NA 244.6 5 -1.75 742 261.2 6 -2.25 787 269.1 7 -2.50 NA 283.5 8
2012 Aug 07
0
predicting test dataset response from training dataset with randomForest
Hi I am new to R so I apologize if this is trivial. I am trying to predict the resistance or susceptibility of my sequences to a certain drug with a randomForest function from a file with amino acids on each of the positions in the protein. I ran the following: > library(randomForest) > > path <- "C:\\..." > path2 <- "..." > name <-
2000 Mar 01
0
isoMDS error message!!! (fwd)
uhps!! I forgot to tell you that I'm running R 0.99.0 for windows32 on windows 95 osr2. Thank you very much for the latest R-1.0.0 (even if I don't tried it yet)!!! Andrea Rossetti University of Perugia (Italy) Statistical Science Department. ---------- Forwarded message ---------- Date: Tue, 29 Feb 2000 17:03:51 +0100 (MET) From: Andrea Rossetti <rossetti at markov.stat.unipg.it>
2003 Jun 17
0
A 'pretty' function for POSIXt objects
I have written a set of functions for POSIXt objects that I would like to offer for consideration for use in base R. They augment and extend existing functions. Briefly, ## pretty.ct function(x,specs=pretty.ct.specs) ## round.ct function(x, tstr='1 min' ) ## axis.ct function(side,x,specs=NULL,...) ## parse.timeint function(dv) ## parse.tstr
2015 Sep 01
0
Re: Can't get cable connection working on virtual router machine
Can you please drop a rough diagram here? I think you are routing through this VM and must have shared the host interface. - ajey On Tue, Sep 1, 2015 at 7:39 AM, Phill Edwards <philledwards at gmail.com> wrote: > I'm pretty new to KVM and have a KVM CentOS 7.1 hypervisor running a few > VMs. I'm moving all my VMs from an ESXi host as I want to use KVM in > future. Most
2010 Jul 21
0
One problem with RMySQL and a query that returns an empty recordset
My last query related to this referred to a problem with not being able to store data. A suggestion was made to try to convert the data returned by fitdist into a data.frame before using rbind. That failed, but provided the key to solving the problem (which was to create a data.frame using the variables fitdist produces in the object it returns). I now have almost everything working as
2018 May 11
1
wbinfo -r 'username' displays inconsistent results across DC's
Hello,     Looking up a users group membership I'm showing different results on each DC. UID and GID mapping appears consistent but not all group membership is displayed. I've verified idmap.ldb is backup up and copied over to the other DC's. I do notice when taking a hot backup of idmap.ldb, the file size is dramatically smaller than the original. Using Microsoft RSAT to view
2008 Jan 08
1
using lapply()
useR's, I am trying to find a quick way to change some values in a list that are subject to a condition to be NA. Consider the 3x1 matrix: delta <- matrix(c(2.5,2.5,1), nrow = 1) And consider the list named v that has 3 elements > v v[[1]] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 4.25 3.25 2.25 1.25 0.25 0.75 1.75 2.75 3.75 4.25