Displaying 20 results from an estimated 2000 matches similar to: "Dataframe manipulation"
2010 Mar 17
3
Adding minutes to 24 hour time
Hi,
Does anyone know how to add minutes (up to 100 min) to a 24 hour time, to create a new 24 hour time? I can't seem to find any documentation or examples explaining how to do this. The variables of interest are 'ARRIVE','WAIT', and 'DEPART' in the attached partial dataframe. I want 'DEPART' to be the "sum" of 'ARRIVE' and 'WAIT' in
2010 Mar 19
2
Dataframe calculations
Hi everyone,
My question will probably seem simple to most of you, but I
have spent many hours trying to solve it. I need to perform
a series of sequential calculations on my dataframe that move
across rows and down columns, and then repeat themselves at
each unique 'MM' by 'DD' grouping. Specifically, I want to add
'DEPART' time (24 hr time) to 'TRAVEL'(minutes)
2010 Mar 15
1
Assigning a sequence to a subsetted data frame variable
Hey folks,
I have a difficult (at least for me) problem that I was hoping
one of you may know how to solve. I want to assign a sequence
to subsets of a variable in a data frame based on date.
The variable is 'SITE1' and the date is a unique day (DD) and
month (MM) combination. The sequence contains site numbers 101:104,
and each day-month combination takes four site numbers from that
2008 Nov 19
2
Exclude holidays in a subset of dates?
Hi All,
I am iterating through dated materials, with variable start and end dates,
and would like to skip procedures everytime I encounter a weekend or
holiday. To do this, I thought the easiest way would be to create a
TRUE/FALSE vector corresponding to each day where it is TRUE if a workday,
and FALSE if a weekend or holiday.
So far I have been able to do this for weekdays:
startDate <-
2010 Mar 12
6
Randomly sampling subsets of dataframe variable
Fellow R users,
I am stumped on what would seem to be something fairly simple.
I have a dataframe that has a variable named 'WEEK' that takes
the numbers 1:26 (26 week time-period) with each number repeated
five times consecutively (once for each weekday, Monday through
Friday). Ex. 111112222233333.....2626262626. I would like to
randomly extract two weekdays per five day week for
2010 Mar 23
3
Converting date format
R community:
Hello, I would to like to convert a character date variable from %m/%d/%Y to %m/%d/%y. Any advice would be greatly appreciated. I have tried functions for changing the formatting and removing the unnecessary digits without success.
Mike
2010 Mar 25
4
Creating dataframe of all possible variable combinations
Hello,
I need to create a dataframe containing all possible combinations of three variables: SITE (101,102,103,104), WDAY (MON,TUE,WED,THR,FRI), and TOD (MORN, AFTN). There should be a total of 40 unique combinations in my dataframe. I used expand.grid() successfully(?) to create my dataframe, but then when I went to order it by SITE, the resultant dataframe only contained four rows, one for each
2017 May 17
3
Best practices for copying lots of files machine-to-machine
Vanhorn, Mike wrote:
> On 5/17/17, 12:03 PM, "CentOS on behalf of ken" <centos-bounces at centos.org
> on behalf of gebser at mousecar.com> wrote:
>
>>An entire filesystem (~180g) needs to be copied from one local linux
>>machine to another. Since both systems are on the same local subnet,
>>there's no need for encryption.
>>
>>I've
2011 Feb 03
3
R Data Manipulation - Transposing Data by a Given Column, Like User_ID
Hello,
I'd like to transpose data to create an analysis-friendly dataframe. See
below for an example, I was unable to use t(x) and I couldn't find a
function with options like PROC TRANSPOSE in SAS.
The ideal solution handles variable quantities of SITE - but beggars can't
be choosers. :-)
Thank you in advance,
Mike
## INPUT DATA
USER_ID<-c(1,1,1,2,2,2,3,3,4)
SITE
2010 Mar 16
2
Conditional variable assignment
Hi everyone,
Once again I am stuck with a problem I can't seem to figure out. I suppose this learning curve levels off eventually, lol. I am learning on my own with absolutely no background in programming, so if I seem to request help a lot it's not because I am seeking others to do the work for me. I need to assign one of two arrival times to the 'ARRIVE' variable of my
2011 Nov 01
1
condition has length > 1 for LL denominator
I have a dataset called "results" that looks like this:
arrive depart intercept
1 1 1
1 2 1
1 3 1
1 2 2
1 3 2
1 3 3
2 2 2
2 3 2
3 3 3
where arrive is the period of arrival, depart is the period of departure,
and intercept
2020 Feb 11
3
Failover DC did not work when Main DC failed
On 03/02/2020 18:49, Kris Lou via samba wrote:
>
> From windows:
> echo %logonserver%
\\DC3
> nltest /dsgetdc:<domain>
DC:\\DC3
Address: \\192.168.0.218
Dom Guid: bla bla bla
...
The command completed successfully.
> From a *nix domain member (i.e. client, not DC):
> wbinfo --getdcname=<domain>
> winbind --ping-dc
wbinfo --getdcname=MYDOMAIN
DC3
wbinfo
2011 Mar 22
2
Infinite loop
R experts,
Hello, I am trying to sample a vector 1:40 without replacement such that no element in the new vector
is within 7 units of either of its immediate neighbors. This is part of a larger program I am working
on. The following code works well about 65 % of the time (14/40). The problem I encounter happens when
the last element remaining to be sampled from the vector STRATA is within 7
2011 Mar 09
2
Complex sampling?
R users,
I am trying to generate a randomized weekday survey schedule that ensures even coverage of weekdays in
the sample, where the distribution of variable DOW is random with respect to WEEK. To accomplish this I need
to randomly sample without replacement two weekdays per week for each of 27 weeks (only 5 are shown). However,
I need to sample from a sequence (3:7) that needs to be
2017 Nov 28
1
Failed attempts
Lamar Owen wrote:
> On 11/28/2017 12:04 PM, Valeri Galtsev wrote:
>> Thanks, Lamar! that is very instructive.
> You're welcome.
>
>> I was always unimpressed with
>> persistence of attempts to make more secure (less pickable) cylinder
>> cased
>> locks (precision, multi-level, pins at a weird locations/angles).
>
> The best way to make an
2010 Apr 19
1
Week number calculation
R community,
How could I extract the week number from a date vector
(in class Date) such that week numbering (week 1...2...)
begins (May 01) and ends (October 31) on the same specific
dates each year?
Thank you,
Mike
2011 Jul 25
1
error in survival analysis
This is a simple R program that I have been trying to run. I keep running into the "singular matrix" error. I end up with no sensible results. Can anyone suggest any changes or a way around this?
I am a total rookie when working with R.
Thanks,
Rasika
> library(survival)
Loading required package: splines
> args(coxph)
function (formula, data, weights, subset, na.action, init,
2006 Mar 29
9
Ftp upload shaping 2 ISP\'s problems....
I would lilke to shape upload ftp bandwidth in a dual ISP setup
[shorewall show connections]
tcp 6 431215 ESTABLISHED src=192.168.2.89 dst=83.xxx.xxx.23 sport=1487 dport=21 src=83.xxx.xxx.23 dst=10.0.11.2 sport=21 dport=1487 [ASSURED] use=2 mark=1
[tcdevices]
#INTERFACE IN-BANDWITH OUT-BANDWIDTH
$EIF 970kbit 245kbit
$LIF 970kbit 245kbit
2010 Jul 20
1
ifelse() and missing values in test conditions
R experts,
I have been unable to get the following ifelse statement to work as desired when applied
to my data frame.
Example:
DF$ANYEF <- with(DF,ifelse(PSOUGHT1=='ANY'|PSOUGHT2=='ANY'|PSOUGHT3=='ANY',PEFF,0))
##### this statement will be replicated 16 times for 16 unique _EF variables ###
Basically, I want each ANYEF for each row to equal the corresponding row
2009 Oct 30
1
[LLVMdev] LLVM Users in the Twin Cities?
Kenneth had a good idea trying to organize local LLVM user chapters.
Anyone else in the Twin Cities hacking on LLVM? I'd love to get together
sometime.
-Dave