Hi Christopher/ Dirk,
Thank you very much for your replys. I think the idea of using inline as you
suggest is the best way to start off with using c++ with R. I went through
your examples and also plenty I found on the net. I have been trying to run
some of these over the past few days, but have c
On Fri, 18-Feb-2011 at 06:01AM -0600, Terry Therneau wrote:
|> --begin included message
|> Hi, when ploting Kaplan-Meier estimate curves as below, the censoring
|> symbols
|> (crosses) to not change thickness along the lines
|> plot(survfit(surv ~ I(x>=cut.off) ),lty=c(1,2), lwd=2)
|>
|> is
Hi all,
I am try to do a loop on a data .such as:
X<-data.frame(name=c(1:9),SN=c(1,1,1,2,2,2,3,3,3),EW=rep(1:3,3))
X
name SN EW
11 1 1
22 1 2
33 1 3
44 2 1
55 2 2
66 2 3
77 3 1
88 3 2
99 3 3
out<-list()
for ( i in 1:3) {out[[i]]<-subs
Hi all,
I am using "spatstat" to investigate the spatial structure of some plant
populations, but I have no idea about detecting the spatial point pattern
with Thomas process based on pcf. Additionally, generating simulation
envelope using this null model is another problem for me. I am not very
f
On Feb 18, 2011, at 11:06 PM, 韩文衡 wrote:
Hi all,
I am try to do a loop on a data .such as:
X<-data.frame(name=c(1:9),SN=c(1,1,1,2,2,2,3,3,3),EW=rep(1:3,3))
X
name SN EW
11 1 1
22 1 2
33 1 3
44 2 1
55 2 2
66 2 3
77 3 1
88 3 2
99 3 3
Elliot Joel Bernstein wrote:
>
> I'm trying to use lattice graphics to produce some small plots for
> inclusion in a LaTeX file. I want the LaTeX fonts to be used in the plots,
> but to be scaled down to match the size of the plot.
>
>
I agree with Deepayan. With tikzdevice, tust try to get
On 02/19/2011 06:46 AM, Li, Qinghong, ST. LOUIS, NRC St. Louis Petcare
wrote:
Sorry the data were all messed up. Let me try again.
Can anyone help me to plot a chart graph? I have a data set like this. I
would like a bar chart graph which mouse1's two treatments are clustered
together, so on.
I
On 02/19/2011 08:50 AM, Julie McWhorter wrote:
Thank you Joshua and Jim--I got the tick marks on finally!
One last question: I am supposed to make bins in 1, 2 and 5 mm increments for
fish up to 170 mm. I assume these are the breaks? So breaks = 170 for 1 mm
and 340 for 2 mm and 1550 for 5 m
Hi Peter,
Quoting Peter Ehlers :
On 2011-02-18 12:32, Juergen Rose wrote:
Am Freitag, den 18.02.2011, 11:53 -0800 schrieb Peter Ehlers:
On 2011-02-18 11:16, Juergen Rose wrote:
If do:
library("e1071")
example(svm)
I get:
svm> data(iris)
svm> attach(iris)
svm> ## classification m
Hi,
I have two vector with the marginal distribution like this:
> a
[1] -0.419 -0.364 -0.159 -0.046 -0.010 -0.002 0.000 0.000 0.000
> b
[1] 0.125 0.260 0.270 0.187 0.097 0.041 0.014 0.004 0.001
How can I calculate the joint distribution with R?
Thank you to all
Dan
--
View this message i
I really hope sombody could help me with the following,
I'm having problems accessing the random effect samples following the
example on MCMCsamp:
(fm1 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy))
set.seed(101); samp0 <- mcmcsamp(fm1, n = 1000, saveb=TRUE)
str(samp
A reminder that submission deadline for John Chambers Award is Monday 2/21.
Also please note my email address has changed. Please submit your material to
fch...@its.jnj.com
Thank you.
From: f...@live.com
To: r-help@r-project.org
Subject: ASA John M. Chambers Statistical Software Award - 2011
D
On 2011-02-16 06:08, Silvano wrote:
Hi,
I used the commands below to make Hartley's table,
but some values are NA.
You might want to contact the maintainer of SuppDists (cc'd).
Presumably, the C code uses inappropriate starting values
for those cases.
Meanwhile, here's a simpler way to genera
I've just realised the couple of graphs I put on here have been stripped
off. If anyone has to see them and can't see my problem from code, I can
send them directly to anyone who thinks they can help but wants to see them.
Thanks,
Ben W.
On 18/02/2011 23:29, Ben Ward wrote:
Hi, I wonder if an
Hello,
I've googled for a while and couldn't find anything on this topic: say
I have a matrix A and want to build matrices B1, B2,... using blocks
from A (or equivalently an array B with B[,,i] being a block from A),
and that I must sum the B[,,i]'s.
I've come up with this rather non-elegant code
On Feb 19, 2011, at 5:47 AM, danielepippo wrote:
Hi,
I have two vector with the marginal distribution like this:
a
[1] -0.419 -0.364 -0.159 -0.046 -0.010 -0.002 0.000 0.000 0.000
b
[1] 0.125 0.260 0.270 0.187 0.097 0.041 0.014 0.004 0.001
How can I calculate the joint distribution w
On Fri, Feb 18, 2011 at 8:00 PM, Tom Hopper wrote:
> Tal,
>
> One interactive capability that I have repeatedly wished for (but
> never taken the time to develop with the existing R tools) is the
> ability to interactively zoom in on and out of a data set,
>
I believe that you can do this with pla
Just a correction. My expected outdata frame was somehow distorted to a
single, one column. So correct one is:
marker1a markerb marker2amarker2b
11 1 1
13 1 3
33 3 3
33 3
Dear R help,
I am having a problem with the Design package and my problem is detailed
here.
I fit a cox model to my data and validate the Somer's Dxy using the Design
package.
(Because of computation time problem, i only try 10 bootstrap samples for
the time being)
This is the model without str
On 2/17/11 3:54 PM, Hasan Diwan wrote:
> According to [1] and [2], using RCurl to post a form with basic
> authentication is done using the postForm method. I'm trying to post
> generated interpolation data from R onto an HTTP form. The call I'm using is
> page <- postForm('http://our.server.com/
On Feb 19, 2011, at 8:40 AM, Umesh Rosyara wrote:
Just a correction. My expected outdata frame was somehow distorted
to a
single, one column. So correct one is:
marker1a markerb marker2amarker2b
11 1 1
13 1 3
Hi to all the people (again),
I'm doing some simulations with the memisc package of an own function, but
I've the problem that I didn't know how to read the result of such
simulations. My function is:
> Torre<-function(a1,N1,a2,N2)
+ {Etorre<-(a1*N1)/(1+a1*N1)
+ Efuera<-(a2*N2)/(1+a2*N2)
+ if(Et
On Sat, Feb 19, 2011 at 12:56 AM, Rohit Pandey wrote:
> Hi Christopher/ Dirk,
> Thank you very much for your replys. I think the idea of using inline as you
> suggest is the best way to start off with using c++ with R. I went through
> your examples and also plenty I found on the net. I have been
On Feb 19, 2011, at 10:35 AM, garciap wrote:
Hi to all the people (again),
I'm doing some simulations with the memisc package of an own
function, but
I've the problem that I didn't know how to read the result of such
simulations. My function is:
Torre<-function(a1,N1,a2,N2)
+ {Etorre<-(
I'm sorry it was my mistake. The two vectors are found as:
dpois(num,0.87)
dpois(num,2.08)
and represent the discrete density of 8 intervals (num=0:8).
--
View this message in context:
http://r.789695.n4.nabble.com/Joiny-probability-with-R-tp3314059p3314301.html
Sent from the R help mailing l
On Feb 19, 2011, at 11:05 AM, danielepippo wrote:
I'm sorry it was my mistake. The two vectors are found as:
dpois(num,0.87)
dpois(num,2.08)
and represent the discrete density of 8 intervals (num=0:8).
Is this homework?
--
View this message in context:
http://r.789695.n4.nabble.com/Joi
Hello
as the subject says I need a little help with following nonlinear regression
y(t) = a + b*x(t-1)+c*y_(t-1)+G*(a+b*x_(t-1))
where G=[1 + exp(-s(x_(t-1) - k)]^(-1)
(In reality there are more variables)
Please could anybody give me a hint how I can estimate this??
Should I use nls()? w
On 19-Feb-11 14:48:53, David Winsemius wrote:
> On Feb 19, 2011, at 5:47 AM, danielepippo wrote:
>> Hi,
>>I have two vector with the marginal distribution like this:
>>> a
>> [1] -0.419 -0.364 -0.159 -0.046 -0.010 -0.002 0.000 0.000 0.000
>>> b
>> [1] 0.125 0.260 0.270 0.187 0.097 0.041 0.01
# hi all,
# I'm trying to plot temperatures by date in a trellis plot by their
stations
# I'm plotting the following data.frame
library(lattice)
h <- structure(list(station_name = structure(c(3L, 4L, 2L, 10L, 11L,
12L, 6L, 7L, 5L, 8L, 9L, 3L, 4L, 2L, 10L, 11L, 12L, 6L, 7L, 5L,
8L, 9L, 3L, 4L, 2
On Feb 19, 2011, at 11:44 AM, Aviad Klein wrote:
# hi all,
# I'm trying to plot temperatures by date in a trellis plot by their
stations
# I'm plotting the following data.frame
library(lattice)
h <- structure(list(station_name = structure(c(3L, 4L, 2L, 10L, 11L,
12L, 6L, 7L, 5L, 8L, 9L, 3L,
On Sat, Feb 19, 2011 at 11:30 AM, Ted Harding wrote:
> On 19-Feb-11 14:48:53, David Winsemius wrote:
>> On Feb 19, 2011, at 5:47 AM, danielepippo wrote:
>>> Hi,
>>> I have two vector with the marginal distribution like this:
a
>>> [1] -0.419 -0.364 -0.159 -0.046 -0.010 -0.002 0.000 0.000
On 19.02.2011 06:08, Erin Hodgess wrote:
Dear R People:
I downloaded the binary for R-2.12.1 on Windows 7.
When checking help files, I got the following:
?mean
starting httpd help server ... done
Error in shell.exec(url) :
problem in displaying 'http://127.0.0.1:16945/library/base/html/
On 18.02.2011 11:02, Rosario Garcia Gil wrote:
Hello
I have a multiple linear regression with two cofactors, I would like to
represent a plane but I could not find any help which worked out.
Any suggestions.
One way is explained in:
library("scatterplot3d")
?scatterplot3d
Now see example
On 17.02.2011 22:10, li li wrote:
Hi all,
I have some some problem with regard to finding the integral of a
function containing an indicator function.
please see the code below:
func1<- function(x, mu){
(mu^2)*dnorm(x, mean = mu, sd = 1)*dgamma(x, shape=2)}
m1star<- function(x){
int
Hi Douglas,
Sorry for leaving that information out earlier.
I am running windows XP. I'm not sure about the tools you mention. I thought
installing the packages in R was enough. Are these tools like a program you
install?
The results of running sessionInfo() are:
R version 2.12.1 (2010-12-16)
P
Hi Graham,
Thanks, that does explain lots. I've been playing with making log's of
data in models to make the relationship linear, which it does, which
suggests to me that lm() is the right way to go, however, after if try
to predict after y values after about 60% on the x axis for light
trans
Hi, R users,
I'm wondering if there a way in R I can select cases based on a probability
vector. if a case is selected, that case is marked as 1, otherwise, 0.
For example:
x<-12:18
y<-1:7
sample(x,2,replace=FALSE,y)
I got:
[1] 15 17
What I want to see is:
[1] 0 0 0 1 0 1 0
Thanks.
Gary
On Feb 19, 2011, at 1:08 PM, Ben Ward wrote:
Hi Graham,
Thanks, that does explain lots. I've been playing with making log's of
data in models to make the relationship linear, which it does, which
suggests to me that lm() is the right way to go, however, after if
try
to predict after y valu
On Feb 19, 2011, at 12:03 PM, Uwe Ligges wrote:
On 18.02.2011 11:02, Rosario Garcia Gil wrote:
Hello
I have a multiple linear regression with two cofactors, I would
like to represent a plane but I could not find any help which
worked out.
Any suggestions.
One way is explained in:
l
On 2011-02-19 10:32, Hongwei Dong wrote:
Hi, R users,
I'm wondering if there a way in R I can select cases based on a probability
vector. if a case is selected, that case is marked as 1, otherwise, 0.
For example:
x<-12:18
y<-1:7
sample(x,2,replace=FALSE,y)
I got:
[1] 15 17
What I want to s
Hi All:
we have an existing GUI written in Java that allows users to access a slew of
remote satellite and other environmental data. The GUI allows the use to
browse the source, select the dataset, time and spatial extent of the data, and
then obtain that subset. There is a standalone version
Hi David,
I had use log(x)inside the lm call and used predict, although I didn't
know about logs of data making a multiplacative model
exp(log(x)+log(y)) = x*y.
I'll have a look at the poisson model. and see what I manage to produce.
Looking at the internet the Cumulative distribution functio
On 2011-02-19 07:35, garciap wrote:
Hi to all the people (again),
I'm doing some simulations with the memisc package of an own function, but
I've the problem that I didn't know how to read the result of such
simulations. My function is:
Torre<-function(a1,N1,a2,N2)
+ {Etorre<-(a1*N1)/(1+a1*N
Can't anybody give me a hint on how to solve this? I even bought the
ggplot2-book, so you could also give a page (or a series of pages).
Thanks,
Eric
On Thu, Feb 17, 2011 at 10:19 AM, Eric Fail wrote:
>
> Dear R-list
>
> I'm working with with geom_errorbar; specifically I'm trying to
> reproduce
I am trying to recode a variable into another variable and while the package
'car' works well when it is only recoding A into B, I am not sure I can do
the same with recoding (A or C) into B. If i can use recode please advise on
how to. So i am using an if/else if conditions.
My sample dataset is
Dear all, I am a new user of R and currently trying hard to develop my
own package. Here I am following this tutorial
'http://www.mathfinance.cn/how-to-create-an-R-package-in-windows/'
Here it says that (step 8): "open a “command prompt” window, change
the directory to where your package is, type
On Sat, Feb 19, 2011 at 4:39 PM, Nipesh Bajaj wrote:
> Dear all, I am a new user of R and currently trying hard to develop my
> own package. Here I am following this tutorial
> 'http://www.mathfinance.cn/how-to-create-an-R-package-in-windows/'
>
> Here it says that (step 8): "open a “command promp
Dear all,
might there be a modified barplot function out there which allows the user
to specify a fill color for the bars and independent parameters for the
overlaid shading lines ?
Currently, when I specify density and col, the fill color for the bars is
white.
Thanks!
Markus
[[alternat
Dear Nipesh,
On Sat, Feb 19, 2011 at 1:39 PM, Nipesh Bajaj wrote:
> Dear all, I am a new user of R and currently trying hard to develop my
> own package. Here I am following this tutorial
> 'http://www.mathfinance.cn/how-to-create-an-R-package-in-windows/'
>
> Here it says that (step 8): "open a
I have a dataframe called x2. It seems to have a date column but I can't
access it or give it a name or convert it to a date. How do I refer to that
first column and make it a date ? When I try x2[1,] I get the second column.
head(x2)
FAIRXSP500delta
2000-08-31
On Feb 19, 2011, at 4:36 PM, Krishnan Viswanathan wrote:
I am trying to recode a variable into another variable and while the
package
'car' works well when it is only recoding A into B, I am not sure I
can do
the same with recoding (A or C) into B. If i can use recode please
advise on
how
On Feb 19, 2011, at 4:50 PM, eric wrote:
I have a dataframe called x2. It seems to have a date column but I
can't
access it or give it a name or convert it to a date. How do I refer
to that
first column and make it a date ? When I try x2[1,] I get the second
column.
It is not actually
Thanks Gabor for your input. Here what I have done is that:
1. Copy 'MyPackage' folder (developed by package.skeleton) into
'C:\Program Files\R\R-2.12.1\bin' (I found R.exe is there)
2. In the command prompt, I changed the working directory using "CD"
command and run 'R CMD build MyPackage'
3. I
On Feb 19, 2011, at 5:14 PM, David Winsemius wrote:
On Feb 19, 2011, at 4:36 PM, Krishnan Viswanathan wrote:
I am trying to recode a variable into another variable and while
the package
'car' works well when it is only recoding A into B, I am not sure I
can do
the same with recoding (A or
So how would I convert those row names to dates and give that column the name
"Date" so that I can use subset and other functions on the Date column ?
--
View this message in context:
http://r.789695.n4.nabble.com/Accessing-DF-index-tp3314649p3314689.html
Sent from the R help mailing list archiv
On Feb 19, 2011, at 5:25 PM, eric wrote:
So how would I convert those row names to dates and give that column
the name
"Date" so that I can use subset and other functions on the Date
column ?
> x2$dtcol <- as.Date(rownames(x2))
> x2
FAIRXSP500delta
On Feb 19, 2011, at 5:25 PM, eric wrote:
So how would I convert those row names to dates and give that column
the name
"Date" so that I can use subset and other functions on the Date
column ?
You could have used subset without the new column:
> subset(x2, rownames(x2) < "2000-11-30")
Hi Eric,
It's not really a ggplot question. If you are plotting means you can
calculate the standard error as sd/sqrt(n). Then add and subtract the
standard error to create ymax and ymin.
Best,
Ista
On Sat, Feb 19, 2011 at 9:12 PM, Eric Fail wrote:
> Can't anybody give me a hint on how to solve
On Sat, Feb 19, 2011 at 5:31 PM, Nipesh Bajaj wrote:
> Thanks Gabor for your input. Here what I have done is that:
>
> 1. Copy 'MyPackage' folder (developed by package.skeleton) into
> 'C:\Program Files\R\R-2.12.1\bin' (I found R.exe is there)
>
> 2. In the command prompt, I changed the working di
Hi Gabor, can you be more detail on step 01? Is that not the correct
path for R.exe? But I found it there.
When I ran R CMD build MyPackage then actually got these warnings:
cygwin warnings:
MS-DOS style path detected: c:/Program Files/R/R-2.12.1/bin/Mypackage_1.0.tar
prefered POSIX equivalent is
Hi Scott,
Thank you for taking the time to look at my problem!
I played around with your example and realized that in solving the
problem with limits by summarizing the data I loose the option to
split the data along some third variable, say the 'color' variable in
the diamonds data.
Any idea on
On Sat, Feb 19, 2011 at 6:19 PM, Nipesh Bajaj wrote:
> Hi Gabor, can you be more detail on step 01? Is that not the correct
> path for R.exe? But I found it there.
>
> When I ran R CMD build MyPackage then actually got these warnings:
> cygwin warnings:
> MS-DOS style path detected: c:/Program Fil
Hi Eric,
Again, it's not really a ggplot question. If you want to plot
separately by color, you need to calculate means and standard errors
separatly by color also:
data(diamonds)
diamonds_df <- ddply(diamonds, .(cut, color), summarise,
mean_price = mean(price),
Hi,
I'm a second year Master's student in Applied Statistics. I am doing a
project using average weekly U.S. regular gasoline prices (in cents,
per gallon) from an Excel file (from the years 1990- May 2010). I want
to find the probability that the average weekly U.S. regular gasoline
pric
Thank you Scott and Ista,
I really appreciate your help! I solved it with Scott's help on the ddply.
For the record, here is the working example that solves my initial question:
## install.packages(c("ggplot2", "plyr"))
require(ggplot2)
data(diamonds)
diamonds <- diamonds[1:100,c(2,7)]
# use dd
On Feb 18, 2011 11:02 PM, "Deepayan Sarkar"
wrote:
>
> On Fri, Feb 18, 2011 at 11:04 PM, Elliot Joel Bernstein
> wrote:
> > I'm trying to use lattice graphics to produce some small plots for
inclusion in a LaTeX file. I want the LaTeX fonts to be used in the plots,
but to be scaled down to match
Hi,
I am using randomForest package to do some prediction job on GWAS data. I
firstly split the data into training and testing set (70% vs 30%), then
using training set to grow the trees (ntree=10). It looks that the OOB
error in training set is good (<10%). However, it is not very good for th
Dear all,
I have a rather complicated problem. I am trying to loop through making graphs,
so that the graph-making process is fully automated. For each graph, I'd like
to
make sure the corresponding title is formatted properly. The titles will be a
combination of a gene name and numerical posi
On Feb 19, 2011, at 7:41 PM, Josh B wrote:
Dear all,
I have a rather complicated problem. I am trying to loop through
making graphs,
so that the graph-making process is fully automated. For each graph,
I'd like to
make sure the corresponding title is formatted properly. The titles
will b
On Feb 19, 2011, at 7:41 PM, Josh B wrote:
Dear all,
I have a rather complicated problem. I am trying to loop through
making graphs,
so that the graph-making process is fully automated. For each graph,
I'd like to
make sure the corresponding title is formatted properly. The titles
will b
On Feb 19, 2011, at 10:19 PM, Umesh Rosyara wrote:
Thank you David
I was able to create dataframe and restore names with the following:
dfr1 <- data.frame(t( apply(dfr, 1, func) ))
names(dfr1) <- c("marker1a","marker1b", "marker2a",
"marker2b" ,"marker3a", "marker3b")
Still I wonder if the
Dear R-users and experts
I want to create to analyse my data which looks like follows:( I have show
only 8 variables but original variables much more number >1000)
*sub*
*ydata*
*X1*
*X2*
*X3*
*X4*
*X5*
*X6*
*X7*
*X8*
1
12
1
1
1
2
1
1
1
1
2
13
2
2
1
2
2
1
1
1
3
11
I am running Ubuntu 10.04 (on a Windows machine with dual boot) and I having
a very hard time trying to recover from what I initially thought was a minor
problem. I was trying to install "rattle()" and it failed, and after that I
cannot get R to run AT ALL! I've tried multiple times to reinstall it
Thank you David
I was able to create dataframe and restore names with the following:
dfr1 <- data.frame(t( apply(dfr, 1, func) ))
names(dfr1) <- c("marker1a","marker1b", "marker2a", "marker2b" ,"marker3a",
"marker3b")
Still I wonder if there is easier way to restore the names, in situations
I wish to generate a vector of uniformly distributed data with a
defined correlation to another vector
The only function I have been able to find doing something similar is
corgen from the library ecodist.
The following code generates data with the desired correlation to the
vector x but
On Feb 19, 2011, at 10:28 PM, David Winsemius wrote:
On Feb 19, 2011, at 10:19 PM, Umesh Rosyara wrote:
Thank you David
I was able to create dataframe and restore names with the following:
dfr1 <- data.frame(t( apply(dfr, 1, func) ))
names(dfr1) <- c("marker1a","marker1b", "marker2a",
"
On Feb 19, 2011, at 9:17 PM, Søren Faurby wrote:
I wish to generate a vector of uniformly distributed data with a
defined correlation to another vector
The only function I have been able to find doing something similar
is corgen from the library ecodist.
The following code generates dat
On Sat, Feb 19, 2011 at 6:17 PM, Søren Faurby
wrote:
> I wish to generate a vector of uniformly distributed data with a defined
> correlation to another vector
>
> The only function I have been able to find doing something similar is corgen
> from the library ecodist.
>
> The following code gener
Hi Soren,
Take a look at http://tolstoy.newcastle.edu.au/R/help/05/07/7741.html
HTH,
Jorge
On Sat, Feb 19, 2011 at 9:17 PM, Søren Faurby <> wrote:
> I wish to generate a vector of uniformly distributed data with a defined
> correlation to another vector
>
> The only function I have been able
Hi Nipesh,
Although "c:/Program Files/R/R-2.12.1/bin/" may be where R.exe is
located, it is not where you want to locate your package, and, as
Gabor pointed out, it is best to keep your package outside of the main
R tree. Your package does not need to be in the same location as
R.exe, you just ne
On Sat, 19 Feb 2011, David Winsemius wrote:
On Feb 19, 2011, at 4:50 PM, eric wrote:
I have a dataframe called x2. It seems to have a date column but I can't
access it or give it a name or convert it to a date. How do I refer to that
first column and make it a date ? When I try x2[1,] I get
81 matches
Mail list logo