Displaying 20 results from an estimated 100 matches similar to: "Get Specific Records from Another DataFrame"
2012 Nov 02
2
Date format conversion from "2012-09-20" to "2012:09:20"
Hi R,
How to get the range of values form startDate to lastDate as given below?.
#*****************************************************************
# Load historical data
#******************************************************************
library('quantmod')
endDate =Sys.Date()
startDate = as.Date(endDate-30, order="ymd")
dataspy = getSymbols("SPY", from = startDate,
2001 Feb 13
0
handle date variables
Thanks! This is helpful.
Three more questions.
1. How to convert a string into a numeric value. For
example, convert '20010122' to 20010122.
2. How to convert a string into a date value. For
example, convert 20010122
to 2001 Jan 22, and get its day of the week, i.e.
Monday?
3. How to handle date variables in a loop? How to make
the following codes work? And how users should pass
the
2011 Feb 09
1
Iterate over a list of input files?
Hi,
I've got the following code which seems to work fine for a single
file if I specify the file name explicitly in the code. What I need to
do is run it on all the files in the directory tested and augment the
data frame I'm building to have more results columns.How can I do
that?
Here's the code:
library(chron) # .Holidays / is.holiday / is.weekend
TStoDate = function
2011 Mar 13
2
Problem implementing 'waldtest' when using 'mlogit' package
Hi all,
I have been working through the examples in one of the vignettes associated with the 'mlogit' package, 'Kenneth Train's exercises using the mlogit package for R.' In spite of using the code unchanged, as well as the data used in the examples, I have been unable to run a Wald test to test two models.
Specifically, I have run the following command, where mc and mi2 are
2008 Oct 15
1
Forecasting using ARIMAX
Dear R-helpers,
I would appreicate if someone can help me on the transfer parameter in ARIMAX and also see what I am doing is correct.
I am using ARIMAX with 2 Exogeneous Variables and 10 years data are as follows:
DepVar Period, depVar, IndepVar1 Period, indepVar1, IndepVar2 Period, indepVar2
Jan 1998,708,Jan 1998,495,Jan 1998,245.490
Feb 1998,670,Feb 1998,421.25,Feb 1998,288.170
Mar
2011 Dec 07
1
MIXED MODEL WITH REPEATED MEASURES
I am trying to specify a mixed model for my research, but I can't quite get
it to work. I've spent several weeks looking thru various online sources to
no avail. I can't find an example of someone trying to do precisely what I'm
trying to do. I'm hoping some smart member of this mailing list may be able
to help.
First off, full disclosure: (1) I'm an engineer by trade, so
2005 Jan 17
2
Omitting constant in ols() from Design
Hi!
I need to run ols regressions with Huber-White sandwich estimators and
the correponding standard errors, without an intercept. What I'm trying
to do is create an ols object and then use the robcov() function, on the
order of:
f <- ols(depvar ~ ind1 + ind2, x=TRUE)
robcov(f)
However, when I go
f <- ols(depvar ~ ind1 + ind2 -1, x=TRUE)
I get the following error:
Error in
2010 Jan 26
6
Help
> Dear All
>
> I have data as follows.
>
> D T M L
> 0.20 1 03 141
> 0.32 1 07 62
> 0.50 1 05 49
> 0.80 1 04 46
> 0.20 2 14 130
> 0.32 2 17 52
> 0.50 2 13 41
> 0.80 2 14 36
> 0.20 3 24 120
> 0.32
2009 Sep 22
4
Evaluating expresssions as parameter values
I need to play games with an expression similar to the following one:
print(xyplot(DepVar ~ Group|Covar, groups=Othergroup,
data=mydf, pch = 18 ,main="Testcase",auto.key = TRUE))
The problem is that the formula argument (the first argument)
an the groups argument are passed over from another program as strings.
The formula argument does not pose problems,
I can do
2011 Oct 18
1
problem in exceuting PLS
Hi
I'm performing a PLS
This is my data present in a file
Year Y X2 X3 X4 X5 X6
1960 27.8 397.5 42.2 50.7 78.3 65.8
1960 29.9 413.3 38.1 52 79.2 66.9
1961 29.8 439.2 40.3 54 79.2 67.8
1961 30.8 459.7 39.5 55.3 79.2 69.6
1962 31.2 492.9 37.3 54.7 77.4 68.7
My R-code
Data <- read.csv("C:/TestData.csv")
variable=names(Data)[4:8]
dataset=NULL
dataset$X=NULL
len=length(variable)
2012 Feb 17
2
Error message in gamm. Problem with temporal correlation structure
HELLO ALL,
I AM GETTING AN ERROR MESSAGE WHEN TRYING TO RUN A GAMM MODEL LIKE THE ONE BELOW.
I AM USING R VERSION 2.14.1 (2011-12-22) AND MGCV 1.7-12.
M1 <-gamm(DepVar ~ Treatment + s(Year, by =Treatment), random=list(Block=~1), na.action=na.omit, data = mydata, correlation = corARMA(form =~ Year|Treatment, p = 1, q = 0))
THIS IS THE ERROR MESSAGE
Error in `*tmp*`[[k]] : attempt to
2012 Aug 01
1
optim() for ordered logit model with parallel regression assumption
Dear R listers,
I am learning the MLE utility optim() in R to program ordered logit
models just as an exercise. See below I have three independent
variables, x1, x2, and x3. Y is coded as ordinal from 1 to 4. Y is not
yet a factor variable here. The ordered logit model satisfies the
parallel regression assumption. The following codes can run through,
but results were totally different from what I
2016 Jun 26
2
Need IP on failed logins in logfile
Hi Jeremy, list,
On 06/26/2016 12:11 AM, Jeremy Allison wrote:
> We should probably have something in the server that logs
> this as an official "event". Can someone log a RFE bug in
> the bugzilla so we don't forget this request ?
I created this bug:
https://bugzilla.samba.org/show_bug.cgi?id=11998
I hope it is (approximately) what you mean. :-)
Best regards,
MJ
2017 Sep 19
1
How to track attempted breakins, authentication failure logging
On Tue, 2017-09-19 at 17:02 +0200, L.P.H. van Belle via samba wrote:
> Hai Mark,
>
> I see the bugreport for this is still untouched.
> https://bugzilla.samba.org/show_bug.cgi?id=11998
I've closed that bug now.
Extensive work has been done to add this feature to Samba 4.7, due out
this week:
https://wiki.samba.org/index.php/Setting_up_Audit_Logging
Two new debug classes,
2005 Jun 30
1
Dispersion parameter in Neg Bin GLM
Hi,
Can someone tell me if it is possible to set the dispersion parameter constant when fitting a negative binomial glm in R? I've looked at the documentation and can't find the appropriate argument to pass.
In STATA I can type: nbreg depvar [indepvar...], offset(offset) dispersion(constant).
Thank you
[[alternative HTML version deleted]]
2010 Sep 12
1
R-equivalent Stata command: poisson or quasipoisson?
Hello R-help,
According to a research article that covers the topic I'm analyzing,
in Stata, a Poisson pseudo-maximum-likelihood (PPML) estimation can be
obtained with the command
poisson depvar_ij ln(indepvar1_ij) ln(indepvar2_ij) ...
ln(indepvarN_ij), robust
I looked up Stata help for the command, to understand syntax and such:
www.stata.com/help.cgi?poisson
Which simply says
2006 Jan 27
1
"Conditional" match?
I have two datasets, big and small.
s_date<-c(?2005-12-02?, ?2005-12-01?,
?2004-11-02?,?2002-10-05?,?2000-12-15?)
s_id<-c(?a?,?a?,?b?,?c?,?d?)
b_date<- c(?2005-12-31?, ?2005-12-31?,
?2004-12-31?,?2002-10-05?,?2001-10-31?,?1999-12-31?)
b_id<-c(?a?,?b?,?c?,?d?,?e?,?c?)
small<-data.frame(date_=as.Date(s_date),id=s_id)
big<-data.frame(date_=as.Date(b_date),id=b_id)
For each row
2008 Mar 24
6
vlookup in R
Hi,
Is there are function similar to excel vlookup in R. Please let me know.
Thanks,
Sachin
____________________________________________________________________________________
[[alternative HTML version deleted]]
2011 Jun 03
1
VLOOKUP in R - tried everything.
I am attempting to emulate the VLOOKUP function from Excel in R.
I want to compare one column (coll.minus.release) with another
(release.days) to get the number of parasitoid released at that time
(TotalParasitoids).
for example:
coll.minus.release release.days ParasitoidTotal
-12 -266 1700
8 -259 1000
8
2016 Jun 20
1
rsync script for snapshot backups
The scripts I use analyze the rsync log after it completes and then
sftp's a summary to the root of the just completed rsync.
If no summary is found or the summary is that it failed, the folder
rotation for that set is skipped and that folder is re-used on the
subsequent rsync.
The key here is that the folder rotation script runs separately from the
rsync script(s).
For each entity I want