Your example is not reproducible. [1]
Usually we use subset() or vector/array indexing when we want to work with part
of the data. Apparently you want to exclude rows that specify "north" for which
the year does not have a corresponding row with the same year and specifies
"south".
southidxs <
On Jan 23, 2013, at 5:31 PM, David Winsemius wrote:
On Jan 23, 2013, at 7:13 AM, emorway wrote:
The following 1460 x 1460 matrix can be throught of as 16 distinct
365 x 365
matrices. I'm trying to set off-diaganol terms in the 16 sub-
matrices with
indices more than +/- 5 (days) from each
Dear Daniel,
That's exactly what I also suspected (last post). The question now seems how to
correctly convert .Random.seed from signed to unsigned so that it is accepted by
the rlecuyer package.
Cheers,
Marius
__
R-help@r-project.org mailing list
ht
Hi,
It means that the functions "combn" from the package "utils" is masked
because a function with the same name exists in loaded package "combinat".
You still can access the one from the package "utils" using:
> utils::combn
HTH,
Pascal
Le 24/01/2013 15:04, Fumie Sugahara a écrit :
Hi
Th
Hi
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Jonathan Greenberg
> Sent: Wednesday, January 23, 2013 5:44 PM
> To: r-help
> Subject: Re: [R] Adding a line to barchart
>
> Great! This really helped! One quick follow-up
Hi
The message occurred from R, when I was selected of "optimization > block
diagonal Fhiser matrix" and used the attached file on PFIM.
Could you please advise me about the following message?
*
Loading required pakage: combinat
Attaching package:'combinat'
The follow
Below is the data sample(example) that I use to make boxplots. I tried
everything I could think of but cannot make a plot where for the south site
only years existing in data for this site show. Is what I am trying to do
possible? Thank you. Here is my code:
ggplot(stest, aes(x=year, y=conc))
Guangzhou Lidun Hologram Co., Ltd.
Home|Product|company Profile |Contacts|more
DearFriends,
Best Wishes For You!
Wish you have a good day!We are the major manufacturer and exporter of silicone
bracelets and holographic stickers with more than
ten years experience in China. Also, custom brace
HI David,
It could be related to spaces in the data or something else.
Suppose, if the data has some spaces at the end or the beginning.
pub1 <- c('Brown DK, Santos R, Rome DF, Don Juan X')
pub2 <- c('Benigni D')
pub3 <- c('Arstra SD, Van den Hoops DD, lamarque D ')
pubnew<-rbind(pub1, pub2,
Hi, I'm curious about the ability of these two methods to really wrap (I
mean as in delegate) the target object instead of deep copying and
transforming it to a new structure. First, specifically for vectors.
Second, in general (my hunch is that -say- map<->env are transformed copies
but it's just
On 24-01-2013, at 01:58, emorway wrote:
> I'm not following. Printing SEQ to the screen at the intermediate steps
> using the following modified R code suggests that 'i' is fine and is not
> getting reset to 1 as you suggest?
You misread. I did not say anything about 'i'.
> My understanding,
thanks, it works well. I have to work on Arun's previous answer to make it work
too.
David
>
> De : Rui Barradas
>À : Biau David
>Cc : r help list
>Envoyé le : Mercredi 23 janvier 2013 19h57
>Objet : Re: [R] extracting characters from a string
>
>Hello,
On 23 Jan 2013, at 21:36, "Francesco Sarracino" wrote:
> what I meant refers to the fact that I've read on "an R and
> S-plus companion to applied regression" about methods to alter the encoding
> of factors when using contrasts in regressions. These are options (for
> contrasts) that ca
Here's another approach using the sampling profiler:
prof <- function() {
Rprof(memory.profiling=T, interval=0.001)
replicate(100, f())
Rprof(NULL)
summaryRprof(memory = "stats")
}
f <- function() {
x = seq(1000)
for(i in seq(1000)) {
x[i] <- x[i] + 1
}
}
prof()
=>
index: "pr
Thanks a lot.
y <- iconv(x, "gb2312", "utf-8") does not work but
y <- iconv(x, "gb2312", "UTF8") works on my machine. Thank you for pointing to
the right direction.
-Original Message-
From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]
Sent: Wednesday, January 23, 2013 6:16 PM
To:
Hi Adam,
On Jan 23, 2013, at 11:36 AM, Adam Gabbert wrote:
> Hello Gentlemen,
>
> I mistakenly sent the message twice, because the first time I didn't receive
> a notification message so I was unsure if it went through properly.
>
> Your solutions worked great. Thank you! I felt like I was
HI,
Not sure this is what you wanted.
for (i in 731:732) {
SEQ <- (i - 5):(i + 5)
print(SEQ)
SEQ <- SEQ[SEQ > 730 & SEQ < 1096]
print(SEQ)
vec1<-731:741
print(vec1[!vec1%in%SEQ])
}
#[1] 726 727 728 729 730 731 732 733 734 735 736
#[1] 731 732 733 734 735 736
#[1] 737 738 739 740 741
#
Hey Mark,
I am aware of this package. The situation is,
1. I am emailing my code from my machine to a public machine. Installation
is a hassle.
2. Copy pasting for a website.
I know there are websites for formatting Java and C code. So, I am looking
for a website in particular, and I have seen
Are you only interested in formatting code from copy and pasting to/from email?
If you are interested in formatting your code in Latex/PDF/HTML take a look at
the knitr package:
http://yihui.name/knitr/
Also, you could check out the formatR package:
http://cran.r-project.org/web/packages/forma
Hi list,
Could anyone recommend some good website for formatting R code? For
example, when you copy paste R code to gmail and back to R, it loses its
format, the dash symbol causes errors.
I've had someone used it to format my code here on the list, but can't find
it anymore.
Mike
[[al
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of emorway
> Sent: Wednesday, January 23, 2013 4:59 PM
> To: r-help@r-project.org
> Subject: Re: [R] setting off-diagonals to zero
>
> I'm not following. Printing SEQ to the screen
On 13-01-23 8:19 PM, Hui Du wrote:
Hi all,
I am planning to parse some information on a website which includes lots of
Chinese characters. Does someone know how to read/display Chinese in R? Thanks.
url = "http://www.teec.org.cn/html/renwujieshao/";
x = readLines(url)
If you look at the fir
On Jan 23, 2013, at 7:13 AM, emorway wrote:
> The following 1460 x 1460 matrix can be throught of as 16 distinct 365 x 365
> matrices. I'm trying to set off-diaganol terms in the 16 sub-matrices with
> indices more than +/- 5 (days) from each other to zero using some for loops.
> This works wel
Hi all,
I am planning to parse some information on a website which includes lots of
Chinese characters. Does someone know how to read/display Chinese in R? Thanks.
url = "http://www.teec.org.cn/html/renwujieshao/";
x = readLines(url)
I tried encoding = 'UTF-8' already but it didn't help.
My R
I'm not following. Printing SEQ to the screen at the intermediate steps
using the following modified R code suggests that 'i' is fine and is not
getting reset to 1 as you suggest? My understanding, or rather my desired
output if someone else is able to weight-in, is that the values in the
second
Hello R-users
I am getting error messagens when I require some packages or execute some
procedures, like these below:
> require(tseries)
Loading required package: tseries
Error in get(Info[i, 1], envir = env) :
cannot allocate memory block of size 2.7 Gb
> require (TSA)
Loading required
I had the same problem but it now works if you remove some of the #info lines
at the top of the file so that the number of lines is the same as the
example sequence.vcf file before the data starts
--
View this message in context:
http://r.789695.n4.nabble.com/SNPRelate-package-error-tp4656236p4
Marius,
I looked it up in the original L'Ecuyer's paper: The seed must be larger
than 0. Thus, the function defines the seed variable as unsigned long
integer. You're passing a negative number, so I think there is some
overflow going on.
The internal L'Ecuyer RNG is a modification of the ori
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Marius Hofert
> Sent: Wednesday, January 23, 2013 2:24 PM
> To: Hana Sevcikova
> Cc: R-help
> Subject: Re: [R] How to construct a valid seed for l'Ecuyer's method
> withgiven .Rand
Dear Hana,
Thanks for helping.
I am still wondering, why m1 (which should be 2^32-209 [see line 34 in
./src/RngStream.c]) is -767742437 in my case and why the minimal example you
gave was working for you but isn't for me.
Apart from that, ?.Random.seed -> "L'Ecuyer-CMRG" says:
,
| The 6 ele
Hi Michael,
The supervisorfor my Master'sThesis told me that my means are the effect size
and cause of this I have to take figure 1 for all standard deviations. So I
hope that was the right information.
From: Michael Dewey
lfgang.viechtba...@maastrichtu
Thank you all for your replies. Let me try to explain my point: first of
all, let me clarify that I didn't mean to criticize anyone (or anything).
Secondly, what I meant refers to the fact that I've read on "an R and
S-plus companion to applied regression" about methods to alter the encoding
of f
Given that your labels are "no" and "yes", what do you expect R to
do? To quote a well-known fortune, "R is lacking a mind_read() function!"
cheers,
Rolf Turner
On 01/23/2013 10:58 PM, Francesco Sarracino wrote:
Thanks,
this works! but I am surprised that R has such a strange beh
On Jan 23, 2013, at 12:14 PM, Katherine Gobin wrote:
> Dear R helpers,
>
> I have following loss data and I need to fit LEFT truncated Log Normal
> distribution to this data which is Truncated at 100.
>
> dat =
> c(1333834,5710254,9987567,7809469,6940935,3473671,1270209,1102523,1124002,
Dear R helpers,
I have following loss data and I need to fit LEFT truncated Log Normal
distribution to this data which is Truncated at 100.
dat =
c(1333834,5710254,9987567,7809469,6940935,3473671,1270209,1102523,1124002,
5830159,4302300,3925242,2638409,2324421,7238436,9088709,7439250,49765
I need to repeat a function many times, with differing parameters held
constant across iterations. To accomplish this, I would like to create a
list (or vector) of parameters, and then insert that list into the function.
For example:
q<-("l,a,b,s")
genericfunction<-function(q){
}
##
The eq
Hi,
If the `spaces` in "father", "mother", "num_daughter" columns needs to be
replaced by the values in the previous row,
dat1<-read.table(text="
father, mother, num_daughter, daughter
291, 3906, 0,
275, 4219, 0,
273, 4236, 1, 49410
281, 4163, 1, 49408
274, 4226, 1, 49406
295, 3869, 2, 49403
Please read ?read.table again, and pay special attention to the
check.names argument.
A - is not allowed in a column name because it would lead to problems like:
mydata$a-b vs mydata$a - b
where
mydata$a.b has no such confusion.
If you must have - instead of ., you can use check.names=FALSE and
Thank you for the suggestions.
Just to clarify, my first question was more on what actual coding I
should be using to indicate a nested variable when using the coxph()
function. I asked this after consulting several times with a local
statistician, but unfortunately neither of us are very familia
Hi,
You could try this:
dat1<-read.table(text=pub,sep=",",fill=TRUE,stringsAsFactors=F)
dat2<- as.data.frame(do.call(cbind,lapply(dat1,function(x) gsub(" $","",gsub("^
|\\w+$","",x,stringsAsFactors=F)
dat2
# V1 V2 V3 V4
#1 Brown Santos Ro
To Whom It May Concern:
I have noticed that all of the hyphens ("-") are changed to periods (".") when
I try to read.table() and the headers contain "-"
I am using R 2.13 on a RedHat system.
Here is the situation:
I have the following a tab-delimited text file saved as test.txt
File1-a.txt
F
Hello,
I've just noticed that my first solution would only return the first set
of alphabetic characters, such as "Van", not "Van den Hoops".
The following will solve that problem.
fun2 <- function(x, sep = ", "){
x <- strsplit(x, sep)
m <- lapply(x, function(y) gregexpr(" [[:
plot(1)
legend('topleft',legend=expression(A,italic(A),bolditalic(A),Delta*italic(D)))
On Wed, Jan 23, 2013 at 9:45 AM, raz wrote:
> Hello,
>
> I'm trying to add a symbol (Delta) to plot legend with text using
> "expression(paste())" but this disables the text.font that allows to use
> bold or i
Hello,
Try the following.
fun <- function(x, sep = ", "){
s <- unlist(strsplit(x, sep))
regmatches(s, regexpr("[[:alpha:]]*", s))
}
fun(pub)
Hope this helps,
Rui Barradas
Em 23-01-2013 17:38, Biau David escreveu:
Dear All,
I have a data frame of vectors of publication name
1. Study a regular expression tutorial on the web to learn how to do this.
2. ?regex in R summarizes (tersely! -- but clearly) R's regex's.
3. ?grep tells you about R's regular expression manipulation functions.
-- Bert
On Wed, Jan 23, 2013 at 9:38 AM, Biau David wrote:
> Dear All,
>
> I have
Thanks!
The comments and the information provided were extremely helpful to me.
According to DRAFT r-sig-mixed-models FAQ, "do not compare lmer models
with the corresponding lm fits, or glmer/glm; the log-likelihoods are
not commensurate". The problem is not the link function but rather the
diffe
Dear All,
I have a data frame of vectors of publication names such as 'pub':
pub1 <- c('Brown DK, Santos R, Rome DF, Don Juan X')
pub2 <- c('Benigni D')
pub3 <- c('Arstra SD, Van den Hoops DD, lamarque D')
pub <- rbind(pub1, pub2, pub3)
I would like to construct a dataframe with only author's
> > I need a quick help with the following graph (I'm a lattice newbie):
> >
> > require("lattice")
> > npp=1:5
> > names(npp)=c("A","B","C","D","E")
> > barchart(npp,origin=0,box.width=1)
> >
> > # What I want to do, is add a single vertical line
> positioned at x = 2
> > that lays over the
To find the proportion of "yes"s in pp you can use
mean(pp == "yes")
and avoid the conversion of a factor to integer (and
subtracting 1). The above works for character and factor
pp.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-help-boun...@r-
I think it is a fair bit of work to interpret the freq=TRUE (prob=FALSE)
version of hist() when the bins have unequal sizes. E.g.,
in the following the bins are sized so that each contains
an equal number of observations. The resulting flat
frequency plot is hard for me to interpret. The density
On Jan 23, 2013, at 1:58 AM, Francesco Sarracino wrote:
Thanks,
this works! but I am surprised that R has such a strange behavior
and that
there is no way to control it.
BTW, also as.integer(pp)-1 works!
Still, it doesn't look to me as a first best.
At any rate, thanks a lot for your help.
Hello,
I'm trying to add a symbol (Delta) to plot legend with text using
"expression(paste())" but this disables the text.font that allows to use
bold or italic text.
as follows:
x=c(1:10)
y=c(1:10)
plot(x,y)
legend(1,10,legend=c("A","B","C",expression(paste(Delta, D))),
pch=c(24,18,17,16),
Great! This really helped! One quick follow-up -- is there a trick to
placing a label wherever the line intersects the x-axis (either above or
below the plot)?
On Tue, Jan 22, 2013 at 11:49 PM, PIKAL Petr wrote:
> Hi
> This function adds line to each panel
>
> addLine <- function (a = NULL, b
Or...
fs<-rep(1:ceiling(length(test)/10),each=10)[1:length(test)]
result<-by(test,fs,mean)
which will get you the version with the 101st as a single datapoint
so many possibilities..
On 23.01.2013, at 16:43, David L Carlson wrote:
> You didn't indicate what you want to do with the 101st observa
I think you want %in%
subpool %in% pool
pool %in% subpool
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
+ 32 2 525 02 51
+ 32
Hello Gentlemen,
I mistakenly sent the message twice, because the first time I didn't
receive a notification message so I was unsure if it went through properly.
Your solutions worked great. Thank you! I felt like I was fairly close
just couldn't quite get the final step.
Now, I'm trying to rev
Dear Daniel,
Oh, I see I forgot to comment on your second specification in my last reply:
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of David Purves
> Sent: Wednesday, January 23, 2013 10:23 AM
> To: John Fox
> Cc: r-help@R-
On 23-01-2013, at 16:13, emorway wrote:
> The following 1460 x 1460 matrix can be throught of as 16 distinct 365 x 365
> matrices. I'm trying to set off-diaganol terms in the 16 sub-matrices with
> indices more than +/- 5 (days) from each other to zero using some for loops.
> This works well f
Hello Duncan,
Thanks for this!
This works!
Best,
Rebecca
-Original Message-
From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]
Sent: Wednesday, January 23, 2013 11:23 AM
To: Yuan, Rebecca
Cc: R help
Subject: Re: [R] to check if a character string is in a group of character
string
Dear Daniel,
Eventually, FactoMineR (and other Rcmdr plug-ins) really should be updated
to conform to R 3.0.0 requirements, but I've modified the development
version 1.9-4 of the Rcmdr on R-Forge to allow a new option to accommodate
some of these plug-ins. If you set
options(Rcmdr=list(RcmdrEnv.on
Not sure what you want this for, but work along the following:
> pool = c("s1","s2")
> subpool = c("s1")
> ifelse(pool==subpool,1,0)
[1] 1 0
Notice:
> pool2 = c("s2","s1")
> ifelse(pool2==subpool,1,0)
[1] 0 1
Etc.
Hope this helps.
José
José Iparraguirre
Chief Economist
Age UK
-Origin
On 13-01-23 11:14 AM, Yuan, Rebecca wrote:
Hello,
How can I judge if a string is in a group of string? For example, I would like
to have
if (subpool in pool){
}else{
}
if (subpool %in% pool)
Duncan Murdoch
Where
pool = c("s1","s2")
subpool = c("s1")
How can I write the "subpool in po
Dear David,
It certainly helps to have a "reproducible example."
You've left out the error variances ("uniquenesses") for the observed
variables. You're also making the specification *much* harder than it needs
to be:
-- snip ---
> cfa.mod.1 <- cfa()
1: F: a, b, c, d, e, g
2:
Re
Hello,
How can I judge if a string is in a group of string? For example, I would like
to have
if (subpool in pool){
}else{
}
Where
> pool = c("s1","s2")
> subpool = c("s1")
How can I write the "subpool in pool" right in R?
Thanks very much!
Cheers,
Rebecca
---
Hi,
May be this helps:
df1<-read.table(text="
father,mother,num_daughter,daughter
291,3906,0,
275,4219,0,
273, 4236,1,49410
281,4163,1,49408
274, 4226,1,49406
295, 3869,2,49403
295,3869,2,49404
287,4113,0,
295, 3871,1,49401
292, 3895,4,49396
292,3895,4, 49397
292,3895,4,49398
292,3895,4,49399
29
Hi,
It's not clear regarding those blanks especially, the num_daughter. I guess
the father and mother would be the same as the previous row.
Deleting those rows:
df1 <- read.table(text="father mother num_daughter daughter
291 3906 0 NA
275 4219 0 NA
273 4236 1
Hi John
Thanks for your quick reply.
The full warning I got is
' Error in csem(model = model.description, start, opt.flag = 1, typsize =
typsize, :
The matrix is non-invertable.'
The eigenvalues of the tetrachoric correlations are non negative. So it is must
be how I am defining my model.
Hi,
Try this:
x1<-x[rev(order(x$Names,x$Values)),]
do.call(rbind,tapply(x1$Values,list(x1$Names),head,2))
# [,1] [,2]
#CK113234 223.2966 222.6737
#CK113298 192.5964 187.7486
#CK114042 236.3939 232.0223
#CK116292 237.5936 228.0037
#CK116296 223.6372 210.6630
#The average
tapply(x1$
You didn't indicate what you want to do with the 101st observation. Arun's
solution creates an 11th group and divides by the number in the group(1),
while Jessica's solution creates an 11th column and divides by 10.
> test[101] <- 100
> unlist(lapply(split(test,((seq_along(test)-1)%/% 10)+1),mean)
I think you need to become more familiar with the "factor" data type. Reread
the Introduction to R document that comes with R.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics:
The following 1460 x 1460 matrix can be throught of as 16 distinct 365 x 365
matrices. I'm trying to set off-diaganol terms in the 16 sub-matrices with
indices more than +/- 5 (days) from each other to zero using some for loops.
This works well for some, but not all, of the for loops. The R code
Gabriela Agostini gmail.com> writes:
>
[snip]
> I am working with GLMM using the binomial family
> I use the following codes
>
> I dropped no significant terms, refitting the model and comparing the
> changes with likelihood:
>
> G.1<-lmer(data$Ymat~stu+spi+stu*sp1+(1|ber),data=data,family="
Post elsewhere (e.g. stats.stackexchange.com). This is not a
statistical tutorial site.
-- Bert
On Wed, Jan 23, 2013 at 5:28 AM, Torvon wrote:
> Dear R Mailinglist,
>
> I want to understand how predictors are associated with a dependent
> variable in a regression. I have 3 measurement points. I'
Dear David,
On Wed, 23 Jan 2013 11:19:09 +
David Purves wrote:
> Hi
>
> Sorry for the rather long message.
>
. . .
>
> I have tried the analysis using John Fox's SEM package / command.
>
> I calculate the correlation matrix with smoothing
>
> my.cor<-hetcor(north.dat.sub,use="pairwise
I found a code:
y.ts <- ts(data, frequency=12)
aggregate(y.ts, FUN=quantile, probs=0.10)
Seems it works fine even for a big data.frame.
Thanks for your help.
2013/1/22 David Winsemius
>
> On Jan 22, 2013, at 5:58 AM, Simonas Kecorius wrote:
>
> Hey Duncan,
>>
>> Neither me do imagine what fo
Hi Nico,
You can use tapply:
> tapply( x[["Values" ]], x[[ "Names" ]], mean )
CK113234 CK113298 CK114042 CK116292 CK116296
216.5061 190.1725 222.8710 220.4324 204.5741
Alternatively,
> tapply( x$Values, x$Names, mean )
CK113234 CK113298 CK114042 CK116292 CK116296
216.5061 190.1725 222.8710 2
Hi Wolfgang,
thanks for the instant and comprehensive reply!
On 01/23/2013 12:39 PM, Viechtbauer Wolfgang (STAT) wrote:
>
> [...]
>
> In fact, trying to disentangle that residual variance component from any
> random study effects is usually next to impossible. I mention this explicitly
> one
Dear R Mailinglist,
I want to understand how predictors are associated with a dependent
variable in a regression. I have 3 measurement points. I'm not interested
in understanding the associations of regressors and the predictor at each
measurement separately, instead I would like to use the whole
Dear all,
I have a matrix with two columns: "Names" and "Values"
In names: there are 4 groups they are, CK113234, CK116296, CK116292 and
CK114042
I want to *sort values* (decreasing order) based on each group and
take average of the *top two numbers* in each of the groups.
> dput(x)
structure(
I don't really understand this data table, but maybe this modification
will give you the idea:
dat <- read.table(text="father mother num_daughterdaughter
291 39060 NA
275 42190 NA
273 42361 49410
281 41631 49408
274 42261
Dear all
I have a data.frame like that :
father mother num_daughterdaughter
291 39060 NULL
275 42190 NULL
273 42361 49410
281 41631 49408
274 42261 49406
295 38692 49403
49404
As an example:
chars<-c("A","A","B")
numbers<-as.numeric(as.factor(chars)) #make this numerical
plot(numbers,c(0.4,0.5,0.6),xaxt="n") #xaxt="n" says to not plot the x-axis
axis(side=1,at=numbers,labels=chars) #make the axis with labels
On 23.01.2013, at 10:16, Ng Wee Kiat Jeremy wrote:
> Dea
On Wed, Jan 23, 2013 at 9:16 AM, Ray Cheung wrote:
> Dear All,
>
> Sorry for asking a newbie question. I want to ask how to import 1000
> datasets whose file names are labelled from data1.dat to data1000.dat into
> R so that they are named M[1, , ] to M[1000, , ] accordingly. Thank you
> very much
Or maybe
x<-matrix(test,nrow=10)
apply(x,2,mean)
On 23.01.2013, at 00:09, Wim Kreinen wrote:
> Hello,
>
> I have vector called test. And now I wish to measure the mean of the first
> 10 number, the second 10 numbers etc
> How does it work?
> Thanks Wim
>
>> dput (test)
> c(0, 0, 0, 0, 0, 0, 0
Hi
Sorry for the rather long message.
I am trying to use the cfa command in the lavaan package to run a CFA however I
am unsure over a couple of issues.
I have @25 dichotomous variables, 300 observations and an EFA on a training
dataset suggests a 3 factor model.
After defining the model I us
Hello Christian,
First of all, it's good to see that you are well aware of the fact that lme()
without lmeControl(sigma=1) will lead to the estimation of the residual
variance component, which implies that the sampling variances specified via
varFixed() are only assumed to be known up to a prop
In this example, I get the following:
lis1 <- replicate(3, rnorm(5), simplify = FALSE)
lis2 <- replicate(3, rnorm(5), simplify = FALSE)
lis1
lis2
mapply(c, lis1, lis2, SIMPLIFY = FALSE)
Best,
Dimitris
On 1/23/2013 11:58 AM, Alaios wrote:
> Thanks a lot.
> Unfortunately that did not help eithe
Hi,
thanks. I am indeed interested in the main effects of A and B and their
interaction+ I want to incorporate C (the block or 'repetition' within which
the A and B treatments were applied) as a random variable. So A*B would be
the way, however errors of A and B are different due to different
Thanks a lot.
Unfortunately that did not help either.
num [1:32003, 1:3] 0 0 0 0 0 0 0 0 0 0 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:32003] "" "" "" "" ...
..$ : NULL
but I want to get
>> List of 3
>> $ : num [1:32002] 0 0 0 0 0 0 0 0 0 0 ...
>> $ : num [1:32002] 0 0 0 0 0 0 0
Dear M. Noel:
You may know that there is a list of books on the R web site
(www.r-project.org -> "books": www.r-project.org/doc/bib/R-books.html).
I'm not sure what you should do to get this book listed there. If no
one else suggests what to do, you might wish to write to Frau Palege
Hi,
I would like to do a meta-analysis, i.e., a mixed-effects regression,
but I don't seem to get what I want using both the nlme or metafor packages.
My question: is there indeed no way to do it?
And if so, is there another package I could use?
Here are the details:
In my meta-analysis I'm com
Dear R-ers,
I've generated data for failure times log(T) from standard normal
distribution. How can I generate data for censoring times from log-normal
distribution which ý can get constatnt hazard rate.
[[alternative HTML version deleted]]
_
Dear Wolfgang and Michael,
thank you very much for your help!
Concerning the Variance: I took the variance I used for CMA (which is always
1), so I think it should be the right one.
Thank you for noticing and mentioning though :)
I really appreciate how helpful you both are.
best,
Alma
_
Dear useRs,
I'm pleased to announce that version 1.1.0 of lambda.r is now available on CRAN
(http://cran.r-project.org/web/packages/lambda.r/). This package provides a
complete functional programming environment within R (and is backwards
compatible with S3). Lambda.r introduces many concepts i
you just need:
mapply(c, Part1$dataset, Part2$dataset, SIMPLIFY = FALSE)
I hope it helps.
Best,
Dimitris
On 1/23/2013 11:01 AM, Alaios wrote:
> Thanks a lot Petr,
> for the answer
> unfortunately that would convert everything to a matrix
>
> num [1:32002, 1:3] 0 0 0 0 0 0 0 0 0 0 ...
>
> but
Thanks a lot Petr,
for the answer
unfortunately that would convert everything to a matrix
num [1:32002, 1:3] 0 0 0 0 0 0 0 0 0 0 ...
but if you check below you can see that I Want those to form a list.
Regards
Alex
From: PIKAL Petr
Sent: Tuesday, January 2
Thanks,
this works! but I am surprised that R has such a strange behavior and that
there is no way to control it.
BTW, also as.integer(pp)-1 works!
Still, it doesn't look to me as a first best.
At any rate, thanks a lot for your help.
f.
On 23 January 2013 10:53, D. Rizopoulos wrote:
> check al
check also
pp <- rep(0:1, 10)
pp <- factor(pp, levels=(0:1), labels=c("no","yes"))
unclass(pp)
unclass(pp) - 1
Best,
Dimitris
On 1/23/2013 10:48 AM, Francesco Sarracino wrote:
> Dear Dimitris,
>
> thanks for your quick reply. I've tried the solutions proposed in 7.10
> How do I convert factor
Dear Dimitris,
thanks for your quick reply. I've tried the solutions proposed in 7.10 How
do I convert factors to numeric?
as.numeric(as.character(pp))
and
as.numeric(levels(pp))[as.integer(pp)]
However, whatever I do, I get "Warning message: NAs introduced by coercion"
and the output is a vecto
Check R FAQ 7.10: How do I convert factors to numeric?
I hope it helps.
Best,
Dimitris
On 1/23/2013 10:33 AM, Francesco Sarracino wrote:
> Dear R listers,
>
> I am trying to compute the mean of a dummy variable that is encoded as a
> factor. However, even though the levels of my factor are 0 -
1 - 100 of 107 matches
Mail list logo