Displaying 20 results from an estimated 20000 matches similar to: "function to calculate networkdays?"
2008 May 28
4
Help on Calculating day differences
Hello R Freaks,
I calculate the difference in days between two events with the following
litte R expresseion:
T1a <- strptime(T1,"%m/%d/%y %H:%M:%S");
T2a <- strptime(T2,"%m/%d/%y %H:%M:%S");
T1b <- as.Date(T1a);
T2b <- as.Date(T2a);
days <- T2b-T1b;
time <- T2a - T1a;
In the project I would like to calculate only working day.
I the a possibility to count
2007 Dec 01
2
R function for percentrank
Hi,
Does anyone know if R has a built-in function that is equvalent to Excel's
percentrank, i.e., returns the rank of a value in a data set as a percentage
of the data set?
Thanks,
--
Tom
[[alternative HTML version deleted]]
2008 Mar 09
2
format numbers into percentages
Hi,
I am currently using the following to formate numbers into percentages:
x=0.00112
paste(round(x*100,2),"%",sep="")
I am wondering if there is a built in R function that does the same. Does
anyone know?
Thanks,
--
Tom
[[alternative HTML version deleted]]
2007 Aug 06
1
Create vectors form matrices
? stato filtrato un testo allegato il cui set di caratteri non era
indicato...
Nome: non disponibile
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070806/342a57c8/attachment.pl
2007 Oct 22
3
median value dataframe coming from multiple dataframes
Hi all,
I am not a skillful R programmer and has I am handling with large dataframes (about 30000 x 300) I am in need of an efficient function.
I have 4 dataframes with the same dimension. I need to generate other dataframe with the some dimension than the others where in each position it has the median value of the 4 values in the same position coming from the 4 dataframes.
Grateful by your
2008 Nov 03
1
How to calculate modulus of complex number
suppose I have following complex number :
a = -0.0475983+0.5364486i
This number I got as an eigen value of a matrix.
Now I would like to calculate the Modulus of this complex number. Is there
any function for doing that?
Regards,
--
View this message in context: http://www.nabble.com/How-to-calculate-modulus-of-complex-number-tp20308154p20308154.html
Sent from the R help mailing list archive
2008 Aug 29
1
how to calculate the mode of a continuous variable
Is there any R funtion that allow the estimation of mode in a continuous
variable?
Thank you
--
View this message in context: http://www.nabble.com/how-to-calculate-the-mode-of-a-continuous-variable-tp19214243p19214243.html
Sent from the R help mailing list archive at Nabble.com.
2010 May 26
2
How to calculate mean of means
I have 3 columns of numbers, and i want to find the mean of each
separately, and then the mean of all of the means.
ive tried:
av3daysB<- mean(mean(avr1), mean(avr2), mean(avr3))
av3daysB
but it only gives me the mean of the first column (avr1)
Any suggestions?
Thanks,
Emilija
2008 Jan 24
2
plot help
Hi,
Suppose I already have two plots on the same screen, and I want to draw
lines in each of them. Is that possible in R? It seems that once you have
two plots on the screen, you can only draw lines in the the last plot, never
the 1st. Here is what I mean:
#some data
y1=rnorm(1:3)
y2=rnorm(1:3)
#draw two plots on the same screen
par(mfrow=c(2,1),oma = c(6, 0, 5, 0))
par(mar=c(0, 5.1, 0, 5.1))
2007 Nov 07
2
Trouble in creating a list
I want to create a list based on the information from a data.frame,
Model. So I tried the following:
MyList <- list(colnames(Model)[2] = levels(Model$(colnames(Model)[2])))
but it failed with an error:
Error: unexpected '=' in "list(colnames(Model)[2] ="
I have the following problems with this command line:
(1) I wanted to use colnames(Model)[2] as a tag for the list:
2010 Oct 28
1
Calculate percent occurrence of different values
Hello,
I am relatively new to R. I am trying to do the following
and cannot figure out a relatively fast, clean method of doing it in R.
Here is a simple sample of what my data set looks like:
ID Try Num Dir
1 1 1 1
1 1 2 4
1 1 3 2
1 2 1 4
1 2 2 3
2 1 1 3
2 1 2 1
2 2 1
2007 Jun 25
3
fractional calculations
Hi All,
is there a function in R that allows me to work with fractions without
transforming them to floats (or whatever) in between?
Something that would calculate something like:
(1/2 + 1/8) * 1/2 = 5/16
without ever transforming to 0.5 and 0.125?
Best,
Federico
--
Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St Mary's Campus
Norfolk Place,
2006 May 02
2
Time series plot
I have some time series data like
01/02/1990 0.531 0.479
01/03/1990 0.510 0.522
01/06/1990 0.602 0.604
there is no weekends and holidays.
how do I graph them in a single plot that the x-axis is the dates and
the y-axis is the time series?
Thank you
Regards,
Jincai Jiang
(Office) 212-761-3984
--------------------------------------------------------
This is not an offer (or solicitation
2007 Oct 22
1
Newbie help: Data in an arma fit
I'd like to fit an ARMA(1,1) model to some data (Federal Reserve Bank
interest rates) that looks like:
...
30JUN2006, 5.05
03JUL2006, 5.25
04JUL2006, N <---- here!
05JUL2006, 5.25
...
One problem is that holidays have that "N" for their data. As a test, I
tried fitting ARMA(1,1) with and without the holidays deleted. In other
words, I fit the above data
2008 Sep 11
3
Calculate mean/var by ID
Hello,
I have a data set that looks like this.
ID value
111 5
111 6
111 2
178 7
178 3
138 3
138 8
138 7
138 6
.
.
.
I'd like to calculate the mean and var for each object identified by the ID.
I can in theory just loop through the whole thing..., but is there a easier
way/command which let me calculate the mean/var by ID?
Thanks,
Julia
--
View this
2009 Aug 06
2
opration / dates in R
Hi,
how can i use operation + , - , / with veriable format DATES?
for example i have two variable a <- 18/08/2008 and b <- 18/09/2010 and i want to calculate a-b ??
thank you?
[[alternative HTML version deleted]]
2009 Jan 21
2
Replacing dates with consecutive observations
I am working with a list of dates and I would like to replace each date with
the one that comes after, ie. 1/1/07 will become 1/5/07, 1/5/07 will become
1/7/07, etc. The number of days between my dates always varies, so I can't
just increase each one by 5 days or so. Does anyone know of a way I can do
this in R?
thank you
[[alternative HTML version deleted]]
2008 Sep 11
5
How to obtain a sequence of dates consisting of only weekdays
Dear R-users,
How do I obtain a sequence of dates consisting of only weekdays without the weekends in R?
In S, I can do the following:
timeSeq(from="12/17/2007", to="8/25/2008", by="weekdays")
I tried using looking at timeSequence (fSeries package) and seq.Date (base package) but I do not know if I can specify "weekdays" rather than "day".
2007 Nov 07
2
dates
Dear R users,
I am just starting with R and am currently needing a lot of help! Sorry if
I disturb you and thank you for your answers!!!
Here goes my question: How do I make R reconize my date columns as dates?
When I "summary" my table, the levels of my date column are completely out
of order.
Thank you again for this tip,
Marcia
--
View this message in context:
2009 Feb 03
1
plot multiple time series
Hi,
I have a dataframe containing a date object in the first column and numeric
data in two other columns, for a total of three columns. I would like to
plot the 2 numeric data columns against the dates in one window. How do I do
this? It is easy to do if only one data series is to be plotted against a
set of dates, but two or more datasets seems to be harder.
Note: I have daily data where