Hey Petr,
ok I was thinking that R would handle the split by itself.
I guess using eval we can even make arg1=val1 being executed by R.
Ok tx
Colin
--
View this message in context:
http://r.789695.n4.nabble.com/Rscript-example-tp4436130p4437659.html
Sent from the R help mailing list archive at
Dear HelpeRs,
I would be grateful for anybody who might help to produce the following
plot (the code for matlab is below) using the "rgl" package of R?
[t,r] = meshgrid(linspace(0,2*pi,361),linspace(-4,4,101));
[x,y] = pol2cart(t,r);
P = peaks(x,y);
figure('color','white');
polarplot3d(P,'colorda
You could loop through the list using lapply() or the like. One way would be
to subset the data and use . Notation which expands to all variables in the
dataset not used elsewhere in the model (ie not the outcomes).
Cheers,
Josh
On Mar 1, 2012, at 14:29, sajjad R wrote:
>
> Dear All,
>
Uwe
You ask "What makes you think code is "not executed"?". In the
Rprofile I've added "par_old<-par()" near the start and par_old is not
present when I run R. I've also included the code for a simple popup window
using tkmessageBox that doesn't appear and I try writing out one line to a
Dear All,
I hope to run some simple survival analysis using the cox-proportional hazard
models in R, my command will look like below:
cox <- summary( coxph( Surv( mortality , TIME ) ~ Independent variables ) )
My query is about specifying a range of independnt variables in R,
such that each in
Hi,
I ran two svm models in R e1071 package: the first without cross-validation
and the second with 10-fold cross-validation.
I used the following syntax:
#Model 1: Without cross-validation:
> svm.model <- svm(Response ~ ., data=data.df, type="C-classification",
> kernel="linear", cost=1)
>
Hi,
I am trying to run two Non-Gaussian regressions: logistic and probit. I am
receiving two different errors when I try to run these regressions and I am
not sure what they mean or how to fix my syntax.
Here is the logistic regression error:
Error in family$linkfun(mustart) :
Argument mu mus
Hello,
>
> The problem is that I get a the following error bacause anything after the
> # is ignored.
>
> Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
> :
> line 6 did not have 500 elements
>
> R thinks that line 6 has only 2 elements because of the #.
>
Use '
What do you make of the following from ?riwish
"
riwish(v, S)
v: Degrees of freedom (scalar).
"
does a m/2 parameterization yield a scalar for, say, 3 dof ?
On Thu, Mar 1, 2012 at 9:55 AM, Shantanu MULLICK wrote:
> Hello Everyone
>
> Both the MCMCpack and the bayesm libraries allow u
Hi, thank you very much for the advice. I'll try it out, and see where I
can take it from there.
@david, your point is noted. I will avoid such mails in the future.
On Fri, Mar 2, 2012 at 4:57 AM, Peter Ehlers wrote:
> On 2012-03-01 13:52, John Kane wrote:
>
>> No it's an outlier problem, I
Thanks a ton! That is great.
ben
On Thu, Mar 1, 2012 at 9:29 PM, Peter Langfelder wrote:
> On Thu, Mar 1, 2012 at 8:05 PM, Ben quant wrote:
> > Hello,
> >
> > I have another question
> >
> > I have a data frame that looks like this:
> > a b
> > 2007-03-31 "
On Thu, Mar 1, 2012 at 8:05 PM, Ben quant wrote:
> Hello,
>
> I have another question
>
> I have a data frame that looks like this:
> a b
> 2007-03-31 "20070514" "20070410"
> 2007-06-30 "20070814" "20070709"
> 2007-09-30 "20071115" "20071009"
> 2007-12-31 "2008
par('bg') is not what you are looking for - it will set the bg of the
whole graphic device, not panels. I think you want:
count <- 0
mypanel <- function(x, y, ...){
count <<- count+1
ll<- par('usr')
if(count %in% c(1,4,9,12)) bg<- "#FDFF65"
else bg<- 'transparent'
rect(ll[1],ll[3],ll
Hello,
I have another question
I have a data frame that looks like this:
a b
2007-03-31 "20070514" "20070410"
2007-06-30 "20070814" "20070709"
2007-09-30 "20071115" "20071009"
2007-12-31 "20080213" "20080109"
2008-03-31 "20080514" "20080407"
2008-06-30 "20080
On 2 Mar 2012 09:12, "Suranga Kasthurirathne" wrote:
> Hi, thank you very much for the advice. I'll try it out, and see where I
> can take it from there.
>
> @david, your point is noted. I will avoid such mails in the future.
> On 2 Mar 2012 04:27, "Peter Ehlers" wrote:
>
>> On 2012-03-01 13:52
Hi,
Is it possible to place the group number in a cluster?
The best example I found was at
https://www.crops.org/images/publications/cs/42/5/1584f4.jpeg (see I, II,
IIIa, IIIb)
It would help to identify the group given by cutree since branches can turn
around and they necessarily are not plotted
Frank,
this is it. It uses Peter's idea.
plot(1:10)
axis(side=2, 1:10, las=1, line=-31.5, lwd=0)
axis(side=4, 1:10, las=1, labels=FALSE)
Rich
On Thu, Mar 1, 2012 at 6:52 PM, Frank Harrell wrote:
> Rich's pointers deals with lattice/grid graphics. Does anyone have a
> solution for base gr
Actually, I ran across something a moment ago.
read.xls takes http files. It's in the gdata package. Make sure that
you have perl on the path too.
Thanks,
Erin
On Thu, Mar 1, 2012 at 6:54 PM, Erin Hodgess wrote:
> Thanks J!
>
> I was thinking about the url, download.file functions too
>
> Ju
Frank,
maybe I'm not understanding something right... you say right-justify
in the right margin, meaning justify against the very right edge of
the plot margin area? Since you're setting your right margin to 5, why
not just
mtext(s, side=4, las=1, at=5, adj=1, line = 5, cex=1)
mtext(s, side=4, la
Thanks J!
I was thinking about the url, download.file functions too
Just wanted to make sure that there wasn't something special for Excel.
Thanks,
Erin
On Thu, Mar 1, 2012 at 6:53 PM, J Toll wrote:
> On Thu, Mar 1, 2012 at 6:43 PM, Erin Hodgess wrote:
>> Dear R People:
>>
>> I have been usi
On Thu, Mar 1, 2012 at 6:43 PM, Erin Hodgess wrote:
> Dear R People:
>
> I have been using xlsReadWrite to read Excel files and am very pleased
> with it. Thank you xlsReadWrite People!
>
> My question is: is there a function, similar to get.hist.quote, to
> download Excel files from the web, pl
Dear R People:
I have been using xlsReadWrite to read Excel files and am very pleased
with it. Thank you xlsReadWrite People!
My question is: is there a function, similar to get.hist.quote, to
download Excel files from the web, please?
Thanks,
Erin
--
Erin Hodgess
Associate Professor
Depart
Rich's pointers deals with lattice/grid graphics. Does anyone have a
solution for base graphics?
Thanks
Frank
Richard M. Heiberger wrote
>
> Frank,
>
> This can be done directly with a variant of the panel.axis function.
> See function panel.axis.right in the HH package. This was provided for
Dear expeRts,
I would like to colorize the backgrounds of a pairs plot according to the
respective panel number. Here is what I tried (without success):
count <- 0
mypanel <- function(x, y, ...){
count <<- count+1
bg. <- if(count %in% c(1,4,9,12)) "#FDFF65" else NA
points(x, y, cex=0
On 2012-03-01 13:52, John Kane wrote:
No it's an outlier problem, I think.
If you have a fairly small number of sets of these numbers simple visual
inspection of a boxplot for each set would probably acomplish what you want.
Try this in R for an example. Just paste the next two lines into R
x
Hi,
I'm trying to figure out the formula used by ggplot2 to calculate the
width of a bar in geom_bar so that I can use that elsewhere in the
plot. My code looks like this:
ggplot(xAll, aes(Date)) +
geom_bar(subset = .(Direction == "Up"), aes(y = Change, fill =
Time), stat = "identity") +
On Thu, Mar 01, 2012 at 04:55:55PM -0500, Sarah Goslee wrote:
> Of course there's rounding error: your computer can't
> store those decimal numbers precisely. See R FAQ 7.31 for
> details.
>
> See also:
> sum(10*c(-0.2, 0.8, 0.8, -3.2, 1.8)) / 10
Hi.
This is 0. This works without rounding for on
A) you will generally get a better response when your question includes
reproducible code/sample data, and a clear identification of the desired final
result.
B) in most cases like this, a proliferation of names is not as useful as the OP
(you) thinks it is. Much better is to build a list of re
That is great! Thank you very much.
Ben
On Thu, Mar 1, 2012 at 2:57 PM, Petr Savicky wrote:
> On Thu, Mar 01, 2012 at 02:31:01PM -0700, Ben quant wrote:
> > Hello,
> >
> > My direct desire is a good (fast) way to fill values forward until there
> is
> > another value then fill that value foward
Hi all, I am running an -MNP- multinomial probit model package using R. It
gives me the following objection instead of giving me the results:
Erreur : impossible d'allouer un vecteur de taille 137.9 Mo (in english: cannot
allocate a 137.9 Mb vector memory).
I have already increased the memory s
On Thu, Mar 01, 2012 at 01:49:44PM -0800, Mark A. Albins wrote:
> Hi!
>
> I'm running R version 2.13.0 (2011-04-13)
> Platform: i386-pc-mingw32/i386 (32-bit)
>
> When i type in the command:
>
> sum(c(-0.2, 0.8, 0.8, -3.2, 1.8))
>
> R returns the value:
>
> -5.551115e-17
>
> Why doesn't R retu
In base ten, using any fixed number of digits, compute
1/3 + 1/3 + 1/3
(doing the divisions before the additions).
Why isn't it 1?
1/5 has the same sort of problem in base two.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-help-boun...@r-projec
On Thu, Mar 01, 2012 at 02:31:01PM -0700, Ben quant wrote:
> Hello,
>
> My direct desire is a good (fast) way to fill values forward until there is
> another value then fill that value foward in the data xx (at the bottom of
> this email). For example, from row 1 to row 45 should be NA (no change
Of course there's rounding error: your computer can't
store those decimal numbers precisely. See R FAQ 7.31 for
details.
See also:
sum(10*c(-0.2, 0.8, 0.8, -3.2, 1.8)) / 10
Sarah
On Thu, Mar 1, 2012 at 4:49 PM, Mark A. Albins wrote:
> Hi!
>
> I'm running R version 2.13.0 (2011-04-13)
> Platform
No it's an outlier problem, I think.
If you have a fairly small number of sets of these numbers simple visual
inspection of a boxplot for each set would probably acomplish what you want.
Try this in R for an example. Just paste the next two lines into R
xx <- c(1, 1, 2, 10, 100, 10,1)
boxplot(
Hi!
I'm running R version 2.13.0 (2011-04-13)
Platform: i386-pc-mingw32/i386 (32-bit)
When i type in the command:
sum(c(-0.2, 0.8, 0.8, -3.2, 1.8))
R returns the value:
-5.551115e-17
Why doesn't R return zero in this case? There shouldn't be any rounding
error in a simple sum.
Thanks,
M
dear Phil,
plot.segmented() accepts vectorized 'col', 'lty' and 'lwd' arguments. Then,
par(mfrow=c(1,2))
plot(o.seg,col=2:3,lty=2:3,lwd=c(1,2))
plot(z,y)
plot(o.seg,col=2:3,lty=1,linkinv=T,add=T,lwd=2)
hope this helps you,
vito
On Thu, 1 Mar 2012 08:57:39 -0800 (PST), Filoche wrote
> Hi eve
That's nice.
Please read the posting guidelines and get back to us with some information on
what the data looks like an what you are doing.
For example do you just want lines or do you want a smoother, etc?
John Kane
Kingston ON Canada
> -Original Message-
> From: ir...@cam.ac.uk
> S
Gotta love R.
Thanks to Bill Dunlap, Peter Langfelder and Jim Holtman for no less than 3 different
solutions.
JN
On 12-03-01 04:25 PM, Peter Langfelder wrote:
pstr<-c("b1=200", "b2=50", "b3=0.3")
split = sapply(strsplit(pstr, split = "="), I);
pnum = as.numeric(split[2, ]);
names(pnum)
On Thu, Mar 01, 2012 at 03:28:31PM -0500, John C Nash wrote:
> Not paying close attention to detail, I entered the equivalent of
>
> pstr<-c("b1=200", "b2=50", "b3=0.3")
>
> when what I wanted was
>
> pnum<-c(b1=200, b2=50, b3=0.3)
>
> There was a list thread in 2010 that shows how to deal with
Hello,
My direct desire is a good (fast) way to fill values forward until there is
another value then fill that value foward in the data xx (at the bottom of
this email). For example, from row 1 to row 45 should be NA (no change),
but from row 46 row 136 the value should be 12649, and from row 13
On Thu, Mar 1, 2012 at 12:28 PM, John C Nash wrote:
> Not paying close attention to detail, I entered the equivalent of
>
> pstr<-c("b1=200", "b2=50", "b3=0.3")
>
> when what I wanted was
>
> pnum<-c(b1=200, b2=50, b3=0.3)
>
> There was a list thread in 2010 that shows how to deal with un-named ve
On Thu, Mar 01, 2012 at 11:53:00AM -0800, statquant2 wrote:
> Hi there,
> I am trying to find an example how to use Rscript
> Let's suppose I want to pass 3 arguments (I don't want [options] and -e
> [expressions] as described in help)
>
> *on the command line
> myRscript.R -arg1=value1 -arg2=val
On Mar 1, 2012, at 2:40 PM, Dennis Fisher wrote:
R 2.14.0
OS X
Marc's proposed solution (appearing at the end of this email) is
perfect -- thanks so much
However, some questions remain:
1. The following works:
plot(1, type="n")
text(1, 1, expression(symbol("\342")))
but t
Great thanks!
ben
On Thu, Mar 1, 2012 at 1:30 PM, Marc Schwartz wrote:
> On Mar 1, 2012, at 2:02 PM, Ben quant wrote:
>
> > Hello,
> >
> > How do I get the dates of all Fridays between two dates?
> >
> > thanks,
> >
> > Ben
>
>
> Days <- seq(from = as.Date("2012-03-01"),
>to = as.Da
Thank you very much!! Exactly how I wanted it :)
--
View this message in context:
http://r.789695.n4.nabble.com/function-for-filtering-and-deleting-vector-entries-tp4432410p4436303.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help
On Mar 1, 2012, at 2:02 PM, Ben quant wrote:
> Hello,
>
> How do I get the dates of all Fridays between two dates?
>
> thanks,
>
> Ben
Days <- seq(from = as.Date("2012-03-01"),
to = as.Date("2012-07-31"),
by = "day")
> str(Days)
Date[1:153], format: "2012-03-01" "2
Not paying close attention to detail, I entered the equivalent of
pstr<-c("b1=200", "b2=50", "b3=0.3")
when what I wanted was
pnum<-c(b1=200, b2=50, b3=0.3)
There was a list thread in 2010 that shows how to deal with un-named vectors,
but the same
lapply solution doesn't seem to work here i.e.
Inelegant, but here's one way:
d1 <- Sys.Date()
d2 <- Sys.Date() + 100
library(lubridate)
d <- seq(d1, d2, by = "day")
d[wday(d)==6]
Michael
On Thu, Mar 1, 2012 at 3:02 PM, Ben quant wrote:
> Hello,
>
> How do I get the dates of all Fridays between two dates?
>
> thanks,
>
> Ben
>
> [[
Of course, just use
x <- fun(Temp, v)
x$Temp # To get back temp
x[["Temp"]]
x$v # To get back v
x[["v"]]
Michael
On Thu, Mar 1, 2012 at 3:15 PM, babyluck wrote:
> Thank you Rui, that helped a lot. The correct values show up when I'm using
> the following code. Now fun(Temp,v) returns a matr
Thank you Rui, that helped a lot. The correct values show up when I'm using
the following code. Now fun(Temp,v) returns a matrix, and Temp and v
stay the same. But I'd like to use the reduced vectors in some
calculations..can they be "extracted" in some way so that I have them
separately a
Hi Dennis,
There are some subtleties in the way that 'symbol' is handled in plotmath.
There is no symbol() function, per se, though there is an as.symbol() function,
which is used differently.
'symbol' as used in plotmath, is telling R to plot the character using a symbol
font, which is the sa
Hello,
How do I get the dates of all Fridays between two dates?
thanks,
Ben
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-p
Hi there,
I am trying to find an example how to use Rscript
Let's suppose I want to pass 3 arguments (I don't want [options] and -e
[expressions] as described in help)
*on the command line
myRscript.R -arg1=value1 -arg2=value2 -arg3=value3
*In the script
#! /path/to/Rscript
args = commandArgs(TR
Hi,
Thanks for your help,
This worked very well:
na.action=na.roughfix
Kevin
On Sun, Feb 26, 2012 at 3:10 PM, Weidong Gu wrote:
> Hi,
>
> You can set na.action=na.roughfix which fills NAs with the mean or
> mode of the missing variable.
>
> Other option is to impute missing values using rfIm
Hello, again.
Petr Savicky wrote
>
> On Thu, Mar 01, 2012 at 05:42:48PM +0100, Petr Savicky wrote:
>> On Thu, Mar 01, 2012 at 04:27:45AM -0800, syrvn wrote:
>> > Hello,
>> >
>> > I am stuck with selecting the right rows from a data frame. I think the
>> > problem is rather how to select them
>>
On Thu, Mar 1, 2012 at 12:07 PM, Doran, Harold wrote:
> Typically this list doesn't support general statistical questions and
> unfortunately I don't have a better recommendation. It may be more helpful
> for you to work with a statistician than seek help here.
>
> My point is simply that quanti
R 2.14.0
OS X
Marc's proposed solution (appearing at the end of this email) is perfect --
thanks so much
However, some questions remain:
1. The following works:
plot(1, type="n")
text(1, 1, expression(symbol("\342")))
but this does not work (TEXT appears in a symbol font)
Le jeudi 01 mars 2012 à 07:07 -0800, Mickael R problem a écrit :
> Hi Richard,
> clearly there is a problem with latin ligature because the word resulting
> from my ask with findFreqTerms give me some words > "n"
>
> "nancement"
> >> "nancier" "nancière""nancières"
>
?plot
On 01.03.2012 16:15, hendersi wrote:
Hello,
I have a spreadsheet of pairs of coordinates and I would like to plot a line
along which curves/arcs connect each pair of coordinates. The aim is to
visualise the pattern of point connections.
Thanks! Ian
--
View this message in context:
ht
On 01-03-2012, at 19:33, isabe...@ghement.ca wrote:
> Hi Berend,
>
> Many thanks for your prompt reply. I followed your instructions but couldn't
> find what I was looking for. I was hoping that someone who's already worked
> with such a function could be able to point it out to me. My Goog
On 01.03.2012 14:39, Ross Bowden wrote:
Hi everyone. I have recently installed R 2.14.1 on my 64-bit Windows 7
laptop. I am attempting to include some favourite functions in the
Rprofile.site file to run at R start-up as I did with my previous 32-bit
XP machine. I have edited the Rprofile.site
BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }
Hi Berend,
Many thanks for your prompt reply. I followed your instructions but
couldn't find what I was looking for. I was hoping that someone who's
already worked with such a function could be able to point
On 01-03-2012, at 19:03, isabe...@ghement.ca wrote:
>
>
> Hello, BODY { font-family:Arial, Helvetica,
> sans-serif;font-size:12px; }
>
> Does any one know if there are any functions/packages available in R
> for robust fitting of ARMA time series models (e.g., similar to the
>
Hello to everyone.
I need your help. I´m trying to fit the same *glm.nb* to a different data
set and i am getting these errors in some of the data. Sometimes, one data
set has two of these errors when fitting the model.
1.- Error en while ((it <- it + 1) < limit && abs(del) > eps) { :
valor aus
On Mar 1, 2012, at 1:02 PM, Sarah Goslee wrote:
You're all correct: I copied in the wrong thing. My apologies!
On Thu, Mar 1, 2012 at 1:00 PM, Ista Zahn wrote:
Hi,
On Mar 1, 2012, at 12:38 PM, Sarah Goslee wrote:
Hi,
On Thu, Mar 1, 2012 at 11:11 AM, mails wrote:
Hello,
consider the f
Thank you.
On Thu, Mar 1, 2012 at 9:58 AM, Bert Gunter wrote:
> Google is your friend! -- as usual.
>
> If you had searched on "glm with regularization" you would have bumped
> into the glmnet R package, which I think is what you're looking for.
>
> -- Bert
>
> On Wed, Feb 29, 2012 at 6:22 PM, Dm
You're all correct: I copied in the wrong thing. My apologies!
On Thu, Mar 1, 2012 at 1:00 PM, Ista Zahn wrote:
> Hi,
>
> On Mar 1, 2012, at 12:38 PM, Sarah Goslee wrote:
>
>> Hi,
>>
>> On Thu, Mar 1, 2012 at 11:11 AM, mails wrote:
>>> Hello,
>>>
>>>
>>> consider the following data.frame:
>>>
>>
Hello, BODY { font-family:Arial, Helvetica,
sans-serif;font-size:12px; }
Does any one know if there are any functions/packages available in R
for robust fitting of ARMA time series models (e.g., similar to the
function arima.rob() in S-PLUS)?
Many thanks and kind
Hi,
On Mar 1, 2012, at 12:38 PM, Sarah Goslee wrote:
> Hi,
>
> On Thu, Mar 1, 2012 at 11:11 AM, mails wrote:
>> Hello,
>>
>>
>> consider the following data.frame:
>>
>> test <- data.frame(n = c(1,2,3,4,5), v = c(6,5,7,5,3), pattern =
>> c(1,1,NA,1,NA))
>>
< snip >
>> So basically the resu
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of mails
> Sent: Thursday, March 01, 2012 8:11 AM
> To: r-help@r-project.org
> Subject: [R] Delete rows from data.frame matching a certain criteria
>
> Hello,
>
>
> consider the f
Google is your friend! -- as usual.
If you had searched on "glm with regularization" you would have bumped
into the glmnet R package, which I think is what you're looking for.
-- Bert
On Wed, Feb 29, 2012 at 6:22 PM, Dmitriy Lyubimov wrote:
> Hello,
>
> Thank you for probably not so new questio
On Mar 1, 2012, at 12:30 PM, Suranga Kasthurirathne wrote:
Dear gurus,
Im a newbie, and I want to ask a very general question.
Assume that I have a set of numbers as follows,
1, 1, 2, 10, 100, 10,1
From these, I need to identify which number is the most different as
compared to others. (in
Here is another way of doing it:
> x <- read.table(text = " Count Volume FCLASS
+ 1 55000 6 'Grade Separated'
+ 2 43000 39000 'Grade Separated'
+ 3 26000 26500 'Major Arterial'
+ 4 19500 2 'Major Arterial'", as.is = TRUE)
> result <- sapply(spli
Your criteria did not make sense since in both cases pattern == 1, so
I chose to set to NA if pattern == 1
> test <- data.frame(n = c(1,2,3,4,5), v = c(6,5,7,5,3), pattern =
+ c(1,1,NA,1,NA))
> test
n v pattern
1 1 6 1
2 2 5 1
3 3 7 NA
4 4 5 1
5 5 3 NA
> # set v to NA
Hi,
On Thu, Mar 1, 2012 at 11:11 AM, mails wrote:
> Hello,
>
>
> consider the following data.frame:
>
> test <- data.frame(n = c(1,2,3,4,5), v = c(6,5,7,5,3), pattern =
> c(1,1,NA,1,NA))
>
>> test
> n v pattern
> 1 1 6 1
> 2 2 5 1
> 3 3 7 NA
> 4 4 5 1
>
Dear gurus,
Im a newbie, and I want to ask a very general question.
Assume that I have a set of numbers as follows,
1, 1, 2, 10, 100, 10,1
>From these, I need to identify which number is the most different as
compared to others. (in this case, it will be 100, since its way larger
than the other
On Thu, Mar 01, 2012 at 05:42:48PM +0100, Petr Savicky wrote:
> On Thu, Mar 01, 2012 at 04:27:45AM -0800, syrvn wrote:
> > Hello,
> >
> > I am stuck with selecting the right rows from a data frame. I think the
> > problem is rather how to select them
> > then how to implement the R code.
> >
> >
I have a data frame with a number of observed and predicted values by
classification as shown below:
Count Volume FCLASS
1 55000 6 Grade Separated
2 43000 39000 Grade Separated
3 26000 26500 Major Arterial
4 19500 2 Major Arterial
...
There
Hello,
consider the following data.frame:
test <- data.frame(n = c(1,2,3,4,5), v = c(6,5,7,5,3), pattern =
c(1,1,NA,1,NA))
> test
n v pattern
1 1 6 1
2 2 5 1
3 3 7 NA
4 4 5 1
5 5 3 NA
I tried to use apply and the adply function to set v t
Hi everyone.
I'm using segmented package to find break point in a bi-linear relationship.
In a particular case, I find 1 pointcut (so 2 slopes).
I would like to know if it is possible to retrieve information in the
segmented object that could let me to plot 1 particular segment with a
different c
Sorry, correction:
The second index matrix is the matrix of elements not in the first,
not another combination, this time 3 out of 10.
Change this in my first post
>
> inxmat <- with(DF, combn(ID, 3))
> meansDist2 <- apply(inxmat, 2, function(jnx) f(jnx, DF$value, 45))
> (i2 <- which(meansDist2
Hi
I would like to know how I can change the name of a model for each
trainning cycle of a model.
I work with the RSNNS package and to build a neural network, I used :
for (i in 5:30)
model_ANN <- mlp(X, Y, size=n,) # where size is the number of neurons
in the hidden layer
but I need to sa
Hello,
I have a spreadsheet of pairs of coordinates and I would like to plot a line
along which curves/arcs connect each pair of coordinates. The aim is to
visualise the pattern of point connections.
Thanks! Ian
--
View this message in context:
http://r.789695.n4.nabble.com/Connecting-points-
Hello,
syrvn wrote
>
> Hello,
>
> I am stuck with selecting the right rows from a data frame. I think the
> problem is rather how to select them
> then how to implement the R code.
>
> Consider the following data frame:
>
> df <- data.frame(ID = c(1,2,3,4,5,6,7,8,9,10), value =
> c(34,12,23,
Hi Richard,
clearly there is a problem with latin ligature because the word resulting
from my ask with findFreqTerms give me some words > "n"
"nancement"
>> "nancier" "nancière""nancières"
>> "nanciers""xe"
where U+FB01 is a code for latin ligature. The problem
Hello Everyone
Both the MCMCpack and the bayesm libraries allow us to make draws from the
Inverse Wishart distribution.
But I wanted to find out how exactly is the Inverse Wishart distribution
parameterized in these libraries.
The reason I ask is the following:
Now its generally standard to exp
On Thu, Mar 01, 2012 at 05:42:48PM +0100, Petr Savicky wrote:
> On Thu, Mar 01, 2012 at 04:27:45AM -0800, syrvn wrote:
> > Hello,
> >
> > I am stuck with selecting the right rows from a data frame. I think the
> > problem is rather how to select them
> > then how to implement the R code.
> >
> >
On Thu, Mar 01, 2012 at 04:27:45AM -0800, syrvn wrote:
> Hello,
>
> I am stuck with selecting the right rows from a data frame. I think the
> problem is rather how to select them
> then how to implement the R code.
>
> Consider the following data frame:
>
> df <- data.frame(ID = c(1,2,3,4,5,6,7,
Jon,
You could create new variables with the combined levels just for the
purpose of plotting.
Assume I have data.frame bpt
str(bpt)
'data.frame': 12 obs. of 2 variables:
$ V1: Factor w/ 3 levels "low","med","high": 1 1 1 1 2 2 2 2 3 3 ...
$ V2: Factor w/ 6 levels "1","2","3","4",..: 1 1 2 2 3
Thank you so much Jim, Duncan, and special thanks to Rui!!
The modified script from Rui works perfectly and I really learned a lot from
all your suggestions.
Regards,
Amber
--
View this message in context:
http://r.789695.n4.nabble.com/break-function-in-loop-tp4435033p4435399.html
Sent from t
Many thanks Jim and Chris for your helpful answers!
J
On Wed, Feb 29, 2012 at 11:48 AM, Chris Campbell <
ccampb...@mango-solutions.com> wrote:
> Hi Jason
>
> If you close an R session and save without choosing a filename, a file
> called .RData will be created. Open a new session and type getwd()
It might be a local network or OS issue: this works fine for me on my
personal Mac
download.file(url = "http://ir.eia.gov/wpsr/psw09.xls";, destfile =
"~/herewego.xls", mode = "wb")
Someone with more Windows knowledge may have to help you out, but
often using IE settings (activated by the setInte
I am running the following line to download data from the US Energy
Information Administration. This function has worked successfully for me in
the past but yesterday gave the error/warning messages below.
If I simply type "http://ir.eia.gov/wpsr/psw09.xls"; (no quotes) into a
browser, the file i
Hello,
jholtman wrote
>
> I have never seen 'break' used in an 'ifelse'; you probably meant to
> use an 'if' statement there.
>
> On Thu, Mar 1, 2012 at 8:24 AM, Tsai, Pei-Chien
> wrote:
>> Dear R helpers,
>>
>> I have some difficulties in using 'break' function with loop,
If I have two factors, v1 and v2 and I want to have a stacked bar graph of
the two variables side by side I could do
barplot(cbind(table(v1),table(v2)))
if v1 and v2 have the same number of categories.
If they don't have the same number of categories this won't work.
I'm sure there's a simple s
Vinicius,
Vinicius Magalhães wrote
>
>
> + n <- length(*x.ts*)
> + for (p in 0:maxord[1]) for (d in 0:maxord[2]) for (q in 0:maxord[3])
> + for (P in 0:maxord[4]) for (D in 0:maxord[5]) for (Q in 0:maxord[6])
> + {
> + fit <- arima(*x.ts*, order=c(p,d,q),
> + seas = list(order=c(P,D,Q),
>
On 12-03-01 8:24 AM, Tsai, Pei-Chien wrote:
Dear R helpers,
I have some difficulties in using 'break' function with loop, and the
followings are my script. What I try to do is (1) permute 'or' first; (2) doing
t-test if this 'or' pass criteria 1 (k=1); (3) end the loop when I get 10
permutati
On 12-02-28 2:11 PM, Chris Hane wrote:
Hello,
I am trying to "paste" together a formula to use in the mob function of
party. This means the formula will be of the form y ~ x1+ ...+xM | z1+..zN.
I am doing some preliminary fits of y ~ x1+ ...+xM, then want to add the
conditional part of the equa
I have never seen 'break' used in an 'ifelse'; you probably meant to
use an 'if' statement there.
On Thu, Mar 1, 2012 at 8:24 AM, Tsai, Pei-Chien
wrote:
> Dear R helpers,
>
> I have some difficulties in using 'break' function with loop, and the
> followings are my script. What I try to do is (1)
1 - 100 of 119 matches
Mail list logo