Oh I forgot to mention that I had the standard normal distributed RVs in the
exponent to form V5. Otherwise it would make no sense.
--
View this message in context:
http://r.789695.n4.nabble.com/If-commands-in-a-while-loop-tp4680775p4680793.html
Sent from the R help mailing list archive at Nabb
Hi,
'
Not specific to 'R'. I search for patterns and found
http://patternsinfp.wordpress.com/ which is too heavy for me. There is a
'Pragmatic Programmer' book on such patterns for Scala and Clojure. Is
there anything for R ?
I wanted to code this. Is there a functional pattern in R for multip
Have you checked the r.lambda package of Brian Lee Yung Rowe
?
http://cran.r-project.org/web/packages/lambda.r/index.html
On 20 November 2013 10:02, wrote:
> Hi,
> '
> Not specific to 'R'. I search for patterns and found
> http://patternsinfp.wordpress.com/ which is too heavy for me. There is a
Hi
I have the following problem
I would like to build, from a matrix filled with 0 and with 1, a matrix
or a data.frame which contains, in every line, the number of the line
and the number of the column of the matrix for which the value is equal
to 1.
Exemple :
dput(m)
structure(c(0, 0, 0, 1, 0
Hello,
One approach is:
m <- structure(c(0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0, 0), .Dim = c(5L, 5L))
out <- which(m==1, arr.ind=TRUE)
out[order(out[,1]),]
Regards,
Pascal
On 20 November 2013 19:28, Arnaud Michel wrote:
> Hi
> I have the following problem
> I w
Also take a look at packages multgee repolr and VGAM, particularly repolr
if your data does not fit the PO model
Regards
Duncan
Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mac...@northnet.com.au
-Original Message-
From
Dear R users,
I am trying to run a Bayesian change point analysis on a time series with the R
package "bcpa". However, the data file needs to be of the class "track". My
data file is at present a three-column data frame (Time, X and Y coordinates)
and I am unable to change to class "track" usin
What this message means is that a "{" showed up when some other bracket was
unpaired. In this case, if you check your code, you'll see that
"if(MatriceDist[i,j] > 0 & ((vectorID[i] > 0 | vectorID[j] > 0))" is
lacking a closing ")" for the if clause.
Phalaen wrote
> Hi!
> I am a Phd student
Thank you Pascal
Its fine
Michel
Le 20/11/2013 11:55, Pascal Oettli a écrit :
Hello,
One approach is:
m <- structure(c(0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0, 0), .Dim = c(5L, 5L))
out <- which(m==1, arr.ind=TRUE)
out[order(out[,1]),]
Regards,
Pascal
On 20 Nove
I have some notes on functional programming in R at http://adv-r.had.co.nz/.
Hadley
On Wed, Nov 20, 2013 at 3:02 AM, wrote:
> Hi,
> '
> Not specific to 'R'. I search for patterns and found
> http://patternsinfp.wordpress.com/ which is too heavy for me. There is a
> 'Pragmatic Programmer' book o
Hi Catalin,
I tried with a subset of the variables. Infact, there is an option in lmList()
to subset
biN <- bi[,c(1,3,22,34)]
str(biN)
'data.frame': 66 obs. of 4 variables:
$ Exp : chr "B" "B" "B" "B" ...
$ Clona : Factor w/ 5 levels "A4A","AF2","Max4",..: 3 3 3 3 3 3 3 3
Dear R-Helpers,
I am using the (great) tables package in a function this way:
parplot <- function (x){
test <- pkqps[pkqps$estimate == x,]
#some plotting
#
tab <- tabular((Heading("Analyte")*(analyte) * Heading(Site)* (fsite))
~ (n=1)+ Justify(c)*Heading(substitute(test$estima
On 20/11/2013 9:17 AM, Jean-Louis Abitbol wrote:
Dear R-Helpers,
I am using the (great) tables package in a function this way:
parplot <- function (x){
test <- pkqps[pkqps$estimate == x,]
#some plotting
#
tab <- tabular((Heading("Analyte")*(analyte) * Heading(Site)* (fsite))
Hi,
Not sure if this is what you wanted.
mydf[,1] <- mydf[,1]+ISOdatetime(1970,1,1,0,0,0)
library(zoo)
z1 <- zoo(mydf[,2],mydf[,1])
fun1 <- function(z,n,k){
unlist(lapply(split(z,((seq_along(z)-1) %/% n) +1), function(x)
rollapply(c(rep(NA,k),x),width=n,mean,na.rm=TRUE)),use.names=FALSE)
}
> indx <- arrayInd(which(m>0), .dim=c(5, 5))
> indx
[,1] [,2]
[1,]41
[2,]23
[3,]43
[4,]24
[5,]15
# If you want the result sorted
> indx[order(indx[,1], indx[,2]),]
[,1] [,2]
[1,]15
[2,]23
[3,]24
[4,]41
[5,]43
On Mon, Nov 18, 2013 at 8:45 AM, PIKAL Petr wrote:
> Hi
>
>> -Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
>> project.org] On Behalf Of Zach Feinstein
>> Sent: Wednesday, November 13, 2013 2:57 PM
>> To: r-help@r-project.org
>> Subject: [R] R Beginner -
> fitdistr(y, "chi-squared", start = list(4), method = "Brent", lower=0.9,
> upper=3)
First, it would be nice if your mail had a subject line and you showed
the error message you got from this command.
I got:
> z <- fitdistr(y, "chi-squared", start = list(4), method="Brent", lower=0.9,
upper=
On Nov 20, 2013, at 4:24 AM, Carl Witthoft wrote:
> What this message means is that a "{" showed up when some other bracket was
> unpaired. In this case, if you check your code, you'll see that
> "if(MatriceDist[i,j] > 0 & ((vectorID[i] > 0 | vectorID[j] > 0))" is
> lacking a closing ")" for
Same thing using ggplot...
# your data
x <- c(rep(1,100),rep(2,100),rep(3,100))
y <- c(rnorm(100,1),rnorm(100,2),rnorm(100,3))
df <- data.frame(x=x, y=y)
library(ggplot2)
ggp <- ggplot(df) + labs(x="X", y="Y")
ggp <- ggp + geom_boxplot(aes(x=factor(x), y=y))
ggp <- ggp + geom_smooth(formula=y~
Thanks, these replies worked.
D.
--
View this message in context:
http://r.789695.n4.nabble.com/Setting-axis-scale-for-a-boxplot-tp4680704p4680821.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
htt
I have the same problem with my macbook air (OS X 10.9)
--
View this message in context:
http://r.789695.n4.nabble.com/RCmdr-issues-tp4680537p4680804.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
h
Hello,
I'm not a Stata user so I'm trying to reproduce Stata results that are given to
me in R. I would like to use a GLM with a complementary log-log function. The
stata code I have is:
glm c IndA fia, family(binomial s) link(cloglog) offset(offset)
The R code is:
glmt <- glm(data=dat
Thank you!
Elisa
2013/11/20 Carl Witthoft [via R]
> What this message means is that a "{" showed up when some other bracket
> was unpaired. In this case, if you check your code, you'll see that
> "if(MatriceDist[i,j] > 0 & ((vectorID[i] > 0 | vectorID[j] > 0))" is
> lacking a closing ")" fo
Thanks a lot. It worked :)
On Wed, Nov 20, 2013 at 9:44 AM, arun wrote:
> Hi,
> Try:
> dat1 <- read.table(text="a b c
> x 1 4 7
> y 2 5 8
> z 3 6 9",header=TRUE)
> dat2 <- dat1
> #either
> library(reshape2)
> res1 <-
> within(melt(dat1,id.var="ID"),cell<-as.character(interaction(variable,ID,sep
Classification trees use the Gini index, whereas the regression trees use sum
of squared errors. They are "hard-wired" into the C/Fortran code, so not
easily changeable.
Best,
Andy
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of
Greetings!
After generating a neural network based on a given data set (the data set
consists of two input variables and 1 output variable), I get the following
output from calling the summary function on the resulting Neural Network
object (using the nnet package):
>summary(nnetModel)
a 2-3-1 n
Hello R users
I have a question with Kaplan-Meier Curve with respect to my research. We
have done a retrospective study on fillings in the tooth and their survival
in relation to the many influencing factors. We had a long follow-up time
(upto 8yrs for some variables). However, we decided to stop
Dear Laura,
I assume that you're responding to the message that I posted on R-SIG-Mac. If
so, I'm not sure why you switched to R-help nor why you changed the subject of
the message. Please see the subsequent messages on R-SIG-Mac under the subject
"Problems with Rcmdr via XQuartz on OSX Maveric
Hello,
I installed the newest version of R (3.0.2) as well as the newest version of
nlme (3.1-113) in order to use summary.lmList and other nlme functions. Once
loading the new library, lmList and summary.lm can be found, but a number of
additional functions cannot be found via command.
Versions
I often work with tree data that is sampled with probability proportional
to size, which presents a special challenge when describing the frequency
distribution. For example, R functions like quantile() and fitdistr()
expect each observation to have equal sample probability. As a workaround,
I ha
Hi,
I am using the AUCRF package for my data and I was firstly impressed by the
high performance of OOB-AUC. But after a while, I feel it might be due to
some sort of bias, which motivates me to use random data (generated using
rnorm) for a test.
The design is very simple: 100 observations with 5
Dear everybody,
I have 20 levels of a factor.
I want to create 1000 combinations of 6 different levels of that factor so
that each level is repeated about the same number of times (across 100
combinations) and so that the number of times level X is combined with
level Y is also about the same (acr
megan herting chla.usc.edu> writes:
>
> Hello,
>
> I installed the newest version of R (3.0.2) as well as the
> newest version of
> nlme (3.1-113) in order to use summary.lmList and other
> nlme functions. Once
> loading the new library, lmList and summary.lm can be found,
> but a number of
David Winsemius comcast.net> writes:
>
>
> On Nov 19, 2013, at 10:59 AM, Calum wrote:
>
> > Hi there,
> > I hope someone can help me.
> >
> > I have a dataset of Concentration against Mortality, and I am trying to
> > compare the use of Logit and Probit models using this data.
[snip snip sn
Floor Biemans hotmail.com> writes:
[snip]
> The stata code I have is:
>
> glm c IndA fia, family(binomial s) link(cloglog) offset(offset)
>
> The R code is:
>
> glmt <- glm(data=dataset, c ~ IndA + fia, offset = offset, family =
binomial(link = cloglog))
>
> Which yields different results fr
Rather than "exploding", I suggest you order your data according to tree
diameter, then calculate the cumulative sum of the tree densities, and use
linear interpolation to estimate the percentiles. For example ...
library(plotrix)
attach(trees.df)
ord <- order(Diameter)
CumDensOrdScaled <- resc
On 20/11/2013 21:42, Ben Bolker wrote:
megan herting chla.usc.edu> writes:
Hello,
I installed the newest version of R (3.0.2) as well as the
newest version of
nlme (3.1-113) in order to use summary.lmList and other
nlme functions. Once
loading the new library, lmList and summary.lm can be fo
On 11/21/2013 08:41 AM, Dimitri Liakhovitski wrote:
Dear everybody,
I have 20 levels of a factor.
I want to create 1000 combinations of 6 different levels of that factor so
that each level is repeated about the same number of times (across 100
combinations) and so that the number of times level
On Nov 20, 2013, at 12:01 PM, Dr.Vinay Pitchika wrote:
> Hello R users
>
> I have a question with Kaplan-Meier Curve with respect to my research. We
> have done a retrospective study on fillings in the tooth and their survival
> in relation to the many influencing factors. We had a long follow-u
On Nov 20, 2013, at 12:44 PM, Jack Luo wrote:
> Hi,
>
> I am using the AUCRF package for my data and I was firstly impressed by the
> high performance of OOB-AUC. But after a while, I feel it might be due to
> some sort of bias, which motivates me to use random data (generated using
> rnorm) for
On Nov 20, 2013, at 11:35 AM, Trevor Walker wrote:
> I often work with tree data that is sampled with probability proportional
> to size, which presents a special challenge when describing the frequency
> distribution. For example, R functions like quantile() and fitdistr()
> expect each observa
You could try:
require(quantreg)
qs <- rq(x ~ 1, weights = w, tau = 1:3/4)
Roger Koenker
rkoen...@illinois.edu
On Nov 20, 2013, at 4:56 PM, David Winsemius wrote:
>
> On Nov 20, 2013, at 11:35 AM, Trevor Walker wrote:
>
>> I often work with tree data that is sampled with probability propo
Hi all,
Can anyone help me with below integrate function?
Basically, I want to calculate the integral of the sum of two kernel
density functions.
But the error shows that:
In x - a :
longer object length is not a multiple of shorter object length
y1 = rnorm(10)
y2 = rnorm(10)
fhat <- functio
On Nov 20, 2013, at 7:12 PM, dan wang wrote:
> Hi all,
>
> Can anyone help me with below integrate function?
>
> Basically, I want to calculate the integral of the sum of two kernel
> density functions.
> But the error shows that:
> In x - a :
> longer object length is not a multiple of short
On Nov 20, 2013, at 8:39 PM, David Winsemius wrote:
>
> On Nov 20, 2013, at 7:12 PM, dan wang wrote:
>
>> Hi all,
>>
>> Can anyone help me with below integrate function?
>>
>> Basically, I want to calculate the integral of the sum of two kernel
>> density functions.
>> But the error shows th
Hello,
I have a fairly large data.frame. (About 150,000 rows of 100
variables.) There are case IDs, and multiple entries for each ID, with a
date stamp. (i.e. records of peoples activity.)
I need to iterate over each person (record ID) in the data set, and then
process their data for each date
Hi, Im still new to R and I have a problem regarding the code below. I don't
know how to solve that. I want
to compute profile log-likelihood using the rainfall data. I use the code below
from Dunn:
"
tweedie.profile(Amount~Year*Month,p.vec=seq(1.35,1.75,length=50),method="series",do.ci=TRUE)
Hi,
I am trying to install R on the Unix system. When I type './configure', it
seems many not installed on my computer. The last one is 'configure: error:
No F77 compiler found'.
Can you tell me where I can get these software before installing R?
Thanks!
Dawn
[[alternative HTML version
在 2013年4月21日星期日UTC+8上午12时02分31秒,Lorenzo Isella写道:
>
> Dear All,
> I am looking for an R implementation of the convergent cross mapping
> method (see http://bit.ly/XN8OZX and
>
> http://www.uvm.edu/~cdanfort/csc-reading-group/sugihara-causality-science-2012.pdf
>
> )
>
> The method is prese
Hi Roberto,
I need to do the same..did you manage to figure it out?
Thanks.
On Thursday, September 27, 2012 8:02:56 PM UTC+1, Roberto wrote:
>
> Hi all,
> I need to obtain the LV variance from my PLS-DA analysis.
> I tried to read the reference manuale of the package, but I do not found
> infor
I have a data frame with the column for latitude and another column for
longitude. I would like to create a reverse geocoding function that creates
another column with the address corresponding to this lat and lon
i.e
lat lon address
41.4938 -81.9860
Hi,
dat1 <- read.csv("Manal.csv",header=FALSE)
str(dat1)
#'data.frame': 31 obs. of 9 variables:
# $ V1: int 1 1 1 1 3 1 2 2 3 2 ...
# $ V2: int 1 1 0 0 0 1 0 0 0 0 ...
# $ V3: int 0 0 1 0 0 0 0 0 0 0 ...
# $ V4: int 1 1 0 0 0 0 0 0 0 0 ...
# $ V5: int 0 0 1 0 1 0 0 1 1 0 ...
# $ V6: int
R-helpers,
I'm using system() to run a shell script that uses a library written in C++ to
analyze natural language (FreeLing: http://nlp.lsi.upc.edu/freeling). When I
run the following code in RStudio (0.97.248) and R.app (1.62) on Max OSX
(10.7.5):
> cmd <- "analyze -f /usr/local/share/freeli
Hi,
Suppose, if I create 15 files in my working directory.
set.seed(48)
lapply(1:15,function(i) {m1 <-
matrix(sample(1:20,1686*2,replace=TRUE),nrow=1686,ncol=2);
write.table(m1,paste0("file_",i,".txt"),row.names=FALSE,quote=FALSE)})
D <-dir()
D1 <- D[order(as.numeric(gsub("\\D+","",D)))]
D1
Why isn't it as obvious to you as it is to me that this question belongs on the
RStudio forum rather than here?
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##
One solution is to format the data as if the follow-up period ended on day
2190. For example,
TTT <- Survival_days
DDD <- Outcome
DDD[ TTT>2190 ] <- 0
TTT[ TTT>2190 ] <- 2190
survfit(Surv(TTT, DDD) ~ Gender)
-tgs
On Wed, Nov 20, 2013 at 3:01 PM, Dr.Vinay Pitchika
wrote:
> Hello R users
>
>
How about using the asp option? For example,
A <- matrix(rnorm(200),20)
image(A, asp=ncol(A)/nrow(A))
-tgs
On Tue, Nov 19, 2013 at 3:56 AM, Mercutio Florid
wrote:
>
> Today at 10:03 AM
> I use several different versions of R, including RGui on Windows and
> rstudio on Linux. In all cases, I
Hi,
I guess the trouble is here:
lapply(1:4,function(i) {paste(("file_",i,".txt"),sep="")})
Error: unexpected ',' in "lapply(1:4,function(i) {paste(("file_",
lapply(1:4,function(i) {paste("file_",i,".txt",sep="")}) #works
#or
lapply(1:4,function(i) {paste0("file_",i,".txt",sep="")})
A.K.
Hi
I forgot to delete the `sep` from the 2nd option:
lapply(1:4,function(i) {paste0("file_",i,".txt")})
A.K.
On Thursday, November 21, 2013 1:43 AM, arun wrote:
Hi,
I guess the trouble is here:
lapply(1:4,function(i) {paste(("file_",i,".txt"),sep="")})
Error: unexpected ',' in "lapply(1:4,funct
Thank you also for your help
Michel
Le 20/11/2013 19:04, Dennis Murphy a écrit :
Hi:
which(m == 1L, arr.ind = TRUE)
Dennis
On Wed, Nov 20, 2013 at 2:28 AM, Arnaud Michel wrote:
Hi
I have the following problem
I would like to build, from a matrix filled with 0 and with 1, a matrix
or a data.f
I have a logistic model fitted with the following R function:
glmfit<-glm(formula, data, family=binomial)
A reasonable cutoff value in order to get a good data classification (or
confusion matrix) with the fitted model is 0.2 instead of the mostly used
0.5.
And I want to use the `cv.glm` fu
61 matches
Mail list logo