Dear developers,
I have jutst started working with caret and all the nice features it offers.
But I just encountered a problem:
I am working with a dataset that include 4 predictor variables in Descr and a
two-category outcome in Categ (codified as a factor).
Everything was working fine I got th
plot.spec uses matplot. see ?matplot for default col & lty and use
legend as usual.
P.S. You can add plot=FALSE to spec.pgram to prevent it from plotting
On 08/27/2011 05:39 PM, Peter Maclean wrote:
> How Can I add a legent (showing x1, x2, x3, x4) to the last plot?
> require(TSA)
> require(graph
On Aug 27, 2011, at 8:19 PM, Martin Batholdy wrote:
Hi,
Is it possible to define at which point a line-break is happening in
R-output?
I for example would rather like to scroll horizontally in a data-
frame with a lot of columns
instead of having a lot of breakpoints in the data.frame (t
On Aug 27, 2011, at 3:15 PM, franco salerno wrote:
Hi, I have a problem with the ordered probit model -polr function
(library MASS). My independent variables are countinuos.
I am not able to understand two main points:
a) how to calculate marginal effects
b) how to calculate the relative impor
What is wrong with the getSymbols("IBM") command I originally suggested to
you?
Michael
On Sat, Aug 27, 2011 at 6:23 PM, Yumin wrote:
> Hi Michael:
>
> I installed: install. packages("quantmod") and now it accept
> library(quantmod) sentence. BUT after input:
>
> * co
How Can I add a legent (showing x1, x2, x3, x4) to the last plot?
require(TSA)
require(graphics)
require(stats)
t<-1986:2011
x1<-cos(t*1990/2011)
x2<-cos(t*2000/20011)
x3<-sin(t*1990/2011)
x4<-sin(t*2000/2011)
y<-cbind(t,x1,x2, x3,x4)
y.time = ts(y.time, start=1986, frequency=1)
y.spc<-spec.pgram(y
Hi Michael:
I installed: install. packages("quantmod") and now it accept
library(quantmod) sentence. BUT after input:
* con <- url("http://quote.yahoo.com";)
if(!inherits(try(open(con), silent = TRUE),
"try-error"))
{
All,
Excuse me for being a newbie.
I'm trying to calculate the average silhouette, a measure of cluster
validity.
I've already brought my spss data in. It's 1008 cases with 8 variables, no
missing data. So far I've run this:
> fit <- agnes(mydata, diss= FALSE, metric = "euclidean", stand=FALSE,
Hi,
Is it possible to define at which point a line-break is happening in R-output?
I for example would rather like to scroll horizontally in a data-frame with a
lot of columns
instead of having a lot of breakpoints in the data.frame (to fit the screen).
Can you control that?
Can you tell R t
On 11-08-25 9:52 PM, Seth Schommer wrote:
Dear R-Users,
I think I have encountered a potential bug (or at least unwanted behavior),
but I'm not sure so I wanted to post here first. Lately I've been
I'd say it's a bug with your network setup: when a URL is not found, an
error should be gener
In this case you want to use a 'list' since you want character and
numerics returned:
> JOBSTAT<-rnorm(10)
>
>
> # new function that does not return 'x'
>
> CInew <-function(x,alpha){
+ list(variable = deparse(substitute(x)), mean=mean(x), alpha = alpha)
+ }
>
> CInew(JOBSTAT, 0.05)
$variable
[1]
Factors are you friend here:
> myData
mydate gender mygroup id mygrp.f
1 2012-03-25 F A 1 1
2 2005-05-23 F B 2 2
3 2005-09-08 F B 2 2
4 2005-12-07 F B 2 2
5 2006-02-26 F C 2 3
6 2006-05-13 F
?colorRamp
On Sat, Aug 27, 2011 at 2:07 PM, karthicklakshman
wrote:
> Dear R community,
>
> With an advantage of being "NEW" to R, I would like to post a very basic
> query here,
>
> I am in need of representing gene expression data which ranges from -0.09 to
> +4, on plot "segment". please find
The function is doing exactly what you are telling it to do. You have
'cbind(x, mean(x), alpha)' which is creating a matrix where the first
column is all the values in 'x' and the next two are the recycled
values of mean and alpha. Is this what you want:
> JOBSAT<-rnorm(10)
>
> CI<-function(x,al
Add the following to your script:
options(error=utils::recover)
(actually put it in you Startup script), then learn how to use the
debugging in R.
On the error, this should provide a trace of the stack so that we know
where the error occurs. By learning how to use debug/browser, you
will be abl
First of all, please replace your "=" with "<-" per general R-usage rules.
Next: you need to provide a clear listing of doAirport.R so we can tell
what it actually is, and what you've done outside the function.
That said, my suspicion is that your parent function (the one which
calls doAirpor
- Original Message -
From: Yumin [via R]
To: Yumin
Sent: Saturday, August 27, 2011 3:32 PM
Subject: Re: How download Yahoo Quote?
Hi Michael:
I tried to simplify the code, but still failed.
con <- url("http://quote.yahoo.com";)
if(!
Jim Silverton gmail.com> writes:
>
> Hi all,
>
> I have the following data:
>
> rep1_treat rep2_treat rep1_control rep2_control
> 2 3 4 5
> 100 20 98
Hi everyone,
How does one place an object name (in this case a vector name) into another
object (while essentially masking the values of the first object?
For example:
> JOBSAT<-rnorm(40)
>
> CI<-function(x,alpha){
+ result<-cbind(x,mean=mean(x),alpha)
+ print(result)
+ }
> CI(JOBSAT,.05)
I wan
Did you install the package quantmod?
install.packages("quantmod")
Michael
On Sat, Aug 27, 2011 at 4:32 PM, Yumin wrote:
> Hi Michael:
>
> I tried to simplify the code, but still failed.
>
> *con <- url("http://quote.yahoo.com";)
>if(!inherits(try(open(con), silent
Dear R users,
I am using R right now for a simulation of a model that needs a lot of
memory. Therefore I use the *bigmemory* package and - to make it faster -
the *doMC* package. See my code posted on http://pastebin.com/dFRGdNrG
Now, if I use the foreach loop with the addon %do% (for sequential
Hi Michael:
I tried to simplify the code, but still failed.
*con <- url("http://quote.yahoo.com";)
if(!inherits(try(open(con), silent = TRUE), "try-error"))
{
close(con)
x <- get.hist.quote(instrumen
sum(!is.na(x))
Michael
On Aug 27, 2011, at 4:39 PM, Dan Abner wrote:
> Hello everyone,
>
> What is the most elegant and efficient way to count non-missing values of a
> vector?
>
> Thanks!
>
> Dan
>
>[[alternative HTML version deleted]]
>
> _
Hello everyone,
What is the most elegant and efficient way to count non-missing values of a
vector?
Thanks!
Dan
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do r
In my main R program, I have
source("retaanalysis/Functions/doAirport.R")
stuff to read data and calculate ads
sapply(ads,function(x) {doAirport(x, base)} )
And doAirport has
# analyze the flights for a given airport
doAirport = function(df, base) {
# Get rid of unused runway factor
On Sat, Aug 27, 2011 at 11:07 AM, karthicklakshman
wrote:
> Dear R community,
>
> With an advantage of being "NEW" to R, I would like to post a very basic
> query here,
Really? I found two posts with your name on it dating from October and
November of 2010.
http://r-project.markmail.org/search/?q
Hi, I have a problem with the ordered probit model -polr function
(library MASS). My independent variables are countinuos.
I am not able to understand two main points:
a) how to calculate marginal effects
b) how to calculate the relative importance of each independent variables
If required i will
Dear Jorge
Yes expand.grid() is exactly what I wanted.
This problem keeps cropping up, and I've never known a simple way to implement
it.
Thanks very much.
Regards
Desmond
From: Jorge I Velez [mailto:jorgeivanve...@gmail.com]
Sent: 27 August 2011 19:19
Hi all,
I have the following data:
rep1_treat rep2_treat rep1_control rep2_control
2 3 4 5
100 20 98 54
0 1
x<-letters[1:3]
y<-1:3
d<-expand.grid(x,y)
g<-apply(d,1,function(x) paste(x[1],x[2],sep=""))
HTH,
Daniel
Campbell, Desmond-2 wrote:
>
> Dear R-help readers,
>
> I'm sure this problem has been answered but I can't find the solution.
>
> I have two vectors
> v1 <- c("a","b")
> v2 <- c(1,2,3)
Hi Desmond,
You might try
> sort(apply(expand.grid(v1, v2), 1, paste, collapse = "", sep = ""))
[1] "a1" "a2" "a3" "b1" "b2" "b3"
HTH,
Jorge
On Sat, Aug 27, 2011 at 12:54 PM, Campbell, Desmond <> wrote:
> Dear R-help readers,
>
> I'm sure this problem has been answered but I can't find the so
Dear R community,
With an advantage of being "NEW" to R, I would like to post a very basic
query here,
I am in need of representing gene expression data which ranges from -0.09 to
+4, on plot "segment". please find below the data df, the expression values
are in df[,2]. kindly help me with the co
Hi,
this error message is due to a bug in RaschSampler. I corrected it and sent
it to CRAN. RaschSampler version 0.8-5 should be available from there soon.
Thanks for the hint and please apologize for any inconveniences.
Reinhold
--
View this message in context:
http://r.789695.n4.nabble.com/eR
Dear R-help readers,
I'm sure this problem has been answered but I can't find the solution.
I have two vectors
v1 <- c("a","b")
v2 <- c(1,2,3)
I want an easy way to produce every possible combination of v1, v2 elements
Ie I want to produce
c("a1","a2","a3", "b1","b2","b3")
regards
Desmond
Desmo
On 26.08.2011 19:36, R. Michael Weylandt wrote:
To save anyone else 30 seconds, here's how google translates the below:
Ladies and Gentlemen,
I would like to inform me whether there is the possibility of security
certificates for R packages are.
Impressingly accurate given the original tex
Michael, Michael wrote: "However, this certainly isn't the most useful code
because it clears itself..." If you were to put this code in a package, .Rdata
file, or .First() script it could be recalled in that way. So it could serve a
purpose. The exercise was more about me learning how to app
Michael, Thank you for that information. It was very insightful. Anyone
else with why my second attempt does not work (using eapply)? ThanksTylerFrom:
michael.weyla...@gmail.com
Date: Sat, 27 Aug 2011 12:01:02 -0400
Subject: Re: [R] Make a function work on an environemnt
To: tyler_rin...@ho
Well, here's one way you could do it:
# Don't run this unless you really mean it
clear <- function(){rm(list=ls(.GlobalEnv), envir = .GlobalEnv)}
Both calls to .GlobalEnv seem necessary so that both rm() and ls() go
everywhere with it. However, this certainly isn't the most useful code
because it
Hi guys,
I am having problem loading a package that I have installed. I have searched
some old thread but they were no help in terms of solving the problem.
I uninstalled every possible component of R and installed R 2.13 and
followed the R-faqs installation steps. Then I installed the package (l
Kilo Bismarck web.de> writes:
> i am running an anlysis on proportion data using binomial (quasibinomial
> family) error structure. My data comprises of two continuous vars, body
> size and range size, as well as of feeding guild, nest placement, nest
> type and foragig strata as factors. I ho
On Aug 27, 2011, at 5:31 AM, chuan_zl wrote:
Dear All.
I am Chuan. I am beginner for R.I facing some problem in remove
element from
vector.I have a vector with size 238 element as follow(a part)
[1] 0 18 24 33 44..[238] 255
Let the vector label as "x",I wan
On Aug 27, 2011, at 5:01 AM, dood wrote:
Dear R users,
I have six plots in one figure, created with par(mfrow=c(2,3)). I
would like
to add two lines to the figure outside the plotting regions,
separating the
figure into 3 columns. Is this possible?
The xpd parameter used with the segmen
Please fix your email settings: your 'From:' field is not in the
correct encoding, so I had to manually copy the ASCII part. (The
header as received here said it was UTF-8, but it is not valid UTF-8.
Most likely no encoding was declared your end.)
On Sat, 27 Aug 2011, Marcin Pciennik wrote
A previous attempt at this question resulted in the message running together,
making the message difficult to read and the code lines hard to distinquinsh.
In my R learning I've come across a situation in which a piece of code that
works on the work space outside a function does not work inside
Not sure whether I understand your question right but here is what I would do:
# Sample data
x <- seq( 1, 100, by=6)
x
[1] 1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 97
# remove element with value 19
x <- x[ x != 19 ]
x
[1] 1 7 13 25 31 37 43 49 55 61 67 73 79 85 91 97
If you want to r
Many thanks for taking the time to read this!
I am looking at the repeatability of behaviour between re-sighted
individuals across discrete time periods (annual breeding seasons). My
approach was to run a GLM (with a logit link - the data are proportional,
presence v. absence of behaviour) for ea
Dear R users,
I have six plots in one figure, created with par(mfrow=c(2,3)). I would like
to add two lines to the figure outside the plotting regions, separating the
figure into 3 columns. Is this possible?
Thanks
--
View this message in context:
http://r.789695.n4.nabble.com/separate-mfrow-re
The source code to a new package, rmongodb (http://cnub.org/rmongodb.ashx),
has just been released. This is a full-featured driver to MongoDB (
http://www.mongodb.org) for the R language. Just out of development, I
would like some feedback from some real world usage before submitting the
package
i have this data with me...i am only copying part of data here...
date time
"2011-05-23""04:31:17"
"2011-05-23""04:31:20"
"2011-05-23""04:31:22"
"2011-05-23""04:31:25"
"2011-05-23""04:31:27"
"2011-05-23""04:31:18"
"2011-05-23""04:31:20"
"2011-05-23"
Dear All.
I am Chuan. I am beginner for R.I facing some problem in remove element from
vector.I have a vector with size 238 element as follow(a part)
[1] 0 18 24 33 44..[238] 255
Let the vector label as "x",I want remove element "0" and "255".I try use
such functi
Dear list members,
I have 982 quotations of a given stock index and I want to run a Ljung-Box
test on these data to test for autocorrelation. Later on I will estimate 8
coefficients.
I do not know how many degrees of freedom should I assume in the formula for
Ljung-Box test. Could anyone tell me p
On Sat, Aug 27, 2011 at 7:26 AM, Andra Isan wrote:
> Hi All,
>
> I have a data frame as follow:
>
> user_id time age location gender
> .
>
> and I learn a logistic regression to learn the weights (glm with family=
> (link = logit))), my response value is either zero or one. I would like to
>
dear list!
i am running an anlysis on proportion data using binomial (quasibinomial
family) error structure. My data comprises of two continuous vars, body
size and range size, as well as of feeding guild, nest placement, nest
type and foragig strata as factors. I hope to model with these varia
53 matches
Mail list logo