Hi,
Another way would be:
dat11 - transform(dat[rep(1:nrow(dat),each=12),1:2],
weekdatesunday=rep(0:11,3), RevenueWeekN00=as.vector(t(dat[,-c(1:2)])))
row.names(dat11) - 1:nrow(dat11)
dat22 - unsplit(lapply(split(dat11,
with(dat11,list(customer_id,CountryName)),drop=TRUE),function(x) {m1 -
Hi,
It is better to use ?dput() to show the data.dput(dataset)
dat -
structure(list(customer_id = c(8L, 33L, 12L), CountryName = c(US,
CA, UK), RevenueWeekN00 = c(2.28, 0, 30.18), RevenueWeekN01 = c(9.57,
14.69, 43.9), RevenueWeekN02 = c(7.54, 3.31, 90.4), RevenueWeekN03 = c(8.99,
5.21, 45),
On Mon, 10 Mar 2014 18:26:38 + William Dunlap wdun...@tibco.com wrote
You probably want to read the Introduction to R that comes with R
(menu: HelpManuals (in PDF)Introduction to R).
When I first started using R I found it easier to work through some of the
contributed documentation.
Hello,
And what are you expecting the command setwd to do?
Regards,
Pascal
On Mon, Mar 10, 2014 at 5:59 PM, Jon Nash jon.n...@hvhs.school.nz wrote:
I have just installed R 3.0.3 on Windows 7.
I open up the GUI and type setwd(c:/users/jon) and press return. Nothing
happens, Ive tried
Hello,
The function setwd returns the previous working directory invisibly so
nothing happens might mean that there is no apparent feedback. You can
see if it changed the wd with getwd().
Hope this helps,
Rui Barradas
Em 10-03-2014 10:58, Pascal Oettli escreveu:
Hello,
And what are you
I open up the GUI and type setwd(c:/users/jon) and press return. Nothing
happens
Does nothing happens mean that R does not even print , prompting you
to enter more input?
Did you get such a prompt before typing setwd(...)?
What does typing
5:2
cause R to do?
Bill Dunlap
TIBCO Software
Software
wdunlap tibco.com
From: Jon Nash [mailto:jon.n...@hvhs.school.nz]
Sent: Monday, March 10, 2014 11:14 AM
To: William Dunlap
Subject: Re: [R] R Help
Hi Bill,
I start with a prompt
I type the command in the syntax that appears to be correct
I immediately get a prompt back
I type getwd and get
Hello,
It's better to keep this on the list, the odds of getting more and
better answers are greater.
You need to type getwd() with the parenthesis and no arguments. It
always returns something (the current wd).
Rui Barradas
Em 10-03-2014 18:00, Jon Nash escreveu:
Hi Rui,
Nothing of value
Hi,
If there are multiple max values, you will get only the first value with
?which.max().
Using dataset `a` as an example:
a - structure(list(`1` = c(Mal, Mahesh, Tarak, Pawan, Charan,
Prabhas, Arjun, Naresh, Nithin, Puri), `2` = 1:10,
`3` = c(Layer, Actor, Actor, Actor, Actor, Actor,
Hi,
Check the ?str() of my.table.
library(XML)
u='http://www.ininternet.org/calorie.htm'
tables1 = readHTMLTable(u)
my.table1=tables1[[9]]
with(my.table1,mean(PROTEINE))
#[1] NA
#Warning message:
#In mean.default(PROTEINE) :
# argument is not numeric or logical: returning NA
str(my.table1)
On Feb 16, 2014, at 11:54 PM, Michał Wajszczuk wrote:
Hi,
I just download R and R-studio. I have one problem and i can't make through
it. I'm trying to use help function in R-studio but after typing something,
error appears. I already searched in web and asked my friends but no
one can
Hi,
My solution was based on the input dataset you showed. If xy@12_g.com is
xy1...@gmail.com (or both of them exist in the dataset?? Not clear!)., then
try:
dat - read.table(text=Emails
mal...@gmail.com
mah...@gmail.com
x...@gmail.com
ravi_...@yahoo.com
lavk@rediff.com
Hi,
YOu could use ?cut().
dat2 - read.table(text=1 2
Mal 1
Ram 1000
Ramesh 12344,sep=,header=TRUE,stringsAsFactors=FALSE,check.names=FALSE)
res -
setNames(as.data.frame(table(cut(dat2[,2],breaks=c(0,1000,10),labels=c(0-1000,1000-10,c(Bins,count))
res
#
Hi,
The pattern is not very clear.
Try:
dat - read.table(text=Emails
mal...@gmail.com
mah...@gmail.com
x...@gmail.com
ravi_...@yahoo.com
lavk@rediff.com
xy@12_g.com,sep=,header=TRUE,stringsAsFactors=FALSE)
vec1 -
gsub(\\.[[:alnum:]]+$,,gsub(^([[:alpha:]]+)(\\d+.*),\\1_\\2,dat$Emails))
Hi,
If there are multiple max values, you will get only the first value with
?which.max().
Using dataset `a` as an example:
a - structure(list(`1` = c(Mal, Mahesh, Tarak, Pawan, Charan,
Prabhas, Arjun, Naresh, Nithin, Puri), `2` = 1:10,
`3` = c(Layer, Actor, Actor, Actor, Actor, Actor,
HI,
I am not sure this is what you meant.
a - read.table(text=1 2 3 4 5 6
1 Mal 1 Layer 22 M 10
2 Mahesh 2 Actor 45 M 15000
3 Tarak 3 Actor 30 M 15000
4 Pawan 4 Actor 47 M
Hi,
Try:
dat - read.table(text=Emails
mal...@gmail.com
mah...@gmail.com
x...@gmail.com
ravi_...@yahoo.com
lavk@rediff.com
xy@12_g.com,sep=,header=TRUE,stringsAsFactors=FALSE)
vec1 -
gsub(\\.[[:alnum:]]+$,,gsub(^([[:alpha:]]+)(\\d+.*),\\1_\\2,dat$Emails))
indx1 -
Hi,
May be this helps:
dat - read.table(text=Emails
mal...@gmail.com
mah...@gmail.com
ravi_...@yahoo.com
lavk@rediff.com,sep=,header=TRUE,stringsAsFactors=FALSE)
Hi,
If you have .edu, .gov etc.
dat - structure(list(Emails = c(mal...@gmail.com, mah...@gmail.com,
ravi_...@yahoo.com, lavk@ufl.edu)), .Names = Emails, class =
data.frame, row.names = c(NA,
-4L))
res -
Dear R Users,
I'm searching for a Self Start function for Weibull function (3 parameters).
Somebody can help?
Cheers,
Vasco Cadavez
On 14/01/14 11:00, r-help-requ...@r-project.org wrote:
Send R-help mailing list submissions to
r-help@r-project.org
To subscribe or unsubscribe
Hello,
Maybe function ?SSweibull in package stats.
Hope this helps,
Rui Barradas
Em 14-01-2014 18:29, Vasco Cadavez escreveu:
Dear R Users,
I'm searching for a Self Start function for Weibull function (3
parameters).
Somebody can help?
Cheers,
Vasco Cadavez
On 14/01/14 11:00,
On Jan 14, 2014, at 10:29 AM, Vasco Cadavez wrote:
Dear R Users,
I'm searching for a Self Start function for Weibull function (3 parameters).
Have you looked at:
?selfStart # be sure to look at the links in the See Also section
--
David
Somebody can help?
Cheers,
Vasco
works ok with mock-up data. Can you give some code to reproduce this error?
kamil
On 2013-11-15 11:00, r-help-requ...@r-project.org wrote:
Message: 56
Date: Thu, 14 Nov 2013 18:01:27 -0800
From: Lilly Dethierlillydeth...@gmail.com
To:r-help@r-project.org
Subject: [R] Error in MuMIn models
On Nov 6, 2013, at 10:07 AM, Henderson, Robin Michelle wrote:
Hi,
I am a graduate student applying published R scripts to compare the
classification accuracy of 2 predictive models, one built using discriminant
function analysis and one using random forests (webpage link for these
On 11/07/13 10:57, David Winsemius wrote:
SNIP
I think you need to add a statistician to your committee. The
difficulties you are facing (of which you appear to be unaware) are
not just related to being new to R.
SNIP
Fortune?
cheers,
Rolf
Second (perhaps with the slight addition indicated)
-- Bert
... And **amen!** to the sentiment expressed.
On Wed, Nov 6, 2013 at 2:08 PM, Rolf Turner r.tur...@auckland.ac.nz wrote:
On 11/07/13 10:57, David Winsemius wrote:
SNIP
I think you need to add a statistician to your [PhD]
Pavlos,
There are several ways to evaluate how well new data fit an old
regression.Part of the answer depends on what you are concerned about. For
example, if you are concerned about bias, you can test whether the mean of
the new data is within the expected range of the mean of that many new
Re: Heteroscedasticity and mgcv. (Collin Lynch)
The GAMLSS package can model heterogeneity in the scale parameter (e.g.
standard deviastion) [and also heterogeity in skewness and kurtosis
parameters].of the response variable distribution.
For parametric models a generalized likelihood ratio
hi john. I knew it wasn't that simple and was thinking of asking you to
comment. so thanks for commenting. any good references are appreciated
also. In the various texts I have, this issue is seldom talked about.
On Mon, Oct 21, 2013 at 8:43 AM, Prof J C Nash (U30A) nas...@uottawa.cawrote:
Why? I assume you posted because you want help with something, but it is going
to be very difficult to help if you don't know the most basic things about R or
this mailing list.
Spreadsheet: R can import data from a spreadsheet, but the corresponding native
terminology in R is data.frame or
Hi,The conditions are not very clear.
set.seed(285)
RN - sample(1:100,20,replace=FALSE)
aList - lapply(1:10,function(i) sample(RN,i,replace=FALSE))
sapply(aList,tail,1)
# [1] 87 60 96 87 60 67 42 96 73 24
A.K.
I was wondering if I could obtain some help on how to do this.
I feel as if
Hi,
(Please use ?dput() to share the example dataset. Avoid using images to show
dataset. Also, please read the posting guide esp. regarding home work,
assignments etc.)
res - sapply(Gene[,-1],function(x) tapply(x,list(Gene$Genotype),mean))
#or
res2 - aggregate(.~Genotype, data=Gene,mean)
Hi,
Try:
Gene[,-1] - lapply(Gene[,-1],function(x) {x[sample(length(x),1)] - NA;x})
A.K.
I got it guys
MeanofGenotype -sapply(2:8, function(k) tapply(Gene[,k] , Gene$Genotype,
mean))
I was wondering if now you guys can help me on how to insert a random NA to
each column.
The question is
Hi Peter,
The ssconvert tool (part of gnumeric) is very good at converting spreadsheets
to csv-files.
There is a wrapper in the gnumeric package on cran.
Cheers,
Thomas
Date: Fri, 4 Oct 2013 09:08:50 +0100
From: Barry Rowlingson b.rowling...@lancaster.ac.uk
To: Peter Maclean
Hello,
Please stop to use R help for the subject of your mail. You already used
it several times.
You have been asked to stop to send e-mail in HTML.
You also have been asked to use dput() when you want to submit data to this
list.
For the current problem, there is no reproducible code, as it
Hi,
I was using R arima and the results are stored. If I
need to print , is there a way to print the coeficient names
spd.ar2ma1=arima(spd_a,order=c(2,0,1))
write.table(sprintf(%s,%6.3f,spd.ar2ma1$coef),file='arma_results.txt',eol
HI,
May be this helps:
library(Ckmeans.1d.dp)
set.seed(24)
RanNum1-runif(20,9,12)
Ck1-Ckmeans.1d.dp(RanNum1,4)
plot(RanNum1,col=Ck1$cluster)
abline(h=Ck1$centers,col=1:4,pch=8,cex=2)
Ck1$cluster
# [1] 2 2 3 3 3 4 2 4 4 2 3 2 3 3 2 4 2 1 3 1
which(Ck1$cluster==2,arr.ind=T)
#[1] 1 2 7
Dear Salaam,
In your ARIMA (2,3,0), you are telling R you are saying that the order of
differencing is 3. Have you chequed that you actually differenced the
series with d = 3?
Regards,
2013/8/5 Salaam Batur swordligh...@gmail.com
Dear R users,
I picked up ARIMA(2,3,0) model for my time
Hi,
My question is how to make panel sizes variable in box plots. I mean if a panel
has 10 box plots and another has only two, I need to make the later panel
thinner than the first.
Regards,
Fayez
Grad Student
UIUC, USA
__
R-help@r-project.org
Hi Darren,
Take a look at the effects package. The documentation is good and
these articles will help you get oriented:
http://www.jstatsoft.org/v08/i15 http://www.jstatsoft.org/v32/i01
Best,
Ista
On Thu, Aug 1, 2013 at 1:56 AM, Darren Andrew Whitehead
darrenwhitehe...@hotmail.com wrote:
Hello
On 07/31/2013 10:03 PM, Mª Teresa Martinez Soriano wrote:
Hi
First of all, thanks for this service, it is being very useful for me. I am new
in R so I have a lot of doubts.
I have to do imputation in a data set, this is a sample of my data set which
looks like:
NUMERO Data1
Hi
It would be better if you provided either str(yourdata) or dput(yourdata)
(or a part illustrating those 2 kinds of missing values)
Anyway I would use NA for missing and some other identifier for empty.
temp
a b c
1 1 empty
2 NA filled xx
3 2 filled xx
is.na(temp)
a
Vallejo, Roger roger.vall...@ars.usda.gov asked:
I would like to know if we can estimate Rg between two binary traits
(disease status: alive vs. dead) with the R package.
My data: we have 100 full-sib (FS) families,
and two random samples (each with n= 200 FS fish) from each FS family
were
And it could be that you should try nlmrt or minpack.lm.
I don't think you were at my talk in Jena May 23 -- might have been very
helpful to you.
JN
On 13-06-20 06:00 AM, r-help-requ...@r-project.org wrote:
Message: 47
Date: Wed, 19 Jun 2013 13:17:29 -0500
From: Adams, Jeanjvad...@usgs.gov
Folks,
Sorry for butting in here. I ran the code from John Kane below and it worked
fine.
I did however get a deprecation message suggesting the use of ggpairs from the
GGally package to make this chart.
Unfortunately I haven't found the correct incantation to get the diagonal to
display
Dear R-User,
Appreciate any helps.
Given that I have a dataframe of tree population with three variable:
sp=species ,
d0=initial_size
grow=growth increment from initial size per year
How can I calculate the future growth of each tree for the next 10 years.
The following Rscript was written,
Dear R users,
I am stuck here: My first function returns a vector of 5 values.
In my second function, I want to repeat this, a number of times, say 10
so that I have 10 rows and five columns but I keep on getting errors.
See the code and results below:
optm -function(perm, verbose = FALSE)
{
On 07-06-2013, at 10:59, Laz lmra...@ufl.edu wrote:
Dear R users,
I am stuck here: My first function returns a vector of 5 values.
In my second function, I want to repeat this, a number of times, say 10
so that I have 10 rows and five columns but I keep on getting errors.
See the code
Dear Berend,
For reproducibility,
Rspatswap() is a function which originally returns a single value. For
example Rspatswap(...) and you get 0.8
So, run Rspatswap() 20 times and store all the values.
Then from these 20 values, calculate the calculate average,
sd,se,min,max to get something
Hi,
I am almost getting there, but still have errors. Thanks for your help.
I have tried improving but I get the following errors below:
itn-function(it){
+siml-matrix(NA,ncol=5,nrow=it)
+for(g in 1:it){
+siml[g]-optm(perm=20)[g]
+}
+siml
+}
itn(3)
[,1] [,2] [,3] [,4] [,5]
[1,]
On 07-06-2013, at 11:57, Laz lmra...@ufl.edu wrote:
Dear Berend,
I have made some changes but I still get errors:
For reproducibility,
Rspatswap() is a function which originally returns a single value. For
example Rspatswap(...) and you get 0.8
So, run Rspatswap() 20 times and
Please, please do not use html formatted mail.
It is clearly requested by the mailing list
The code of your last mail is a mess and when replying it becomes even more of
a mess.
I told you to do
siml[g,] - optm(perm=20)
See the comma after g.
and not what you are now doing with
Is this what you want? I was not clear on your algorithm, but is looks
like you wanted descending values:
testx -
+ function(n, verbose = FALSE)
+ {
+ mat - cbind(optA = sample(n, n, TRUE), perm = seq(n))
+ if (verbose){
+ cat(***starting matrix\n)
+ print(mat)
+ }
+
Hi all are there any R packages that include circular stats similar to
Oriana (http://www.kovcomp.co.uk/oriana/newver4.html)?
I am interested in looking at annual patterns of bat activity where data
will have date/times and relative abundance values for each Date.
I would like to have a
On 05/27/2013 10:28 AM, Neotropical bat risk assessments wrote:
Hi all are there any R packages that include circular stats similar to
Oriana (http://www.kovcomp.co.uk/oriana/newver4.html)?
I am interested in looking at annual patterns of bat activity where data
will have date/times and
Hello, James,
see my comments inline.
... Main issue/question: In R the nparLD ANOVA-type Test showed a
significant p-value for diel period, no effect of season, and no
interaction between diel period and season. But a post-hoc Wilcoxon
Signed-Rank Test did NOT find a significant difference
HI,
You could use:
(# with 3 files in my folder)
lfiles-list.files(pattern=.txt)
lfiles
#[1] file1.txt file2.txt file3.txt
lst1-lapply(lfiles,function(x)
read.table(x,header=TRUE,sep=,stringsAsFactors=FALSE))
lst1
#[[1]]
# col1 col2
#1 1 0.5
#2 2 0.2
#3 3 0.3
#4 4 0.3
#5 5
On Wed, 15 May 2013, Jonathan Dry dry...@gmail.com writes:
*
I am currently reading in a series of files, applying the same functions to
them one at a time, and then merging the resulting data frames e.g.:
MyRows - c(RowA, RowB, RowC)File1_DF -
Hi Arun,
I am still facing trouble as I can see the data output is identical for
all rows when I am using this merge function. It seems that since in my
data2 which I have provided I have not given you the exact genes I have.
There are likely to be repeatations of ID in both the files but the
Hi Vivek,
May be this helps:
set.seed(35)
dat1- cbind(ID=1:8,
as.data.frame(matrix(sample(1:50,8*7,replace=TRUE),ncol=7)))
set.seed(38)
dat2- cbind(ID= sample(1:20,8,replace=FALSE),
as.data.frame(matrix(sample(1:50,8*33,replace=TRUE),ncol=33)))
colnames(dat2)[-1]-gsub(V,X,colnames(dat2)[-1])
HI Arun,
My data sets are as in the provided files. I am providing the sample files.
I guess this will give a better idea to the type of working I want to do
with the two files and the kind or script am trying to write. Hope you can
give me some suggestions regarding this. I am new to R so having
HI,
Assuming that out_dat.txt is the output you expected.
dat1- read.table(data1.txt,header=TRUE,stringsAsFactors=FALSE)
dat2- read.table(data2.txt,header=TRUE,stringsAsFactors=FALSE)
out_dat- read.table(out_data.txt,header=TRUE,stringsAsFactors=FALSE)
out_dat2-merge(dat1[,1:4],dat2,by=ID)
This comes up regularly. Type ?print.survfit and look at the comments there under
value.
Terry T.
- begin included message
Hi,
I'm not sure if this is the proper way to ask questions, sorry if not. But
here's my problem:
I'm trying to do a bootstrap estimate of the
Thank you Jason! actually, there have been two solutions and one is yours
setting row.names=F works great, additionally what Ive been having problems
with is the European version of Word 2010. Apparently it sets delimiters of
; instead of , as in the English/USA version. This is something
On 3/26/2013 7:21 AM, Kerry wrote:
Thank you Jason! actually, there have been two solutions and one is yours
setting row.names=F works great, additionally what Ive been having problems
with is the European version of Word 2010. Apparently it sets delimiters of
; instead of , as in the
On R 2.15.2 and ArcGIS 9.3.1, it works for me in ArcCatalog but you have to
follow the particulars here:
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Accessing_delimited_text_file_data
For example:
write.table(test, '***.tab', sep = '\t', row.names = F)
The extension .tab and
If you just want point forecasts, it's simple:
Let your original series be X_t, t=1, ..., N.
Let Y_t = log(X_t).
Let Z_t = Y_t - Y_{t-1}, t = 2, ..., N.
Fit your model and forecast, obtaining Z-hat__1, ..., Z-hat_10.
Then Y-hat_{N+1} = Y_N + Z-hat_1, Y-hat_{N+2} = Y-hat_{N+1} + Z-hat_2,
.,
The searchable archives may lag, and apparently do. The main list
archive is here:
https://stat.ethz.ch/pipermail/r-help/
and is complete. That's the one to check if you wish to know whether
something made it to the list.
If you go to the r-help listinfo link in the mailing list footer, you
are
On 01/30/2013 10:28 AM, Sarah Goslee wrote:
The searchable archives may lag, and apparently do. The main list
archive is here:
https://stat.ethz.ch/pipermail/r-help/
and is complete. That's the one to check if you wish to know whether
something made it to the list.
If you go to the r-help
I don't know of one. If building your own you could use rpart with the maxdepth=1 as
the tool to find the best split at each node.
Terry Therneau
On 12/20/2012 05:00 AM, r-help-requ...@r-project.org wrote:
Hi,
I've searched R-help and haven't found an answer. I have a set of data from
On Nov 23, 2012, at 1:14 PM, prasmas wrote:
Hi,
I am new to R. I am trying to regroup data frame using multiple
constrains.
for example
data frame: data
value class percent
15526 36 4.6875
15527 62 85.9375
15527 82 32.4564
15528 36 70.3125
15528 62
Hello,
Like the following?
dat - read.table(text=
value class percent
15526 36 4.6875
15527 62 85.9375
15527 82 32.4564
15528 36 70.3125
15528 62 9.375
15528 82 74.6875
, header = TRUE)
per70 - dat$percent 70
split(dat, list(dat$class, per70))
Hope this helps,
Rui Barradas
Em 23-11-2012
, 2012 7:40 PM
Subject: Re: [R] R help..subsetting data frame that meeting multiple
criteria
On Nov 23, 2012, at 1:14 PM, prasmas wrote:
Hi,
I am new to R. I am trying to regroup data frame using multiple
constrains.
for example
data frame: data
valueclasspercent
1552636
HI,
You could also try this:
dat - read.table(text=
value class percent
15526 36 4.6875
15527 62 85.9375
15527 82 32.4564
15528 36 70.3125
15528 62 9.375
15528 82 74.6875
15529 72 50.
15530 72 50.
, header = TRUE)
mat1-as.matrix(dat)
74.6875
A.K.
- Original Message -
From: David Winsemius dwinsem...@comcast.net
To: prasmas prasad...@gmail.com
Cc: r-help@r-project.org
Sent: Friday, November 23, 2012 7:40 PM
Subject: Re: [R] R help..subsetting data frame that meeting multiple criteria
On Nov 23, 2012, at 1:14 PM
On Nov 5, 2012, at 11:24 AM, Christophe Genolini cgeno...@u-paris10.fr wrote:
Hi the list,
I have some basic questions about writing a package. On which list shall I
post them?
Theoretically, I am supposed to post them on r-devel, but all the questions
on this list are very
advance
Hi Libby,
You had an accumulation of small errors, from an extra ) to an unclear
understanding of how indexing works in R. Also, you shouldn't call
your dataframe df, or use square brackets in column names.
That said, what about:
sampledata - structure(list(A = c(1L, 1L, 1L, 2L, 2L, 2L, 3L,
Gertken libb...@utexas.edu
Cc: r-help@r-project.org
Sent: Thursday, October 4, 2012 4:03 PM
Subject: Re: [R] R help - Adding a column in a data frame with multiple
conditions
Hi Libby,
You had an accumulation of small errors, from an extra ) to an unclear
understanding of how indexing works in R
Hello Amelie,
I don't have an answer to your question, but I just wanted to point out
this page I noticed recently (
http://hlplab.wordpress.com/2009/05/07/multinomial-random-effects-models-in-r/),
which might be helpful.
I'm also interested in figuring out how to do a multinomial glmm, so if
On Sun, Aug 12, 2012 at 10:58 PM, Louise Cowpertwait
louisecowpertw...@gmail.com wrote:
Hi there,
I have subscribed to R-help but am not sure how to view or post questions? I
think this is the right way.
Indeed!
I am planning on doing a multivariate regression investigating the
There seem to be too many quotes in your error message... the path and name of
the program should be quoted, the argument should not (or should be separately
quoted).
500M isn't especially large these days... be sure to check your existing
(default) value using the memory.limit() function
Please continue to include the r-help list in the conversation... you will most
likely get your solution quicker.
Why do you have double backslashes? That is needed within R, but not at the
command line or in a shortcut.
On Sun, Aug 5, 2012 at 4:49 PM, Douglas Karabasz
doug...@sigmamonster.com wrote:
I have a xts object made of daily closing prices I have acquired using
quantmod.
Here is my code:
library(xts)
library(quantmod)
library(lubridate)
# Gets SPY data
getSymbols(SPY)
# Subset Prices
On Mon, Aug 6, 2012 at 4:30 PM, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
On Sun, Aug 5, 2012 at 4:49 PM, Douglas Karabasz
doug...@sigmamonster.com wrote:
I have a xts object made of daily closing prices I have acquired using
quantmod.
Here is my code:
library(xts)
Hello,
Inline
Em 31-07-2012 02:59, Wellington Silva escreveu:
Ok,
This really helped.
You've probably noticed, I'm a begginer using R.
And when you said that you tried with rnorm and the counts were not zero,
where did you use the rnorm?
Where the runif is, in its stead use
matrix(
Hello,
Glad it helped.
E fico à espera do relatório.
Rui Barradas
Em 31-07-2012 14:40, Wellington Silva escreveu:
Rui,
This is a cientific initiation program.
The idea is to develop a code which can simulate data and calculate the ARL
later.
*So, a little bit later yesterday night, after
Hello,
Your code example doesn't make much sense, it needs decrypting. Let's see,
for(k in 1:length(c1)){
if(c1[k] lcl | c1[k] ucl) {do something}
}
If this is it, then you can completely avoid the loop:
i1 - c1 lcl | c1 ucl # create an index vector
out.of.control - c1[ i1 ]
Hello,
Try the following.
# make up some data
dds - 1e3
nc - 10
xss - data.frame(matrix(runif(nc*dds, min=-1, max=1), ncol=nc))
names(xss) - paste0(xs, 1:10)
# two functions with descriptive names
getControlLimits - function(x, L = 3){
mu - mean(x)
sigma - sd(x)
c(lcl = mu -
Hi,
I'm using write.table() to export dataframe to Excel. All works fine except
that I want to export the variable labels instead of variable names.
I can see the labels in the R consol using attr(), but I just don't know how
to use the labels instead of the names.
Thanks,
François
https://stat.ethz.ch/mailman/listinfo/r-help
at the bottom…
On 16.07.2012, at 10:52, Sébastien Morant wrote:
hi
would you please remove my email from the mailing list.
thanks in advance
Sebastien
[[alternative HTML version deleted]]
__
On 16/07/2012, r-help-requ...@r-project.org
r-help-requ...@r-project.org wrote:
--
Message: 77
Date: Mon, 16 Jul 2012 10:48:39 +0100
From: Rui Barradas ruipbarra...@sapo.pt
To: e-letter inp...@gmail.com
Cc: r-help@r-project.org
Subject: Re: [R] histogram of
http://www.ncbi.nlm.nih.gov/pubmed/21418051 for the full reference.
I don't have an electronic copy, but I do have that issue of Biometrics
in my office. I'll have a copy sent over.
Terry
On 07/10/2012 04:08 PM, r-help-requ...@r-project.org wrote:
Send R-help mailing list submissions to
Hello,
You can find some hints there:
http://geography.uoregon.edu/geogr/topics/index.html
Regards
Le 12/06/28 14:26, iverson a écrit :
Hi guys
i need some help to build choropleth.
Basically i am trying to colour regions on the map by population.
I possess the shape file of the country,
On 06/28/2012 03:26 PM, iverson wrote:
Hi guys
i need some help to build choropleth.
Basically i am trying to colour regions on the map by population.
I possess the shape file of the country, and also the population data,
however, i am having trouble to create the plot, below is my code:
While lm() is a linear modeling, the constraints make it easier to solve with a
nonlinear
tool. Both my packages Rvmmin and Rcgmin (I recommend the R-forge versions as
more
up-to-date) have bounds constraints and masks i.e., fixed parameters.
I am actually looking for example problems of this
Rich,
The documentation for cenboxplot states that the second argument must be
logical and not integer. the function cenboxplot substitutes synthetic
values for censored values using ros, hence the error message from the ros
method.
I also do not understand how you expect group = 'SO4' to
So long as x is a character vector, I tend to use the following for this
problem.
x - c(12/31/11 23:45, 1/1/12 2:15)
x.split - strsplit(x, )
x.date - sapply(x.split, function(y) return(y[1]))
x.time - sapply(x.split, function(y) if (length(y) 1) return(y[2]) else NA)
x.date
[1]
On May 3, 2012, at 14:05 , Nutter, Benjamin wrote:
So long as x is a character vector, I tend to use the following for this
problem.
x - c(12/31/11 23:45, 1/1/12 2:15)
x.split - strsplit(x, )
x.date - sapply(x.split, function(y) return(y[1]))
x.time - sapply(x.split, function(y) if
Hi
I would convert it to propper date format and then you can extract
anything.
dat-strptime(12/31/11 23:45, format=%m/%d/%y %H:%M)
as.Date(dat)
[1] 2011-12-31
format(dat, %H:%M)
[1] 23:45
Regards
Petr
Hello there, I was wondering if you could help me with a quick R issue.
I have a
Hi Alex,
Here is one way:
s - 12/31/11 23:45
strsplit(s, )[[1]]
# [1] 12/31/11 23:45
*
HTH,
Jorge.-
*
On Wed, May 2, 2012 at 4:00 PM, Alex Roth wrote:
Hello there, I was wondering if you could help me with a quick R issue.
I have a data set where one of the columns has both date and
101 - 200 of 481 matches
Mail list logo