Hello!
I am trying to create a formula object using as.formula. But it's not working:
examplephraze-for.my.example
myformula-as.formula(paste(examplephraze,~group, sum, data=mydata,sep=))
What's the problem?
Thanks a lot!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
That's great thanks a lot, David!
On Mon, Apr 18, 2011 at 3:47 PM, David Winsemius dwinsem...@comcast.net wrote:
On Apr 18, 2011, at 3:40 PM, Dimitri Liakhovitski wrote:
That's helpful, thanks! Unfortunately, I cannot refer to all of my
variables to the left of tilda one by one - I have
Makes sense, Marc - thanks a lot!
On Mon, Apr 18, 2011 at 3:54 PM, Marc Schwartz marc_schwa...@me.com wrote:
On Apr 18, 2011, at 2:44 PM, Dimitri Liakhovitski wrote:
Hello!
I am trying to create a formula object using as.formula. But it's not
working:
examplephraze-for.my.example
)
myref-data.frame(a=a, b=b)
(myref)
# my data:
c-c(rep(ba ba,3),rep(ca ca,3),rep(da da,3),rep(lake lake, a,3),
rep(lake lake, b,3),rep(lake of,3),rep(lama ca, a,3),rep(lama
ca ,b,3),rep(ma ma,3))
temp-data.frame(c=c)
(temp)
### Matching:
temp$b-myref[temp$c,b]
(temp)
--
Dimitri Liakhovitski
),rep(lama
ca ,b,3),rep(ma ma,3)), stringsAsFactors=FALSE)
newdata - merge(myref, temp, by.x=a, by.y=c, all.x=FALSE, all.y=TRUE)
Sarah
On Tue, Apr 12, 2011 at 11:17 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Hello!
Below is my exmample. myref is my reference data frame
) to have the same
number of entries as table(small.frame$myfactor) but with 5 zeros in
it:
A B C D E F G J I J
1 0 1 0 1 0 1 0 1 0
Thank you very much for your suggestions!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing
On Thu, Apr 7, 2011 at 11:47 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Hello!
I have larger and a smaller data frame with 1 factor in each - it's
the same factor:
large.frame-data.frame(myfactor=LETTERS[1:10])
small.frame-data.frame(myfactor=LETTERS[c(9,7,5,3,1)])
levels
, Henrique Dallazuanna www...@gmail.com
wrote:
Try this:
library(zoo)
wk - as.numeric(format(myframe$dates, '%W'))
is.na(wk) - wk == 0
aggregate(value ~ group + na.locf(wk), myframe, FUN = sum)
On Wed, Mar 30, 2011 at 4:35 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Henrique
Sorry - never mind. It turns out I did not load the zoo package. That
was the reason.
On Wed, Apr 6, 2011 at 12:14 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Guys, sorry to bother you again:
I am running everything as before (see code below - before the line
with a lot
new.data-rbind(new.data,temp)
}
Dimitri
On Mon, Apr 4, 2011 at 3:07 PM, Henrique Dallazuanna www...@gmail.com wrote:
Try this:
merge(mydata, cbind(reference, group = rep(unique(mydata$group), each
= nrow(reference))), all = TRUE)
On Mon, Apr 4, 2011 at 2:24 PM, Dimitri Liakhovitski
(new.data$group,new.data$mydate),]
(new.data)
# my new.data contains only 7 rows in Group 1 and 4 rows in Group 2
--
Dimitri Liakhovitski
Ninah Consulting
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
Group2 2.880393978
On Mon, Apr 4, 2011 at 1:09 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
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
, as in
sum.by.week - function(ff) {
by.day - split(ff$value,get.week.flag(ff$dates))
lapply(by.day,sum)
}
by.grp - split(myframe,myframe$group)
lapply(by.grp,sum.by.week)
Martyn
-Original Message-
From: Dimitri Liakhovitski [mailto:dimitri.liakhovit...@gmail.com]
Sent: 30
Philipp, you are a savior!
That's exactly what has been happening - and it was driving me crazy.
quote= fixed things.
Thank you very much!
Dimitri
On Wed, Mar 30, 2011 at 5:01 AM, Philipp Pagel p.pa...@wzw.tum.de wrote:
On Tue, Mar 29, 2011 at 06:58:59PM -0400, Dimitri Liakhovitski wrote:
I
(removed.group1,removed.group2);length(to.remove)
to.remove-to.remove[order(to.remove)]
myframe-myframe[-to.remove,]
(myframe)
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo
the same - wrong - result with optimize:
opt2 - optimize(f=my.function,interval=c(0,0.1))
test3-my.function(opt2$minimum)
What am I doing wrong? Thanks a lot for your recomendations!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Dimitri Liakhovitski
Sent: 30 March 2011 15:23
To: r-help
Subject: [R] summing values by week - based on daily dates - but with
somedates missing
Dear everybody,
I have the following
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Dimitri Liakhovitski
Sent: Wednesday, March 30, 2011 12:45 PM
To: r-help
Subject: [R] optim and optimize are not finding the right parameter
Dear all,
I have a function that predicts
~ group + format(dates, %Y.%W), myframe, FUN = sum)
On Wed, Mar 30, 2011 at 11:23 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Dear everybody,
I have the following challenge. I have a data set with 2 subgroups,
dates (days), and corresponding values (see example code below
(format(myframe$dates, '%W'))
is.na(wk) - wk == 0
aggregate(value ~ group + na.locf(wk), myframe, FUN = sum)
On Wed, Mar 30, 2011 at 4:35 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Henrique, this is great, thank you!
It's almost what I was looking for! Only one small thing
(myframe$dates, %Y.%W))
is.na(wk) - wk %% 1 == 0
solution-aggregate(value ~ group + na.locf(wk), myframe, FUN = sum)
On Wed, Mar 30, 2011 at 6:10 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Yes, zoo! That's what I forgot. It's great.
Henrique, thanks a lot! One question
?).
Any advice - any chance for me to read in the whole file?
Thank you very much!
--
Dimitri Liakhovitski
Ninah Consulting
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
]]-data.frame(unit=rep(units[i],length(mydates)),Weeks=mydates)
}
myframe-do.call(rbind,myframe)
str(myframe)
head(myframe,110)
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r
Thanks a lot, David!
Exactly what I was looking for!
Dimitri
On Fri, Mar 11, 2011 at 1:46 PM, David Winsemius dwinsem...@comcast.net wrote:
On Mar 11, 2011, at 1:26 PM, Dimitri Liakhovitski wrote:
Hello!
The code below works and does what I need it to do.
However, I think the way I create
for the pointer!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal
I realize I can do something like this:
date-20081229
mydates-as.Date(as.character(date),%Y%m%d)
for(i in 1:52){ #
mydates-c(mydates,mydates[length(mydates)]+7)
}
I just thought maybe there is a more elegant way...
Thank you!
Dimitri
On Wed, Mar 9, 2011 at 4:04 PM, Dimitri Liakhovitski
to avoid.
Thanks again!
Dimitri
On Mon, Mar 7, 2011 at 9:32 PM, Ben Bolker bbol...@gmail.com wrote:
Dimitri Liakhovitski dimitri.liakhovitski at gmail.com writes:
I have 2 variables - predictor pred and response variable DV:
pred-c(439635.053, 222925.718, 668434.755, 194242.330, 5786.321, 115537.344
),
boundary.enforcement=2)
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide
-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
This is great, thanks a lot, Gabor!
On Fri, Feb 25, 2011 at 6:18 PM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
On Fri, Feb 25, 2011 at 5:21 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Hello!
s-start; e-end
middle-as.character(c(1,2,3))
I would like to get
Hello!
s-start; e-end
middle-as.character(c(1,2,3))
I would like to get the following result:
start 123 end or start 1 2 3 end or start 1,2,3 end
How can I avoide this (undesired) result:
paste(s,middle,e,sep= )
Thank you!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
.
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self
the code:
result=e/a
I understand that I could write those 3 scripts as 3 functions and
source them from another script.
But maybe there is a way of having them run one by one as such?
Thanks a lot!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R
this to see if
it worked? :)
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Dimitri Liakhovitski
Sent: Thursday, February 24, 2011 10:22 AM
To: r-help
Subject: [R] Running code sequentially from separate scripts
/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
.
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self
to higlight the
code again and run it again.
I also have R on an HP laptop and I never have the same problem on it.
Has anyone encountered thisproblem on Dell machines? Any advice on how
to fix it?
Thank you very much!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
. Do those dummy variables have to be centered? Help file for
rhierMnlRwMixture says: Z should not include an intercept and is
centered for ease of interpretation. But I'd thought I'd check just
in case: does it mean that it's OK if variables in Z are not centered?
Thank you very much!
--
Dimitri
Hello!
Very sorry for a probably very simple question - I looked but did not
find an answer in the archives.
I have a table counts (below) that shows counts by Option within
each of my 2 groups. However, my groups have different sizes (N1=255
and N2=68). Table prop shows the resulting proportions
, lower,
upper, ...)
}
else if (algorithm == gibbsR) {
retval - rtmvnorm.gibbs(n, mean, sigma, lower, upper,
...)
}
return(retval)
}
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r
I found a reason why I was getting the error that my var-covar matrix
was not symmetric: because my column names and row names were
different!
Dimitri
On Mon, Feb 7, 2011 at 12:39 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Hello!
I was wondering if it's possible to see
really needs to see the data to answer my question, I'll be
happy to provide btilde and my bounds.
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
way of running rgenoud on several chips
simultaneously?
Thanks a lot!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
Just a small correction: the package snow does install. But once I
try to load it:
library(snow),
I get an error:
Error: package 'snow' was built before R 2.10.0: please re-install it
Dimitri
On Thu, Feb 3, 2011 at 3:57 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Dear everyone
at 1:32 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Dear all:
In what I am doing I sometimes get a (Hessian) matrix that has a
couple of tiny negative eigenvalues (e.g. -6 * 10^-17). So, I can't
run a Cholesky decomp on it - but I need to.
Is there an established way
Dear all:
In what I am doing I sometimes get a (Hessian) matrix that has a
couple of tiny negative eigenvalues (e.g. -6 * 10^-17). So, I can't
run a Cholesky decomp on it - but I need to.
Is there an established way to regularize my (Hessian) matrix (e.g.,
via some transformation) that would
,
hard.generation.limit=TRUE,starting.values=rep(500,npredictors),
Domains=matrix(rep(c(0,1000),npredictors),ncol=2,byrow=T),boundary.enforcement=2)
--
Dimitri Liakhovitski
Ninah Consulting
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
gradient is too large?
Thanks a lot for explaining!
Dimitri
On Thu, Jan 13, 2011 at 11:10 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Hello - and sorry for a possibly stupid question, I'm just starting to
learn rgenoud.
I am defining a function with 5 parameters (p1, p2
!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self
) : cannot open the connection
Question: I'd like to program an if-then statement in my code that
says something like this:
myfile-read.csv(myfilename)
if cannot open the connection - then do X
What statement should I use under if?
Thanks a lot!
--
Dimitri Liakhovitski
Ninah Consulting
- data.frame(a = 1, b = 2, c = i)
if (i == 1) {
y - x
} else {
y - merge(x, y, all.x = TRUE, all.y = TRUE)
}
}
On Tue, Nov 9, 2010 at 8:42 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Hello!
I am running a loop. The result of each run of the loop is a data
frame
Thanks a lot, everybody- it's very helpful!
On Tue, Nov 9, 2010 at 12:20 PM, Nordlund, Dan (DSHS/RDA)
nord...@dshs.wa.gov wrote:
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of Dimitri Liakhovitski
Sent: Tuesday, November 09
!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self
spec...@stat.berkeley.edu
On Tue, 9 Nov 2010, Dimitri Liakhovitski wrote:
Hello!
I am running a loop. The result of each run of the loop is a data
frame. I am merging all the data frames.
For exampe:
The dataframe from run 1:
x-data.frame(a=1,b=2,c=3
On Tue, Nov 9, 2010 at 12:30 PM, Henrique Dallazuanna www...@gmail.com wrote:
Try this:
gsub(\\.(\\d{1}$), .0\\1, x)
On Tue, Nov 9, 2010 at 3:28 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Hello again!
Sorry, if it's a simple question - I am very bad in working
it for
hundreds and hundreds of names in 100 of huge files (tens of
thousands of rows in each).
Any way to speed it up?
Thanks a lot!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
the lookup table, and
my.df$category = categories[my.df$names]
creates the category column.
- Phil
On Mon, 8 Nov 2010, Dimitri Liakhovitski wrote:
Hello!
Hope there is a nifty way to speed up my code by avoiding loops.
My task is simple - analogous
it.
Thanks a lot for your hints!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
this:
xtabs(value ~ city + brand, mydf)
On Wed, Nov 3, 2010 at 6:23 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Hello!
I have a data frame like this one:
mydf-data.frame(city=c(a,a,a,a,a,a,a,a,b,b,b,b,b,b,b,b),
brand=c(x,x,y,y,z,z,z,z,x,x,x,y,y,y,z,z),
value=c
In reshape2 this does the job:
dcast(mydf,city~brand,sum)
On Wed, Nov 3, 2010 at 4:37 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Thanks a lot!
Yes - I just found the reshape package too - and guess what, my math was
wrong!
reshape2 seems like the more up-to-date
Want to thank everyone once more for pointing in reshape direction.
Saved me about 16 hours of looping!
Dimitri
On Wed, Nov 3, 2010 at 4:38 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
In reshape2 this does the job:
dcast(mydf,city~brand,sum)
On Wed, Nov 3, 2010 at 4:37 PM
a b c d
loc 1 1/1/2010 1 11 111 NA
loc 2 1/1/2010 2 12 112 NA
loc 3 1/1/2010 3 13 113 NA
loc 1 2/1/2010 3 NA 114 1
loc 2 2/1/2010 5 NA 115 11
loc 3 2/1/2010 6 NA 116 111
Thanks a lot for your suggestions!
--
Dimitri Liakhovitski
Ninah
Never mind - I found it in reshape package: rbind.fill
I wonder if it's still in reshape2.
Dimitri
On Wed, Nov 3, 2010 at 5:34 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Hello!
I have 2 data frames like this (well, actually, I have 200 of them):
df1-data.frame(location=c
On Wed, Nov 3, 2010 at 4:32 PM, Henrique Dallazuanna www...@gmail.com wrote:
Try this:
xtabs(value ~ city + brand, mydf)
On Wed, Nov 3, 2010 at 6:23 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Hello!
I have a data frame like this one:
mydf-data.frame(city=c
Hello!
I have 2 vectors:
x-letters[1:5]
y-1:3
Is there a way - without loops - to create a data frame such that we
repeat the whole y within each level of x so that it looks like
this:
a 1
a 2
a 3
b 1
b 2
b 3
c 1
c 2
c 3
etc?
Thank you!
--
Dimitri Liakhovitski
Ninah Consulting
Never mind - found it: expand.grid(y,x)
On Tue, Nov 2, 2010 at 4:57 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Hello!
I have 2 vectors:
x-letters[1:5]
y-1:3
Is there a way - without loops - to create a data frame such that we
repeat the whole y within each level of x
-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
PM, Dimitri Liakhovitski wrote:
You are asking a statistics question, not an R question. R-list people
never react to such posts.
Or they give you a nasty reply of the type: Do you homework first,
and then ask questions here.
Good point. I thought it was an R question because it was about
and
installed R12 instead. But I am getting the same error.
Any advice?
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
, Oct 29, 2010 at 9:22 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
I have just installed R-2.12
I have Windows 7, 64-bit verison.
I currently have IE as my default browser. The internet connection is very
good.
Whenever I try to run a help command (?lm, for example), I get
Problem solved. It turned out I had to reset my IE as my default
browser for all extentions (like .html). Now, R help is working!
Dimitri
On Fri, Oct 29, 2010 at 4:20 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
I tried one more thing - I uninstalled R again, and this time
Question: I installed R verison 2-12.0 on my Windows 7 (64 bit) PC.
When I was installing it, it did not ask me anything about 32 vs. 64 bit.
So, if I run R now - is it running as a 32-bit or a 64-bit?
thank you!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
wrote:
G'day Dimitri,
On Fri, 29 Oct 2010 16:45:00 -0400
Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote:
Question: I installed R verison 2-12.0 on my Windows 7 (64 bit) PC.
When I was installing it, it did not ask me anything about 32 vs. 64
bit. So, if I run R now - is it running
| Subject)
summary(fm1)
ranef(fm1)
When I run it like this I do get fixed effects in summary(my.model)
and I do get random coefficients by group (in my example - by Subject)
in ranef(fm1). I just want to make sure it's what I want.
Thanks a lot!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
Hello!
I am sorry if it's a naive/wrong question. But can one run a
regression with weights using lme?
Thank you!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r
are specified the same way as in
the lm function, and refers you to ?lm for details.
HTH,
Ista
On Tue, Oct 26, 2010 at 11:21 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Hello!
I am sorry if it's a naive/wrong question. But can one run a
regression with weights using lme
appreciate a clarification!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide
...@stat.wisc.edu wrote:
On Tue, Oct 26, 2010 at 12:27 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Hello,
and sorry for asking a question without the data - hope it can still
be answered:
I've run two things on the same data:
# Using lme:
mix.lme - lme(DV ~a+b+c+d+e+f+h+i
I know that I can use as.yearmon in the package zoo to find the year
and the month of a date.
I can use as. yearqtr to find the year and the quarter.
But how can one find just the year of a date?
Thanks a lot!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
Thank you very much!
Dimitri
On Mon, Oct 25, 2010 at 12:46 PM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
On Mon, Oct 25, 2010 at 12:38 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
I know that I can use as.yearmon in the package zoo to find the year
and the month
Grothendieck
ggrothendi...@gmail.com wrote:
On Fri, Oct 22, 2010 at 9:45 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Gabor,
thanks a lot - sqldf might be a solution. However, do you know if
sqldf can also read in .txt files (with different delimiters)?
The data I am dealing
Grothendieck
ggrothendi...@gmail.com wrote:
On Sat, Oct 23, 2010 at 9:20 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
This is very helpful, Gabor.
I've run the code to figure out the end of the line and here is what I
am seeing at the end of each line: \r\n
So, I specified like
:44 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
Oh, I understand - I did not realize it's reading in the whole file.
So, is there any way to make it read it in only once and the spit into
R just one piece (e.g., 1 million rows), write a regular file out
(e.g., a txt using
O, wait a sec - does it mean I can't feed my objects into sql commands?
On Sat, Oct 23, 2010 at 10:07 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
I just tried it:
for(i in 11:16){ #i-11
start-Sys.time()
print(start)
flush.console()
filename-paste(skipped millions- ,i
-bit Windows 7 PC with 6 GB RAM (I assume
only 4 can be used?)) I got this error:
Error: cannot allocate vector of size 42.0 Mb
So, I guess
On Sat, Oct 23, 2010 at 10:19 AM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
On Sat, Oct 23, 2010 at 10:07 AM, Dimitri Liakhovitski
dimitri.liakhovit
,.txt,sep=)
write.table(DF,sep=\t,header=FALSE,file=filename)
count-count+1
}
close(con)
On Sat, Oct 23, 2010 at 10:19 AM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
On Sat, Oct 23, 2010 at 10:07 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
I just tried it:
for(i
Also am running the same code on my powerful home PC.
It's been running for 25 minutes already, and still has not printed
the first end time (does it mean it's still trying to read in DF for
the first time)?
On Sat, Oct 23, 2010 at 10:52 AM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com
defined inside the function?
Thank you very much!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting
://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r
. Look in the data frame
2. Look in the environment of the user-defined function
3. Look outside.
Dimitri
On Fri, Oct 22, 2010 at 9:15 AM, David Winsemius dwinsem...@comcast.net wrote:
On Oct 22, 2010, at 9:01 AM, Dimitri Liakhovitski wrote:
Dear R'ers,
I am fighting with a problem
AM, David Winsemius dwinsem...@comcast.net wrote:
On Oct 22, 2010, at 9:01 AM, Dimitri Liakhovitski wrote:
Dear R'ers,
I am fighting with a problem that is driving me crazy. I use lm in
my user-defined function, but it seems to be looking for weights
outside of my function's environment
(e.g., 1 milllion) using nrows= and skip.
I was able to read in the first 1,000,000 rows no problem in 45 sec.
But then I tried to skip 16,999,999 rows and then read in things. Then
R crashed. Should I try again - or is it too many rows to skip for R?
Thank you!
--
Dimitri Liakhovitski
Ninah
a lot!
Dimitri
On Fri, Oct 22, 2010 at 6:28 PM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
On Fri, Oct 22, 2010 at 5:17 PM, Dimitri Liakhovitski
dimitri.liakhovit...@gmail.com wrote:
I know I could figure it out empirically - but maybe based on your
experience you can tell me if it's doable
(summary(regr.f)$adj.r.squared,3)
results[nrow(results)+1,1]-round(dwtest(regr.f)$statistic,2)
row.names(results)[(nrow(results)-2):nrow(results)]-c(R.Sqr,
Adj.R.Sqr,DW)
write.csv(results,file=file.name)
return(results)
}
--
Dimitri Liakhovitski
Ninah Consulting
, and then run my several graphs, e.g.:
for(i in 10:12){
plot(1:i)
}
Is there any way to avoid doing it manually initiate the graphics
recording in the RGraphics window in the script itself?
Thanks a lot for your help!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
, reproducible code.
--
Jim Holtman
Cincinnati, OH
+1 513 646 9390
What is the problem that you are trying to solve?
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
)
floor(signif(x,3)+10)
But it's very manual - because in the problem I am facing the numbers
sometimes have to be rounded to a 1000, sometimes to a 100, etc.
Thanks a lot for any hints!
--
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com
__
R
...@wlandres.net wrote:
On 20-Oct-10 21:27:46, Duncan Murdoch wrote:
On 20/10/2010 5:16 PM, Dimitri Liakhovitski wrote:
Hello!
I am trying to round the number always up - i.e., whatever the
positive number is, I would like it to round it to the closest 10 that
is higher than this number, the closest 100
Thanks a lot, David - I'll try this solution.
Dimitri
On Wed, Oct 20, 2010 at 9:54 PM, David Winsemius dwinsem...@comcast.net wrote:
On Oct 20, 2010, at 8:38 PM, Dimitri Liakhovitski wrote:
Thank you for your help, everyone.
Actually, I am building a lot of graphs (in a loop) but the values
301 - 400 of 627 matches
Mail list logo