try this:
apply(data.matrix(a), 1, playFn)
I hope it helps.
Best,
Dimitris
On 11/9/2010 8:32 AM, Santosh Srinivas wrote:
Dear Group,
I have a following dataset:
a
A B C D
1 22 3 31 40
2 26 31 36 32
3 3 7 49 16
4 24 40 27 26
5 20 45 47 0
6 34 43 11 18
7 48 48 24 2
8
Dear Group,
I have a following dataset:
> a
A B C D
1 22 3 31 40
2 26 31 36 32
3 3 7 49 16
4 24 40 27 26
5 20 45 47 0
6 34 43 11 18
7 48 48 24 2
8 3 16 39 48
9 20 49 7 21
10 17 36 47 10
> dput(a)
structure(list(A = c(22L, 26L, 3L, 24L, 20L, 34L, 48L, 3L, 20L,
17L), B = c(3
Hello everyone,
Thank you all for clarification (e.g: that merge(... sort = F) will not
retain the original order).
It is still not clear to me why it was chosen to be implemented in this way.
To Peter -
Thank you for the solution code, I will use it.
One interesting think that I don't get, is wh
Thanks! Works great.
I have more questions on this, so I'll continue here:
Now that I have the weighted mean, is it possible to reduce the size of
mountain based on this weighted mean such the original matrix remains 21x21
while the mountain shrinks/converges.
Step for my analysis:
1) Find cent
Don't know if this is "efficient" but I think it works...
yn <- c("Y", "N")
X <- expand.grid(x1=yn, x2=yn, x3=yn, x4=yn)
Yp <- c(0.6, 0.5, 0.8, 0.9)
X$prob <- apply(X, 1, function(x) cumprod(ifelse(x == "Y", Yp,
1-Yp))[length(x)])
Michael
On 9 November 2010 17:05, Kate Hsu wrote:
> Dear r user
Dear r users,
I have 4 variables x1,x2,x3,x4 and each one has two levels, for example Y
and N.
For x1: prob(Y)=0.6, prob(N)=0.4;
For x2: prob(Y)=0.5, prob(N)=0.5;
For x3: prob(Y)=0.8, prob(N)=0.2;
For x4: prob(Y)=0.9, prob(N)=0.1;
Therefore, the sample space for (x1, x2, x3, x4)={, YYYN, Y
I just stumbled into the 'fork' package (GPL-2). It allows you do
send signals from within R. Unfortunately it is not available on
Windows, but it is definitely a start.
Here is an example how an R session can send an interrupt signal
(SIGINT) to itself:
library("fork");
# Get the process ID o
Good morning,
try this:
#your date format
datum<-c("100907","101008","101109")
#convert it (works with and without as.Date)
datum<-as.Date(strptime(datum,("%y%m%d")))
plot(datum,5:7)
I hope it works for you
Hajo
Am 09.11.2010 06:37, schrieb sachinthaka.abeyward...@allianz.com.au:
> Hi All,
>
>
Hi All,
I have a date in the format of yymmdd (without any of the backslashes, eg.
100731). How do I convert this into a Rdate and plot it? I don't want the
number of days from 1970's showing up as my date (Its the date I require).
Thanks,
Sachin
p.s. sorry about the corporate notice I can't rem
The games we play in zapsmall might apply to your current question.
zapsmall rounds to a specified number of digits.
The initial intent of zapsmall was to display 10^(-16) as 0.
Rich
> tmp <- c(1, 1 + c(-1,1)*10^(-14))
> tmp
[1] 1 1 1
> unique(tmp)
[1] 1 1 1
> unique(zapsmall(tmp))
[1] 1
>
> I think this does what you want (borrowing from all.equal.numeric):
>
> all(abs((x - mean(x))) < .Machine$double.eps^0.5)
>
> with a vector of length 1 million, it took .076 seconds on a fairly old
> system.
Hmmm, maybe I want:
all.equal(min(x), max(x))
?
Hadley
--
Assistant Professor / Do
I did the following but it shows a couple of error messages. Could you help
me with that? Thanks in advance.
> testdata <- read.csv("C:\\Users\\Kevin\\Desktop\\testdata.csv",
> header=TRUE)
> testdata
date day time webpage item value
1 10-Jun-09 Wed 9:40:53 MattDamon fan
Perhaps just use the ftable function to generate a flat contingency
table and look for counts below some threshold.
Michael
On 9 November 2010 09:25, Alan Chalk wrote:
> Regarding unusual combinations of factors in categorical data.
> Are there any R packages that can be used to identify the ou
On Mon, Nov 8, 2010 at 4:45 PM, Hadley Wickham wrote:
> Hi all,
>
> What's the equivalent to length(unique(x)) == 1 if want to ignore
> small floating point differences? Should I look at diff(range(x)) or
I think this does what you want (borrowing from all.equal.numeric):
all(abs((x - mean(x)))
Greetings Supreme Council of R Masters,
Like toddler, I have gotten my head stuck in the banisters of R ... again.
Let it be know I am still a neophyte in the R-community forum world, so
please don't flame me too bad.
I have two sets of data, each with a set of timestamps. I would like to
so
hi people
I need to make an application with Java and R.
I installed the library rJava using the command R - install.packages
(rJava), and i configured my $ R_HOME = / Library / Frameworks /
R.framework / Resources.
My SO is OSX.
When I run an exemple in eclipse, it gives me the following err
how about
all.equal(x,rep(mean(x),length(x)))
or
all.equal(x,rep(mean(x),length(x), tolerance=...)
albyn
On Mon, Nov 08, 2010 at 06:45:00PM -0600, Hadley Wickham wrote:
> Hi all,
>
> What's the equivalent to length(unique(x)) == 1 if want to ignore
> small floating point
Hi all,
What's the equivalent to length(unique(x)) == 1 if want to ignore
small floating point differences? Should I look at diff(range(x)) or
sd(x) or something else? What cut off should I use?
If it helps to be explicit, I'm interested in detecting when a vector
is constant for the purpose of
Reduce(function(x1,x2)b*x1-x2,c,init=1,accum=TRUE)
might be what you are looking for.
This is not fully tested, so you should test it before
you want to use it.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
Typing too fast; last line should be:
barplot(t(x.m[, 2:5]), names.arg = x.m[,1], las=2)
On Mon, Nov 8, 2010 at 5:42 PM, casperyc wrote:
>
> Hi all,
>
> I have the following data in abc.dat
>
> ===
> 50 0 1 0 0
> 55 1 14 0 1
> 60 7 86
try this:
> x <- read.table('clipboard')
> x
V1 V2 V3 V4 V5
1 50 01 0 0
2 55 1 14 0 1
3 60 7 86 0 3
4 65 22 324 2 3
5 70 58 1035 1 7
6 75 30 2568 0 34
7 80 9 2936 15 162
8 85 27 2169 46 365
9 90 80 1439 212 432
10 95 236 16
Tena koe Tal
sort: logical. Should the results be sorted on the 'by' columns?
Thus it is clear what sort=TRUE does, sort=FALSE does not do this. That
doesn't mean it leaves the result in the same order as x (your a1), although
many people (including me at first) assume it does. It is easy en
Here is an example of what I think the original poster wanted to
achieve.
> rnorm(10)
[1] -1.2165869 -0.4698460 -0.4209811 -1.4856052 0.3765774 -1.3822470
[7] 0.2818458 0.5500957 -1.1474455 -1.2221257
> x <- .Random.seed
> runif(10)
[1] 0.5610780 0.5911841 0.5868183 0.3833801 0.7397059 0.497
Hi all,
I have the following data in abc.dat
===
50 0 1 0 0
55 114 0 1
60 786 0 3
6522 324 2 3
7058 1035 1 7
7530 2568 034
80 9 293615 162
8527 216946 365
90
Hi,
On Mon, Nov 8, 2010 at 2:25 PM, Alan Chalk wrote:
> Regarding unusual combinations of factors in categorical data.
where all variables are categorical?
> Are there any R packages that can be used to identify the outliers i.e.
> unusual combinations in categorical datasets ?
"outlier" or "u
Regarding unusual combinations of factors in categorical data.
Are there any R packages that can be used to identify the outliers i.e.
unusual combinations in categorical datasets ?
Thanks.
Notice of Confidentia
> Date: Mon, 8 Nov 2010 06:18:49 -0800
> From: monte.shaf...@gmail.com
> To: r-help@r-project.org
> Subject: [R] try (nls stops unexpectedly because of chol2inv error
>
> Hi,
>
> I am running simulations that does multiple comparisons to control.
>
> Fo
Ted -
If you want to retain the exact order of the rows of one
of the merged matrices, I think you have to merge them
"by hand":
cbind(a1,num=a2[match(a1$name,a2$name),'num'])
name num
1D 4
2B 2
3C 3
4A 1
5A 1
6C 3
y=sapply(1:nrow(x), function(i) sapply(1:ncol(x), function(j)
getrc(i, j)))
Arvin Zolfaghari, Ph.D.
Aon Benfield | Aon Benfield Analytics
55 Bishopsgate, London, EC2N 3BD, UK
t: +44 20 7522 8241 | f: +44 20 7522 3846| M: +44 78 8940 6637
e: arvin.zolfagh...@aonbenfield.com | w:
Missing: a closer reading of the help page --
Value
A data frame. The rows are by default lexicographically sorted on the
common columns, but for sort = FALSE are in an unspecified order.
So sort = FALSE says unspecified. If you want the original order,
then add a column to the dataframe with th
Dear Jari Oksanen,
I am Trinadh Kumar, a student of Biotechnology from Texas Tech University.
I have a question for you regarding constrained ordination graphs.
I had previously plotted constrained ordination graphs using distance based
redundancy analysis for species data on patients.
The species
You can use the
normal.and.t.dist()
function in the HH package, available from CRAN with
install.packages("HH")
This works on all platforms. There is menu access to the function through
Rcmdr if you install
install.packages("RcmdrPlugin.HH")
If you are on Windows, you can additionally control tha
Hello all,
I think I am missing something about the sorting parameter in the "match"
command/
Here is an example:
a1 <- data.frame(name = c("D", "B", "C", "A", "A", "C"))
a2 <- data.frame(name = c("A", "B", "C", "D"), num = 1:4)
a1
a2
merge(a1, a2, sort = F, by.x = T)
The result is:
name n
Hi Xiaoxi,
Take a look at the following:
> set.seed(123)
> rnorm(10)
[1] -0.56047565 -0.23017749 1.55870831 0.07050839 0.12928774 1.71506499
[7] 0.46091621 -1.26506123 -0.68685285 -0.44566197
> rnorm(10)
[1] 1.2240818 0.3598138 0.4007715 0.1106827 -0.5558411 1.7869131
0.4978505
[8]
?set.seed is what you're looking for
Xiaoxi Gao wrote:
Hello R users,
Here is my question about generating random sample. How to set the random seed to
recreate the same random numbers? For example, 10 random numbers is generated from
N(0,1), then "runif(10)" is used.What if I want to get the
Use "set.seed()"
--
Jonathan P. Daily
Technician - USGS Leetown Science Center
11649 Leetown Road
Kearneysville WV, 25430
(304) 724-4480
"Is the room still a room when its empty? Does the room,
the thing itself have purpose? Or do we, what's the word... imbue it
Thanks a lot - extremely heplful!
While I'll definitely try to use merge in the future, in my situation
I run into problems with memory (files are too large).
However, Phil's suggestion is perfect for me - sped me up considerably!
Thank you, again!
Dimitri
On Mon, Nov 8, 2010 at 2:51 PM, Phil Spec
Hello R users,
Here is my question about generating random sample. How to set the random seed
to recreate the same random numbers? For example, 10 random numbers is
generated from N(0,1), then "runif(10)" is used.What if I want to get the same
10 random numbers when I run runif(10) again? Is i
I wrote this a bit ago, its far from perfect, but might give you
ideas/serve your purpose.
HTH,
Josh
plot.dist <- function(alpha, from = -5, to = 5, n = 1000, filename = NULL,
alternative = c("two.tailed", "greater", "lesser"),
distribution = c("normal", "t", "F", "chisq", "binomial"),
colour =
Here's an example of a PDF with the tails shaded:
http://stackoverflow.com/q/3494593/37751
-JD
On Mon, Nov 8, 2010 at 10:18 AM, Wu Gong wrote:
>
> I want to create a graph to express the idea of the area under a pdf curve,
> like
>
> http://r.789695.n4.nabble.com/file/n3032194/w7295e04.jpg
>
>
On Mon, Nov 8, 2010 at 3:16 PM, Richard Vlasimsky
wrote:
> Does anyone recommend a more efficient way to "roll" values in a time series
> dataset?
>
> I merged a bunch of different time series datasets (10's of thousands of
> them) whose observation dates and sampling interval differ. Some time
Hi:
Look into the zoo package and its rollapply() function. The package is
designed to handle irregular and multiple series.
HTH,
Dennis
On Mon, Nov 8, 2010 at 12:16 PM, Richard Vlasimsky <
richard.vlasim...@imidex.com> wrote:
> Does anyone recommend a more efficient way to "roll" values in a t
If you are willing to shift the c vector by 1 and have 1 (the initial value) as
the start of c, then you can just do:
cumsum( cc * b^( (n-1):0 ) ) / b^( (n-1):0 )
to compare:
cc <- c(1, rnorm(999) )
b <- 0.5
n <- length(cc)
a1 <- numeric(100)
a1[1] <- 1
system.time(for(i in 2:n ) {
a1
Does anyone recommend a more efficient way to "roll" values in a time series
dataset?
I merged a bunch of different time series datasets (10's of thousands of them)
whose observation dates and sampling interval differ. Some time series
observations are reported at the beginning of the month,
Dimitri -
While merge is most likely the fastest way to solve
your problem, I just want to point out that you can use
a named vector as a lookup table. For your example:
categories = my.lookup$category
names(categories) = my.lookup$names
creates the lookup table, and
my.df$category = catego
Try this:
merge(my.df, my.lookup)
On Mon, Nov 8, 2010 at 5:43 PM, Dimitri Liakhovitski <
dimitri.liakhovit...@gmail.com> wrote:
> Hello!
> Hope there is a nifty way to speed up my code by avoiding loops.
> My task is simple - analogous to the vlookup formula in Excel. Here is
> how I programmed
Hello!
Hope there is a nifty way to speed up my code by avoiding loops.
My task is simple - analogous to the vlookup formula in Excel. Here is
how I programmed it:
# My example data frame:
set.seed(1245)
my.df<-data.frame(names=rep(letters[1:3],3),value=round(rnorm(9,mean=20,sd=5),0))
my.df<-my.df
I have tried it, but it does not seem to work with vectors, only data.frames
> do.call(rbind.fill, l)
NULL
>
-J
2010/11/8 Erik Iverson :
> Then one solution is to use
> rbind.fill from the plyr package.
>
> johannes rara wrote:
>>
>> This is the ideal result (data.frame):
>>
>>> result
>>
>> na
Then one solution is to use
rbind.fill from the plyr package.
johannes rara wrote:
This is the ideal result (data.frame):
result
names X1 X2 X3
1 a 1 2 NA
2 b 1 2 3
2010/11/8 Erik Iverson :
So what do you want the matrix to
look like, since the number of columns
will be diffe
This is the ideal result (data.frame):
> result
names X1 X2 X3
1 a 1 2 NA
2 b 1 2 3
>
2010/11/8 Erik Iverson :
> So what do you want the matrix to
> look like, since the number of columns
> will be different between the two rows?
>
>
>
> johannes rara wrote:
>>
>> Thanks, data.fram
On Nov 8, 2010, at 1:00 PM, Giulio Di Giovanni wrote:
> Yep, it is 20.000 per arm, sorry. The reference it's about an
> application of the method, and I cannot download the paper with the
> main algorithm, so I don't know exactly how they did.
> Thanks everybody for the rich and interesting s
Hi:
Is this what you had in mind?
library(reshape2)
df <- df[, -10] # last variable is superfluous
dm <- melt(df, id = 'day')
head(dm)
day variable value
1 1 var1 1
2 2 var1 2
3 3 var1 3
4 4 var1 4
5 1 var2 100
6 2 var2 200
xyplot(va
So what do you want the matrix to
look like, since the number of columns
will be different between the two rows?
johannes rara wrote:
Thanks, data.frame or matrix.
-J
2010/11/8 Erik Iverson :
What class of object / structure do you exactly want
in the end? A matrix, a data.frame, a vector?
Thanks, data.frame or matrix.
-J
2010/11/8 Erik Iverson :
> What class of object / structure do you exactly want
> in the end? A matrix, a data.frame, a vector?
>
> johannes rara wrote:
>>
>> Hi,
>>
>> How to rbind these vectors from a list?:
>>
>>> l <- list(a = c(1, 2), b = c(1, 2, 3))
>>> l
>
What class of object / structure do you exactly want
in the end? A matrix, a data.frame, a vector?
johannes rara wrote:
Hi,
How to rbind these vectors from a list?:
l <- list(a = c(1, 2), b = c(1, 2, 3))
l
$a
[1] 1 2
$b
[1] 1 2 3
do.call(rbind, l)
[,1] [,2] [,3]
a121
b
Try this:
t(sapply(l, '[', 1:max(sapply(l, length
On Mon, Nov 8, 2010 at 5:05 PM, johannes rara wrote:
> Hi,
>
> How to rbind these vectors from a list?:
>
> > l <- list(a = c(1, 2), b = c(1, 2, 3))
> > l
> $a
> [1] 1 2
>
> $b
> [1] 1 2 3
>
> > do.call(rbind, l)
> [,1] [,2] [,3]
> a1
Hi,
How to rbind these vectors from a list?:
> l <- list(a = c(1, 2), b = c(1, 2, 3))
> l
$a
[1] 1 2
$b
[1] 1 2 3
> do.call(rbind, l)
[,1] [,2] [,3]
a121
b123
Warning message:
In function (..., deparse.level = 1) :
number of columns of result is not a multiple of ve
Hi all,
I have a couple of questions that are general statistics questions rather
than being R-specific.
I'm interested in figuring out how to compute something like standard error
for difference scores (in particular, differences scores of reaction times).
Does anyone know if there is a standar
Look at power.examp in the TeachingDemos package. If that plot is not good
enough, you can steal the code and modify to your specifications.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Original Message-
> From: r
Users of R 2.11.1 (let alone 2.11.0) x64 Windows were asked to update
in August, and we switched off the last remnants of support when
2.12.0 was released.
Please do as the posting guide asked you to do before posting: update
to R 2.12.0 (or 2.12.0 patched), and update all your packages.
lat
Dear all,
I am trying (!!!) to generate pdfs that have 8 plots on one page:
df = data.frame(
day = c(1,2,3,4),
var1 = c(1,2,3,4),
var2 = c(100,200,300,4000),
var3 = c(10,20,300,4),
var4 = c(10,2,3,4000),
var5 = c(10,20,30,40),
Yep, it is 20.000 per arm, sorry. The reference it's about an application of
the method, and I cannot download the paper with the main algorithm, so I don't
know exactly how they did.
Thanks everybody for the rich and interesting suggestions. Through free web
software (PS, others) I fou
1. The for loop is probably as or more efficient than recursion,
especially for large n (comments/corrections on this claim from
cogniscenti are welcome);
2. One can **Always** express a for loop recursively -- that is the
nature of computer languages (comments/corrections again welcome).
3. Her
Hi Joshua,
OK, my session info is this:
R version 2.11.0 (2010-04-22)
x86_64-pc-mingw32
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_Unite
Weighted mean of x and y coordinates (sorry for the pun :)), that is
something like
n = 21
y = matrix( c(1:n), n, n)
x = matrix( c(1:n), n, n, byrow = TRUE)
# These are the Center of mass coordinates:
xCenter = sum(x * Z)/sum(Z);
yCenter = sum(y * Z)/sum(Z);
If you also need the z coordinate, it
Hi,
I don't have access to the article, but must presume that they are doing
something "radically different" if you are "only" getting a total sample size
of 20,000. Or is that 20,000 per arm?
Using the G*Power app that Mitchell references below (which I have used
previously, since they have a
Hi all,
I have a matrix of a mountain of form 21x21 and values in them are height
(Z). Using the persp function I can view this mountain in 3D.
Now, I am trying to find a measure to find the centre of gravity (maybe
centroid?) of this mountain. Any idea what would be the best way to go?
--
View
On Nov 8, 2010, at 11:18 AM, Wu Gong wrote:
I want to create a graph to express the idea of the area under a pdf
curve,
like
http://r.789695.n4.nabble.com/file/n3032194/w7295e04.jpg
I think you could have titled this request:
Yet Another Request to Do My Searching For Me:
http://search.
On Nov 8, 2010, at 11:16 AM, Mitchell Maltenfort wrote:
Not with R,
Really?
require(sos)
findFn("power exact test")
found 54 matches; retrieving 3 pages
2 3
These look on point:
http://finzi.psych.upenn.edu/R/library/statmod/html/power.html
http://finzi.psych.upenn.edu/R/library/binom/htm
My impression is that varclus from the Hmisc library is very
convenient to use when you want to get an idea of the correlation
among predictor variables in a regression setting, but if you want
to perform cluster analysis in general, you may be better off using
a different function in R, such as hc
I want to create a graph to express the idea of the area under a pdf curve,
like
http://r.789695.n4.nabble.com/file/n3032194/w7295e04.jpg
Thank you for any help.
-
A R learner.
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-plot-a-normal-distribution-curve-and-a-sh
Not with R, but look for G*Power3, a free tool for power calc,
includes FIsher's test.
http://www.psycho.uni-duesseldorf.de/abteilungen/aap/gpower3
On Mon, Nov 8, 2010 at 10:52 AM, Giulio Di Giovanni
wrote:
>
>
> Hi,
> I'm try to compute the minimum sample size needed to have at least an 80% of
Hi Monica,
Evidently, there is not an "extract" function in your search path
(base R, loaded packages, etc.). Given that you are talking about a
function from a package (rather than base R), it would probably help
us more if you mentioned what version of raster you have installed.
You can get thi
Hi,
I would like to use the function "extract" from package raster and i get the
following error:
m01e <- extract(marsh01, p)
Error: could not find function "extract"
marsh01 is a raster object and p is an intersectExtent object that is not null.
The package is installed and loaded, i use a
Hello,
I have a simple xyplot with rlm lines.
I would like to add the a and b coefficients (y=ax+b) of the rlm calculation
in each panel.
I know I can do it 'outside' the xyplot command but I would like to do all
at the same time.
I found some posts with the same question, but no answer.
Is it
Hi,
I'm try to compute the minimum sample size needed to have at least an 80% of
power, with alpha=0.05. The problem is that empirical proportions are really
small: 0.00154 in one case and 0.00234. These are the estimated failure
proportion of two medical treatments.
Thomas and Conlon (1992)
Please post some data (fake data is fine) for stuffa. The example doesn't
execute as is.
Rich
On Mon, Nov 8, 2010 at 10:27 AM, Ashraf Yassen wrote:
> Hi All,
>
> I need some help in putting text in a stacked barplot. The barplot is
> filled
> with 5 levels and now I would like to put text to
Hi All,
I need some help in putting text in a stacked barplot. The barplot is filled
with 5 levels and now I would like to put text to each level in the stacked
barplot. However, it seems that the code that I am using is not placing the
text at the correct hight (centered at each fill) in the barp
Estaré ausente de la oficina desde el 08/11/2010 y no volveré hasta el
16/11/2010.
Responderé a su mensaje cuando regrese, si es urgente enviar mail a
INNOVACION
Visítenos en: www.lineadirecta.com
"Este mensaje y los documentos que, en su caso, lleve anexos, pueden contener
información con
Hi,
I am running simulations that does multiple comparisons to control.
For each simulation, I need to model 7 nls functions. I loop over 7 to do
the nls using try
if try fails, I break out of that loop, and go to next simulation.
I get warnings on nls failures, but the simulation continues to
http://r.789695.n4.nabble.com/file/n3032045/rsv1.txt rsv1.txt
I am very grateful to David's suggestion, here , I upload my dataset
"rsv1.txt", also the question,
ks<-ken.sto(rsv1,per="TRUE",per.n=0.3,va="FALSE",sav="FALSE")
it does not work, all results are NULL, i do not known why it is ?
Umesh-
You should contact the package maintainer or a SIG with a question about
a package. RMark isn't posted on CRAN so it is unlikely most folks will
even know about it. There is a support forum for MARK and RMark on the
phidot site where you got them. I'll look at your data and problem an
On Nov 8, 2010, at 4:30 AM, Nick Sabbe wrote:
Whenever you use a recursion (that cannot be expressed otherwise), you
always need a (for) loop.
Not necessarily true ... assuming "a" is of length "n":
a[2:n] <- a[1:(n-1))]*b + cc[1:(n-1)]
# might work if b and n were numeric vectors of length
If you want a conditional distribution of x11 given x1,..x10, you need
to make some assumptions about the joint distribution. It seems from the
original post that items 1. and 2. refer to the marginal distribution of
each observation.
In general, it would help to specify the question a little mor
Hola Raquel,
As Ben already told you, ergodic means are pretty easy to compute from
scratch. If you are lazy, or you want something more, like estimated
standard errors, you can check out the functions ergMean and mcmcMean in
package dlm.
Best,
Giovanni Petris
On Sun, 2010-11-07 at 14:34 -0200,
Dear R Help List,
I have the following data set:
eg.
1, date11, f1
1, date12, f2
1, date13, f3
[...]
2, date21, fi
2, date22, fj
[…]
f1 – fn are various levels of a factor variable.
Each ID may contain 1 to many entries. These represent basically semantic data
(triplets).
I want to construc
On Nov 8, 2010, at 5:13 AM, vikrant wrote:
I am saving R graph as a jpeg image and the border is plotted
defaultly when
you open the image.How can I avoid the border?
small R code is as follows :-
volume<- seq(100,10,-10)
jpeg(filename =
"mygraph.jpg",width=366,height=284,unit
On 08-Nov-10 12:56:26, Etienne Stockhausen wrote:
> Dear r-user,
> I've wrote a small function to visualize the creation of a histogram.
> Therefore I create a vector with random values and let them plot in
> histograms. I better give a small example in R-Code:
>
> i=0
> funVec=rnorm(1000)
> temp=
Dear r-user,
I've wrote a small function to visualize the creation of a histogram.
Therefore I create a vector with random values and let them plot in
histograms. I better give a small example in R-Code:
i=0
funVec=rnorm(1000)
temp=hist(funVec,plot=FALSE)
plot(1,xlim=c(max(temp$breaks),m
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10-11-08 08:05 AM, wolfgang.pola...@gmail.com wrote:
> Thanks, what if a I want to add to the plot a second column of observations,
> like a type h line from the x,y plane?
> Wolfgang
see segments3d.
rgl is somewhat more do-it-yourself/constru
Alternatives to Windows platform are Linux. Try Ubuntu download from
http://www.ubuntu.com/getubuntu/downloadmirrors if you are a Linux newbie to
use Rserve
Also see Rapache at http://rapache.net/ for using Apache Web Server and R
together.
The third R interface on web is Rweb see
http://www.jsta
You might want to look at statconnWS (available from rcom.univie.ac.at).
Warning: This project is not open source.
On 11/8/2010 12:40 PM, Ralf B wrote:
> The Rserve documentation at
>
> http://rosuda.org/Rserve/doc.shtml#start
>
> states that even when making multiple connections to the Rserve,
Could be both. Do you have perl installed and is it on a path that R can find.
On Mon, Nov 8, 2010 at 1:32 AM, Ralf B wrote:
> Hi all,
>
> I tried to run Rserve: I installed it from CRAN using
>
> install.packages("Rserve")
>
> and tried to run it from the command line using:
>
> R CMD Rserve
>
Nice thing about R is there is more than one way of doing something:
> x
name ip Bsent Breceived
1 a 1 0.00 0.00
2 a 2 1.43 19.83
3 a 1 0.00 0.00
4 a 2 1.00 1.00
5 b 1 0.00 2.00
6 b 3 0.00 2.00
7 b 2 2.00 0.00
8 b
On Mon, Nov 8, 2010 at 7:06 AM, Benjamin Williams wrote:
> Dear R Help,
>
> I am trying to get fields showing the last day of each month for a monthly
> closing project. In order to find the last day of the previous month, I
> subtract the number of days from the current month. For all months my
Dear r-user,
I've wrote a small function to visualize the creation of a histogram.
Therefore I create a vector with random values and let them plot in
histograms. I better give a small example in R-Code:
i=0
funVec=rnorm(1000)
temp=hist(funVec,plot=FALSE)
plot(1,xlim=c(max(temp$breaks),m
Josh,
thanks so much for your detailed reply. This is exactly what I was looking
for.
--
View this message in context:
http://r.789695.n4.nabble.com/Using-changing-names-in-loop-in-R-tp3030132p3031899.html
Sent from the R help mailing list archive at Nabble.com.
_
Benjamin Williams bwmcct.com> writes:
> I am trying to get fields showing the last day of each month for a monthly
> closing project. In order to find the last day of the previous month, I
> subtract the number of days from the current month. For all months my code
> works; however, for October,
Dear R Help,
I am trying to get fields showing the last day of each month for a monthly
closing project. In order to find the last day of the previous month, I
subtract the number of days from the current month. For all months my code
works; however, for October, my code doesn't work...it returns
Thanks a lot guys...all of your solution are useful, and good.
once again thanks.
--
View this message in context:
http://r.789695.n4.nabble.com/Create-Matrix-of-2-Dim-from-two-vectors-tp3031718p3031797.html
Sent from the R help mailing list archive at Nabble.com.
1 - 100 of 115 matches
Mail list logo