On Fri, Apr 06, 2012 at 10:25:15AM -0700, ens wrote:
> > a<-sample(1:6,100,replace=T)
> > a
> [1] 2 4 3 4 5 1 3 2 4 3 6 6 2 6 2 1 5 5 3 4 6 1 6 6 3 4 6 6 4 4 5 4 6 5 6
> 3 4 5 6 3 4 1 6 6 6 4 2 1 1 3 1 5 3 2 2 6 2 5
> [59] 2 6 1 6 1 1 6 4 4 2 2 3 4 5 6 1 6 4 6 1 5 1 1 2 1 3 4 4 6 3 1 4 1 1 1
> 5
On 06/04/2012 19:38, Michael Figiel wrote:
Hello,
the "R Installation and Administration" handbook states in Section C 5.1:
For ‘amd64’ the builds have failed to complete in several different
ways, currently with relocation errors for libRblas.so.
To fix it: add '-shared' to the SHLIB_LDFLAGS, S
newbie to R, less than a week, and I ordered some books about R, but I learn
better by examples.. and thus far I cant find a good example of what I am
trying to do... which follows:
assuming one is using any instrument intra-day data... I want to..
open a file (lets name it signal) that will cont
Dear All,
I would like to make a quadratic with a plateau model in R. Is there a
package in R doing this? The bentcableAR package seems won't work.
The link below describes what I am looking for in R exactly:
http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_
i am trying to replicate the following graph using xyplot :
attach(x)
plot ( jitter(type), mortality, pch=16, xlim = c(0.25, 3.75))
lines ( c(1-0.375,1.375) , c ( median(mortality[type==1]),
median(mortality[type==1])), lwd=5,col=2)
lines ( c(2-0.375,2.375) , c ( median(mortality[type==2]),
media
Hello,
>
> I maybe missing something but this seems like an indexing problem
> which doesn't require a loop at all.
>
Yes, but with 'order'.
# Original example
input <- as.matrix(data.frame(a=c(5,1,3,7), b=c(2,6,4,8)))
(input)
desired.result <- as.matrix(data.frame(a=c(100,0,100,0), b=c(0,100,
Hello,
Oops!
What happened to the function 'f'?
Forgot to copy and pasted only the rest, now complete.
f <- function(x){
nr <- nrow(x)
result <- matrix(0, nrow=nr, ncol=ncol(x))
colnames(result) <- colnames(x)
inp.ord <- order(x)[1:nr] - 1 # Keep only one per ro
Hi,
The compute.es package is great for calculating estimated effect size.
However, it is limited to tests that have independent groups (i.e.,
independent samples t-test, ANOVA). Are there any other packages available
for download that can handle estimating effect sizes for repeated-measures
ANOVAs
I completely agree that the development of full-information maximum
likelihood (FIML) estimation for use in packages like lm, lme, lmer, etc.
would make R much more attractive. FIML is better than other approaches to
missing data (e.g., multiple imputation; see Graham, Olchowski, & Gilreath,
2007)
Hi
I have a dataset with a date variable.
There may be more than one Date Range. i've to create 1 for the dateRange
and 0 for the other.
Please can any one help in this
-
Thanks in Advance
Arun
--
View this message in context:
http://r.789695.n4.nabble.com/creating-the-variable-f
Hello,
the "R Installation and Administration" handbook states in Section C 5.1:
For ‘amd64’ the builds have failed to complete in several different
ways, currently with relocation errors for libRblas.so.
To fix it: add '-shared' to the SHLIB_LDFLAGS, SHLIB_CXXLDFLAGS and
SHLIB_FCLDFLAGS befo
The CPU time and elapsed time are essentially identical. (That is, the
system time is negligible.)
Using Rprof, I just ran the code twice. The first time, while
randomForest is doing its thing, there are 850 consecutive lines which
read:
".C" "randomForest.default" "randomForest" "randomForest.fo
Yes, I just tried the length() function and it worked beautifully.
Thank you.
On 4/5/2012 6:01 PM, William Dunlap wrote:
I think you are looking for the function called length(). I cannot recreate
your output, since I don't know what is in NZ_Conifers, but with the built-in
dataset mtcars I ge
Hi,
I intend to use the BiodiversityR package to perfom community analyses. I
will do ordination analyses and diversity comparisons (e.g. accumulation
curves, etc.).
I have repeated measures of plots and want to control for it when performing
analyses. I have not decided yet which analysis I wil
Dear Jan,
Thank you for your answers. They are very useful. I will try the LaF
package.
Cheers,
--
View this message in context:
http://r.789695.n4.nabble.com/Reading-big-files-in-chunks-ff-package-tp4502070p4537857.html
Sent from the R help mailing list archive at Nabble.com.
__
> a<-sample(1:6,100,replace=T)
> a
[1] 2 4 3 4 5 1 3 2 4 3 6 6 2 6 2 1 5 5 3 4 6 1 6 6 3 4 6 6 4 4 5 4 6 5 6
3 4 5 6 3 4 1 6 6 6 4 2 1 1 3 1 5 3 2 2 6 2 5
[59] 2 6 1 6 1 1 6 4 4 2 2 3 4 5 6 1 6 4 6 1 5 1 1 2 1 3 4 4 6 3 1 4 1 1 1
5 5 2 4 6 5 1
which(a<=3)
[1] 1 3 6 7 8 10 13 15 16
This reads like a PATH problem. Specify the absolute path to the perl you
want use: /usr/bin/perl or /opt/local/bin/perl. It looks like you already
have Statistics::Descriptive thru MacPorts; you can use
system(paste("/opt/local/bin/perl myscript.pl", ..., sep = " ")). If you
plan on using the Mac
Thank you every body for your suggestion. It does help.
On Fri, Apr 6, 2012 at 2:37 AM, windmagics_lsl wrote:
> I think there may 3 legends should be added in your plot
> the argument col, pch and pt.cex should be in the same length with legend,
> but the objects col, pch
> and cex you defined
A friend of mine added plot code to the function SimpleTS() as follows
but it misses the single point between two missing points:
SimpleTS <- function() {
fileStg <- "C:/ad/dta/TryRRead/Rcode/SHIYU/SimpleTS.dta"
titleline <- readLines(fileStg, n=1)
print(titleline)
dta <- read.table(f
On 2012-04-06 07:19, Navin Goyal wrote:
Thank you so much for your help Berend.
I did not see that my code had a typo and it was thus wrongly written ( I
overlooked the i that was supposed to be actually 1)
instead of for (q in *1*:length(comb1$ID))
I had it as for (q in *i*:leng
On Fri, Apr 6, 2012 at 4:02 PM, Dimitri Liakhovitski
wrote:
This works great:
Really ? surprising given it is the EXACT same for-loop as in your
original problem with counter "i" replaced by "k" and reorder to
matrix[!100]<- 0 instead of matrix(0)[i]<- 100
You didn't even attempt to implement Ca
Hello,
I'm having a question related to the system command within R: I try to
evoke a perl script from within R with something like
system(paste('perl myscript.pl', some parameters ,sep=" ")
This works just fine as long as I do not use any additionally installed
Perl module, as this leads to
Hello,
the graphical parameters xaxs and yaxs are for you.
par(xaxs="i")
Regards!
__
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
Yes, that's correct - my matrix has N rows.
Thank you very much, Carl. This works great:
input<-as.matrix(data.frame(a=c(5,1,3,7),b=c(2,6,4,8)))
result<-input
N<-nrow(input)
for (k in 1:N){
foo <- which (input == k,arr.ind=T)
result[k,foo[2]] <-100
}
result[result !=100]<-0
Dimitri
On Fri,
Ok, how's this:
Rgames> foo
[,1] [,2] [,3] [,4]
[1,]361 16
[2,] 10 14 125
[3,] 117 159
[4,]84 132
Rgames> sapply(1:4,FUN=function(k){
foo[k,which(foo==k,arr.ind=T)[2]]<-100;return(foo)})->bar
Rgames> bar
[,1] [,2] [,3] [,4]
[1,]
Hi,
I have to plot a heat map and next to it a lineplot. Unfortunately the
scale is not the same between the two plots (as the heatmap data is binned).
My problem is, that despite the fact the plotted areas (marked by the
heatmap and box of the the default line plot) are essentially very similar,
Apologies -- I meant to translate that code (which is what the OP
provided, albeit in longer form) into a *apply one-liner.
--
Sent from my Cray XK6
"Quidvis recte factum, quamvis humile, praeclarum."
__
R-help@r-project.org mailing list
https://sta
I think the OP wants to fill values in an arbitrarily large matrix.
Now, first of all, I'd like to know what his real problem is, since this
seems like a very tedious and unproductive matrix to produce. But in
the meantime, since he also left out important information, let's
assume the input
linearizeTime() is from the restof my own code and the rest if my code is not
small.
That is why I gave you the printout and the code line that produced it.
The printout at the end of SimpleTS() is this:
[1] "`Simple Time Series"
monoMn SBP DBP HRT
1 1057366710 117 53 54
2 1057369636 108
I recommend looking at chapter 6 of Paul Allison's *Fixed Effects
Regression Models*. This chapter outlines how you can use a structural
equation modeling framework to estimate a multi-level model (a random
effects model). This approach is slower than just using MLM software like
lmer() in the lm
Hi
On 7/04/2012 2:43 a.m., Brett Presnell wrote:
I'm trying to use the vcd package to produce mosaic plots for my class
notes, written in Sweave and using the LaTeX's beamer document class.
For projecting the notes in class, I use a dark background with light
foreground colors. It's easy enoug
This still isn't reproducible -- when I said use dput() I meant it.
x <- data.frame(x = 1:5, y = letters[1:5], z = factor(sample(1:3,5,
TRUE))) # complicated
dput(x) # Easy to copy and paste.
Also, what package is the linearizeTime function from? I'm having
trouble finding it on CRAN.
If you can
I maybe missing something but this seems like an indexing problem
which doesn't require a loop at all. Something like this maybe?
(input<-matrix(c(5,1,3,7,2,6,4,8),nc=2))
output <- matrix(0,max(input),2)
output[input[,1],1] <- 100
output[input[,2],2] <- 100
output
Cheers
On Fri, Apr 6, 2012 at
Try this:
x <- xts(as.character(1:10), Sys.Date() + 0:9)
storage.mode(x) <- "double"
Michael
On Fri, Apr 6, 2012 at 1:13 PM, Noah Silverman wrote:
> Hi,
>
> I have a rather large data frame (500 x 5000) that I want to convert to a
> proper xts object.
>
> I am able to properly generate an xts
To the best of my knowledge, you can't skip step #2, at least not with
using much more complicated work-arounds like including a gsub() step
within the call to table, and to everything else you do with those
data.
Computers are generally better at dealing with normalized data, which
is what you're
On Apr 6, 2012, at 9:09 AM, John D. Muccigrosso wrote:
> I have some data files in which some fields have multiple values. For example
>
> first last sex major
> John Smith M ANTH
> Jane DoeF HIST,BIOL
>
> What's the best R-like way to handle these data (Jane's major in my
Hello, everybody!
I have a matrix "input" (see example below) - with all unique entries
that are actually unique ranks (i.e., start with 1, no ties).
I want to assign a value of 100 to the first row of the column that
contains the minimum (i.e., value of 1).
Then, I want to assign a value of 100 t
This is a function I use when the posterior is unimodal
I do not remember but I think I found it somewhere in the web
brunero
hpd<-function(x,p){
#generate an hpd set of level p, based
#on a sample x from the posterior
dx<-density(x)
md<-dx$x[dx$y==max(dx$y)]
px<-dx$y/sum(dx$y)
pxs<--sort(-px)
ct
This is a function I use for these kinds of situations. Assuming the delimiter
within the column is consistent and the spelling is consistent, it is pretty
useful.
The function returns a vector of 0/1 values, 1 if the text in level is found, 0
otherwise.
var=the variable
level=The value of int
Hi all,
I have the data from the posterior distribution for some parameter. I want
to find the 95% credible interval. I think "t.test(data)" is only for the
confidence interval. I did not fine function for the Bayesian credible
interval. Could some one suggest me?
Thanks
[[alternative HTM
Sorry forgot to mention that I am using windows 7 and R session info
R version 2.15.0 (2012-03-30)
Platform: i386-pc-mingw32/i386 (32-bit
Thanks,
John
On Fri, Apr 6, 2012 at 2:17 PM, John S wrote:
> Dear R experts,
>
> I am trying to save three plots using tiff graphics devices; however the
Dear R experts,
I am trying to save three plots using tiff graphics devices; however the
following code only produces two files (Rplot002.tif and Rplot003.tif)
showing figures 1 and 3. Here is a simplified ex code
tiff(filename ="Rplot%03d.tif",width=24,height=20,units="cm",res=300,
pointsize=1
I believe I have made this posting simple enough to understand.
The sample time-series has only 10 times.
SimpleTS() is the R function to contain the call to do the plot.
SimpleTS <- function() {
titleline <- readLines("SimpleTS.dta", n=1)
print(titleline)
dta <- read.table("SimpleTS.dta"
str() is your number one friend in R. Do str(A) and str(A2) after
allocating the matrices and you'll be "surprised". My $.02 /Henrik
On Fri, Apr 6, 2012 at 7:35 AM, 卢永芳 wrote:
> Hello,experts
> I am working on a simulation of effect of artificial selection on certain
> population in Animal Bre
Interpreting contrasts for a two-way interaction in the presence of a
significant
three-way interaction is dangerous. They might not be interpretable.
I would start by examining the interaction2wt plot (in the HH package)
interaction2wt(activity ~ pH + I + f, data=yourdataframe)
Look at the vul
On Fri, Apr 6, 2012 at 10:27 AM, MSousa wrote:
> Good Afternoon,
>
> I have the following code, but it seems that something must be doing
> wrong, because it is giving the results I want.
Assuming you don't really mean that, you can use order() and/or sort()
to put it back into order by val_use
Hi,
I have a rather large data frame (500 x 5000) that I want to convert to a
proper xts object.
I am able to properly generate an xts object with the correct time index.
However, all of my numerical values are now strings.
b <- as.xts(a[,2:dim(a)[2]], order.by=as.POSIXct(strptime(paste(a$Dat
You might want to re-read the "Intro to R" and the section on
dataframes. Your spreadsheet is read into R as a dataframe which is
very similar to an Excel spreadsheet. Exactly what problem are you
having with it? Is it trying to access the data?
2012/4/6 Pedro Henrique :
> Hi, Petr,
> Thanks fo
check out the 'sqldf' package. In
http://code.google.com/p/sqldf/#Example_4._Join there is an example of
a temporal join. Maybe this will work for you.
On Fri, Apr 6, 2012 at 9:56 AM, Edith Mertz wrote:
> Found the blunder, last line should have been:
>
> TideH$dt <- as.chron(paste(TideH$Date,
Max and List,
Could you advise me if I am using the proper caret syntax to carry out
leave-one-out cross validation. In the example below, I use example
data from the rda package. I use caret to tune over a grid and select
an optimal value. I think I am then using the optimal selection for
predict
Are you looking at the CPU or the elapsed time? If it is the elapsed
time, then also capture the CPU time to see if it is different. Also
consider the use of the Rprof function to see where time is being
spent. What else is running on the machine? Are you doing any
paging? What type of system
You need to do some basic debugging by putting
options(error=utils::recover)
in your startup of R (or just type it in) so that when the error
occurs you get control at the point of the error and can examine all
the variable. You have some incorrect data that is causing the
subscript error, so yo
Usually you can just use cor() and it will do all the possibilities directly:
x <- matrix(rnorm(100), ncol = 10)
cor(x)
But that works on the columns, so you'll need to transpose things if
you want all possible row combinations: cor(t(x))
Hope this helps,
Michael
On Fri, Apr 6, 2012 at 9:57 AM,
Josh
Apologies I haven't responded earlier. This looks great - I ended up doing
what I needed done piece-by-piece because of a looming deadline, but
understanding this code and your suggestions below will be a weekend
project.
Many thanks for all your help.
*
*
Best
Ben
On Tue, Apr 3, 2012 at 8
I recommend looking at chapter 6 of Paul Allison's Fixed Effects Regression
Models. This chapter outlines how you can use a structural equation modeling
framework to estimate a multi-level model (a random effects model). This
approach is slower than just using MLM software like lmer() in the l
On Fri, Apr 6, 2012 at 10:27 AM, MSousa wrote:
> Good Afternoon,
>
> I have the following code, but it seems that something must be doing
> wrong, because it is giving the results I want.
Didn't someone else have that problem just a few weeks ago? :-P
Michael
> The idea is to create segments
Thanks Andy. I did read that posting, but didn't find that it answered my
questions.
Ok - so I've confirmed that I can use popMeans in the doBy package to obtain
the LSmeans as described in my e-mail below; however, the output has me puzzled.
Recall that my data consists of counts at various si
Hello£¬experts
I am working on a simulation of effect of artificial selection on certain
population in Animal Breeding.I am new beginner in coding. I have already build
a matrix A(500*500) based on this code
A<-matrix(,500,500)
for(i in 1:500){
for(j in 1:500){
ifelse(i==j,A[i,j]<-1,A[i,j]<-0)
}
Good Afternoon,
I have the following code, but it seems that something must be doing
wrong, because it is giving the results I want.
The idea is to create segments while the value of Commutation is less than
1000.
for example, from the small set of data below
text="
val_user posvv_sta
You might want to check out package {tikzDevice} and it's
documentation. In essence you turn your R plots to tikz-pgf so they
can be naturally incorporated into a beamer presentation. Colors, bg,
fonts etc. can now be controlled in your main latex doc. I find it
much more convenient, and nicer when
Found the blunder, last line should have been:
TideH$dt <- as.chron(paste(TideH$Date, TideH$Time), "%Y%m%d %H%M%S")
After this I did:
Fix <- read.csv("Fix times.csv")
Fix[,"Station"] <- as.character(Fix[,"Station"])
Fix[,"Date"] <- as.Date(Fix[,"Date"],format="%d/%m/%Y")
Fix[,"Time"] <- as.char
I am using the randomForest package. I have found that multiple runs
of precisely the same command can generate drastically different run
times. Can anyone with knowledge of this package provide some insight
as to why this would happen and whether there's anything I can do
about it? Here are som
Hello,
I've been trying to answer a problem I have had for some months now and
came across multivariate multilevel modeling. I know MPLUS and SPSS quite
well but these programs could not solve this specific difficulty.
My problem:
9 correlated dependent variables (medical symptoms; categorical, 0
Hi, I'm new to R-help mailing list and novice in R, so pls excuse 'silly
questions' and obvious blunders.
I have the same problem as Jon Greenberg (just different data) and have been
trying to use the code given above, but with some difficulty.
Pls Help?
My data:
Table 1 (TideH.csv)
Date
Hi, Petr,
Thanks for answering.
Yes, I do read the file with the "read.xls" command but I do not know how to
read it into an object.
I read the R-into document chapter of objects, but I is still not clear for
me how to transform this kind of data into an object.
Regards,
Lämarao
- Origi
How about reading lines and separating out cases having more than one
major? For cases having more than one major, process the data to create
duplicate rows - one for each major
On Fri, Apr 6, 2012 at 8:39 PM, John D. Muccigrosso <
intern...@muccigrosso.org> wrote:
> I have some data files in whi
It is possible to calculate the c-index for time dependent outcomes (such as
disease) using the survivalROC package in R. My question is : is it possible to
produce a p-value for the c-index that is calculated (at a specific point in
time)?How to get the confidence interval of area under then t
On Apr 6, 2012, at 9:45 AM, Tyler Rinker wrote:
Hello R community,
This isn't a technical question about R:
I have used
http://lib.stat.cmu.edu/R/CRAN/ as my mirror for some time now. As
of a few days now I don't seem to be able to use this mirror. The
link from CRAN to this repository d
John
I have to deal with this kind of thing too for my class.
# Some functions
# for ad$Full.name = "Mark Grimes"
get.first.name <- function(cell){
x<-unlist(strsplit(as.character(cell), " "))
return(x[1])
}
get.last.name <- function(cell){
I have some data files in which some fields have multiple values. For example
first last sex major
John Smith M ANTH
Jane DoeF HIST,BIOL
What's the best R-like way to handle these data (Jane's major in my example),
so that I can do things like summarize the other fields by
I'm trying to use the vcd package to produce mosaic plots for my class
notes, written in Sweave and using the LaTeX's beamer document class.
For projecting the notes in class, I use a dark background with light
foreground colors. It's easy enough to change the defaults for R's
standard graphics t
firstly , thanks a lot. yes the files are already binarys. (there are 360
binary files ,each file has dim of 720 *360 files) in one folder of
what I am trying to do is to take the average of each 4 files and finally
got 40 files to a new folder .
the error message is Error in Testarray[i, , ] <
Thank you so much for your help Berend.
I did not see that my code had a typo and it was thus wrongly written ( I
overlooked the i that was supposed to be actually 1)
instead of for (q in *1*:length(comb1$ID))
I had it as for (q in *i*:length(comb1$ID))
It works correctly as expect
Why "didn't seem to be right"? Are there error messages? I assume
you have at least 6GB of real memory since you single copy of
Testarray requires 3GB. Is your already in a 'binary' file? If so,
why are you defining your matrix as numeric? Should you be using
'array(0L, dim = c(1460, 720, 360)
On 06-04-2012, at 13:14, Navin Goyal wrote:
> Apologies for the lengthy code.
> I tried a simple (and shorter) piece of code (pasted below) and it still
> gives me the same error for last few rows. Is this a bug or am I doing
> something totally wrong? Could anyone please provide some help/poi
Hello R community,
This isn't a technical question about R:
I have used
http://lib.stat.cmu.edu/R/CRAN/ as my mirror for some time now. As of a few
days now I don't seem to be able to use this mirror. The link from CRAN to
this repository does not work either. Does anyone know the fate of th
On 12-04-06 8:03 AM, Axel Urbiz wrote:
Dear List,
In building a package on a Mac, all the steps performed (build, check,
install) seem to be working fine (no warning messages or errors). The
manual for the package is created and everything looks good except for the
fact that the header of the do
Hi Baptiste,
Thanks for your help with this. Sorry for being slow to express my
appreciation. I had intended to put some more time into tweaking the graphs
before responding. Recently have been reading Hadley Wickham's ggplot2 book and
have also located some materials on the knitr package. Didn
Suppose we have files in one folder file1.bin, file2.bin, ... , and
1460slice(file) with dim of 720 * 360 in directory C:\\PHD\\Climate
Data\\Wind\\ and we want to read them and make a loop to go from 1 to 4
and take the average, then from 4 to 8 and so on till 1460. in the end we
will get 365 f
On Fri, Apr 6, 2012 at 2:21 PM, Ramiro Barrantes
wrote:
> Please let me know if you have any other suggestions or clues.
>
See this older post by Brian [1] and check ?"Memory-limits".
Otherwise, I remember someone suggesting that even if R releases the
memory internally, the OS may still keep it r
Thank you for your feedback.
I think the problem is that, when nlme runs, it "hangs" when iterating. I have
a timeout of 5 minutes so that is how I get it to stop on the few cases where
it goes over. However, I think the memory doesn't get "cleared up" properly.
Please let me know if you have
Hi
>
> Hi R-listers,
>
> 1) I am having trouble understanding why the means I have calculated
from
> Aeventexhumed (A, B, and C) are different from the means showing on the
> boxplot I generated (see attached). I have added the script as to how
my
> data is organized.
Maybe the difference i
Dear List,
In building a package on a Mac, all the steps performed (build, check,
install) seem to be working fine (no warning messages or errors). The
manual for the package is created and everything looks good except for the
fact that the header of the document is not showing the info on the
DES
Hello
On Fri, Apr 6, 2012 at 10:35 AM, Jhope wrote:
> Hi R-listers,
>
> 1) I am having trouble understanding why the means I have calculated from
> Aeventexhumed (A, B, and C) are different from the means showing on the
> boxplot I generated (see attached). I have added the script as to how my
>
Hi R-listers,
1) I am having trouble understanding why the means I have calculated from
Aeventexhumed (A, B, and C) are different from the means showing on the
boxplot I generated (see attached). I have added the script as to how my
data is organized.
2) Also when I went through the data manua
I think there may 3 legends should be added in your plot
the argument col, pch and pt.cex should be in the same length with legend,
but the objects col, pch
and cex you defined former have 16*3 length. I guess the follow codes may
work
col <- rep(c("blue", "red", "darkgreen"), c(16, 16, 16))
##
Apologies for the lengthy code.
I tried a simple (and shorter) piece of code (pasted below) and it still
gives me the same error for last few rows. Is this a bug or am I doing
something totally wrong? Could anyone please provide some help/pointers ?
PS. beta0 was fixed to 0.001 in the previous c
Apologies for the lengthy code.
I tried a simple (and shorter) piece of code (pasted below) and it still
gives me the same error for last few rows. Is this a bug or am I doing
something totally wrong? Could anyone please provide some help/pointers ?
PS. beta0 was fixed to 0.001 in the previous c
You don't provide a reproducible example, or even str(), but I'd guess you need
to match "^15" instead of just "15".
Sarah
On Apr 5, 2012, at 10:38 PM, ieatnapalm wrote:
> Hey, sorry if this has been addressed before, but I'm really new to R and
> having trouble with the gsub function. I need
Thanks,
anyway, using build-in R features is preferable for colours
with(data, plot(axis1, axis2, col= c("red", "blue",
"green")[as.numeric(data$Region)]))
legend("topright", legend=levels(data$Region), fill= c("red", "blue",
"green"))
although sometimes can be preferable to get advantage of
On 06-04-2012, at 10:27, jpm miao wrote:
> Hello,
>
> Is there a function in R that calculates the year-on-year growth rate of
> some time series?
>
> In EView the function is @pchy.
This might do what you need
pchy <- function(x) {
if(!is.ts(x)) stop("x is not a timeseries")
x.f
Hi
Your post is rather screwed.
>
> [R] how to do piecewise linear regression in R?
Maybe segmented?
Regards
Petr
>
>
> Dear all,
> I want to do piecewise CAPM linear regression in R:
> RRiskArbâ’Rf = (1â’δ)[αMktLow+βMktLow(RMktâ’Rf)] + δ[αMkt
High
> +βMkt High(RMkt â’Rf )]
>
He provided data, yet in an inconvenient way at the bottom of his post.
Kumar, please use dput() to provide data to the list, because its much
easier to import:
dput(data)## name data is made up by me
structure(list(Region = structure(c(2L, 2L, 2L, 2L, 2L, 3L, 3L,
3L, 3L, 3L, 1L, 1L, 1L, 1L,
Hi
> Hello,
>
> I am a new user of R and I am trying to use the data I am reading from a
> spreadsheet.
> I installed the xlsReadWrite package and I am able to read data from
this
> files, but how can I assign the colums into values?
> E.g:
> as I read a spreadsheet like this one:
Maybe with
Hi
>
> I have a bivariate plot of axis2 against axis1 (data below). I would
like
> to use different size, type and color for points in the plot for the
point
> coming from different region. For some reasons, I cannot get it done.
Below
> is my code.
>
> col <- rep(c("blue", "red", "darkgreen"
On 2012-04-05 10:49, Richard M. Heiberger wrote:
Here is your example. The table you displayed in gigawiz ignored the
two-way factor structure
and interpreted the data as a single factor with 6 levels. I created
the interaction of
a and b to get that behavior.
## your example, with data stored
Hello,
Is there a function in R that calculates the year-on-year growth rate of
some time series?
In EView the function is @pchy.
Thanks,
miao
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.et
97 matches
Mail list logo