Displaying 20 results from an estimated 4000 matches similar to: "Google style"
2009 Aug 28
2
new data.frame summed by date
Hi,
I wonder if someone can suggest how to create a new data.frame Y
from X where X$PL_Pos is summed by each unique X$MyDate. Y should end
up with two (or more) columns Y$MyDate and Y$PL_Sum with its value
being the cumsum of all the values in X for that date. - a 'daily
cumsum'.
Thanks,
Mark
TStoDate = function (TSDate) {
X = strptime(TSDate + 19e6L, "%Y%m%d")
2016 Jan 20
2
Incoming webrtc call succeeds in Firefox but fails in Google Chrome
I am having trouble getting Google Chrome to accept a WebRTC call coming from Asterisk, even though Firefox can (now) accept the same call without issue.
My setup is as follows:
Server:
CentOS 7 x86_64 (Elastix 4 RC) with IP: 10.1.0.4 192.168.5.146
asterisk-11.21.0 patched to work around https://issues.asterisk.org/jira/browse/ASTERISK-25659
openssl-1.0.1e-51.el7_2.2.x86_64
[root at elx4 ~]#
2011 Jul 14
2
cbind in aggregate formula - based on an existing object (vector)
Hello!
I am aggregating using a formula in aggregate - of the type:
aggregate(cbind(var1,var2,var3)~factor1+factor2,sum,data=mydata)
However, I actually have an object (vector of my variables to be aggregated):
myvars<-c("var1","var2","var3")
I'd like my aggregate formula (its "cbind" part) to be able to use my
"myvars" object. Is it
2009 Oct 06
2
Extracting year from a date object
Hi all,
this one left me a bit puzzled, as I don't seem to find a function to
perform this easily. I must have overlooked the obvious, so sorry in
advance.
I have a list of dates in numerical format (i.e. 34576), defined as
the number of days that passed since january 1st 1900. So I apply the
function :
> MyDate <-as.Date(34576,origin="1900-01-01")
> MyDate
[1]
2011 Apr 18
1
using "aggregate" when variable names contain spaces
Hello!
my data set has many variables. Unfortuantely, many of those variables
contain spaces in their names.
I need advice on: how to refer to variable names in the formula for
"aggregate". See example below:
### Generating example data set:
mydate = rep(seq(as.Date("2008-12-01"), length = 3, by = "month"),4)
value1=c(1,10,100,2,20,200,3,30,300,4,40,400)
2006 May 21
1
POSIX, time zone and Windows
Dear Listers,
Apologize to pile up on the 'tz' issue in POSIX objects. I have a
'simple' thing on which I must make up my mind but cannot do it from the
existing R-help threads. I am currently working on dog telemetry in
China, and download time information from GPS collars. I would like to
set up the corresponding POSIXxx variables in R to a given time zone. Eg
Pekin
2011 Mar 01
2
Does POSIXlt extract date components properly?
I would like to use POSIX classes to store dates and extract components of
dates. Following the example in Spector ("Data Manipulation in R"), I
create a date
> mydate = as. POSIXlt('2005-4-19 7:01:00')
I then successfully extract the day with the command
> mydate$day
[1] 19
But when I try to extract the month
> mydate$mon
[1] 3
it returns the wrong month. And
2011 Apr 04
2
merging 2 frames while keeping all the entries from the "reference" frame
Hello!
I have my data frame "mydata" (below) and data frame "reference" -
that contains all the dates I would like to be present in the final
data frame.
I am trying to merge them so that the the result data frame contains
all 8 dates in both subgroups (i.e., Group1 should have 8 rows and
Group2 too). But when I merge it it's not coming out this way. Any
hint would be
2013 Apr 02
2
Create a vector without using an external 'if statement'
Dear R-users,
suppose I have three dataframes like these
df1:
mydate min_temp
31032013 12
01042013 8
02042013 -999
df2:
mydate min_temp
31032013 10
01042013 11
02042013 14
df3:
mydate min_temp
31032013 4
01042013 3
02042013 5
where -999 means that the temperature data is not available (at the moment I cannot change it to NA because I am not the db administrator);
suppose also that oggi is
2020 Mar 10
2
Fwd: Windows upssched does not work
Hi,
I have problem with upssched on windows. Upssched is not executed. I
have 2 scripts, 1 for notification in upsmon and second for scheduling
in upssched. Monitoring is working fine, script write to log. I'm
using binary windows installer 2.6.5-6 from NUT.
Here are my configs:
--- nut.conf
MODE=netclient
--- upsmon.conf
MONITOR ups_1000 at 192.168.3.95 1 <user> <password> slave
2011 Aug 24
2
data manipulation and summaries with few million rows
I have a data set with about 6 million rows and 50 columns. It is a
mixture of dates, factors, and numerics.
What I am trying to accomplish can be seen with the following
simplified data, which is given as dput output below.
> head(myData)
mydate gender mygroup id
1 2012-03-25 F A 1
2 2005-05-23 F B 2
3 2005-09-08 F B 2
4 2005-12-07 F B 2
2007 Jun 13
5
Confusion with sapply
Hi,
I have some confusion in applying a function over a column.
Here's my function. I just need to shift non-March month-ends to March
month-ends. Initially I tried seq.dates, but one cannot give a negative
increment (decrement) here.
return(as.Date(seq.dates(format(xdate,"%m/%d/%Y"),by="months",len=4)[4])
)
Hence this simple function:
> mydate <-
2011 May 19
1
Creating a "shifted" month (one that starts not on the first of each month but on another date)
Hello!
I have a data frame with dates. I need to create a new "month" that
starts on the 20th of each month - because I'll need to aggregate my
data later by that "shifted" month.
I wrote the code below and it works. However, I was wondering if there
is some ready-made function in some package - that makes it
easier/more elegant?
Thanks a lot!
# Example data:
2011 Oct 27
1
plotting large time series
hello,
I got a problem with plotting large time series, since I want to store
the results in a .PDF file (I want to store several pages of plots). The
PDF files get too large to be handled (> 10MB, one was even 200MB big).
So I wonder, if there would be a possibilty to either
- reduce the file size of the PDF
- change the way the plot is generated to reduce the plot size?
I use:
2008 Jun 17
4
Formating Date Field
First.jsp
------------------
<jsp:usebean id="db" class="db.dbClass" scope=session/>
<html>
<body>
<form action="MyAction.jsp" method="post">
<% ResultSet rs=db.executeQuery("select no,name from mytable");
while(rs.next())
{%>
<input type=checkbox value=<%=rs.getString(1)%> onclick=callJs(<
2008 Sep 17
3
Dates in C api
r-devel,
I've been trying to write a C plugin for R, and I'm struggling to
understand how dates are represented.
I can create a date in R:
> mydate<-as.Date(1, origin="1900-01-01") mydate
[1] "1900-01-02"
When I pass my date to a plugin, though, it's type is that of a real.
There doesn't seem to be a date type in Rinternals.h, is there a way to
2011 Sep 01
2
Help with creating date as POSIXct
Dear list,
I want to create a POSIX time vector as follows:
day <- as.character("110809")
time.t <- 1:3600
t.min <- time.t %/% 60
t.sec <- time.t-t.min*60
DATE <- as.POSIXct(strptime(paste(day,t.min,t.sec),"%y%m%d %M%S"))
Tail(DATE)
The problem is that the last element (3600) returns a NA and I don't
understand why. 600, 1200, 2400
2005 Apr 25
3
How to transform the date format as "20050425"
Dear R user,
if the dates are in format as "20050425" i.e., Apr. 25 2004"
can you suggest an easy way to transfom it to standard form
as "2005-04-25" or "2004Apr25" or "2005/04/25" or any other
format which is R recognizable?
if there is no easy way to do that, can you let me know what
is the function in R performing similiar function as the
2007 Aug 20
2
library(fCalendar) timeDate("12.03.2005",format="%d.%m.%Y")
Dear R users,
I have problem with the library fCalendar.
I am not using the US standard format notations. It seems like it is not
possible to have different format than the US standards.
Anyone how knows a way to go around this problem?
Here is the code I enter:
myDate = "12.03.2005"
timeDate(myDate, format = "%d.%m.%Y")
And I get following error message:
Error in if
2018 Feb 25
3
include
Thank you Jim,
I read the data as you suggested but I could not find K1 in col1.
rbind(preval,mydat) Col1 Col2 col3
1 <NA> <NA> <NA>
2 X1 <NA> <NA>
3 Y1 <NA> <NA>
4 K2 <NA> <NA>
5 W1 <NA> <NA>
6 Z1 K1 K2
7 Z2 <NA> <NA>
8 Z3 X1 <NA>
9 Z4 Y1 W1
On Sat, Feb 24, 2018 at 6:18 PM, Jim