Dear expeRts,
I have two questions concerning data frames:
(1) How can I apply the class function to each component in a data.frame? As
you can see below, applying class to each column is not the right approach;
applying it to each component seems bulky.
(2) After transforming the data frame a b
Hi
r-help-boun...@r-project.org napsal dne 28.06.2011 02:45:01:
>
> Right. You forgot the comma!
If you want to resolve this rather cryptic advice see
?"["
Regards
Petr
>
> --
> David.
>
> On Jun 27, 2011, at 7:10 PM, Nanami wrote:
>
> > it's a table; I read it from a file; I've tried to
Thanks David for your reply.
You said "a single slope and intercept are estimated for each
variable".Actually I can only get one intercept no matter how many
variables exist,but a slope for each variable.
Since the regression is done via:lm(CD4 ~ time + gender + income)
It seems that the explanat
But that just gives me the prediction of Y for treatment A or B, not the ratio.
As I stated:
# I am interested in the relationship:
# Y(treatment =="B") / Y(treatment=="A") as a function of X, with a
confidence interval!
I can get the SE for either of them using predict.gam without a
problem, b
A) You haven't mentioned your OS which indicates you haven't followed the
posting guide noted at the bottom of each email.
B) You cannot load an "unknown" number of rows... although you may not specify
the number, it is finite and its value can be determined for the purposes of
debugging your i
On Jun 27, 2011, at 10:45 PM, Remko Duursma wrote:
Dear R-helpers,
I am trying to construct a confidence interval on a prediction of a
gam fit. I have the Wood (2006) book, and section 5.2.7 seems relevant
but I am not able to apply that to this, different, problem.
Any help is appreciated!
Thank you, Baptiste! I think that this will work for me. Looking
into the coord_polar function of ggplot2, I think that the racetrack
plot at the bottom of the page
(http://had.co.nz/ggplot2/coord_polar.html) will be exactly what I
need.
On Mon, Jun 27, 2011 at 8:09 PM, baptiste auguie
wrote:
>
Hi I need help
I am new to R and am having problems estimating parameters out of
3stage constrained function.
I have constructed a code as below and my data are two colomns of R_j
and R_m(sample given below). R_j and R_m represents the dependent and
independent variables respectively. The paramet
Hi I need help
I am new to R and am having problems estimating parameters out of 3stage
constrained function.
I have constructed a code as below and my data are two colomns of R_j and
R_m(sample given below). R_j and R_m represents the dependent and
independent variables respectively. The paramet
Dear R Users,
I was using R to import five years traffic data, but the error always come
up as shown below. The data frame contains 12 columns and unknown number of
records. Would you have any ideas that how I should deal with this
situation? Many thanks for any hints.
>wim<-sqlQuery(channel,qry
Dear R-helpers,
I am trying to construct a confidence interval on a prediction of a
gam fit. I have the Wood (2006) book, and section 5.2.7 seems relevant
but I am not able to apply that to this, different, problem.
Any help is appreciated!
Basically I have a function Y = f(X) for two different
On Jun 27, 2011, at 10:02 PM, Lao Meng wrote:
Hi all,I have some questions about the covariants of regression.
My target: To explore the trend of CD4 level through a period of time.
Response variable: CD4 count
Explanatory variable:time
Also, the demology information is available,such as
g
SamiC aberdeen.ac.uk> writes:
> I have been using zuurs book but it only goes as far as poisson and binomial
> GEE's. Initially I fitted a glm with poisson and this was over dispersed.
> Then moved to binomial, but residual patterns are not great (ie variance).
> Looks like some spatial correl
Hi:
One approach:
(1) Put your files into a separate directory.
(2) Use list.files() to grab the individual file names.
(3) Write a function that takes a data frame as an argument and does
the necessary processing.
(4) Use lapply() or ldply/llply from the plyr package to recursively
run the funct
Hi all,I have some questions about the covariants of regression.
My target: To explore the trend of CD4 level through a period of time.
Response variable: CD4 count
Explanatory variable:time
Also, the demology information is available,such as gender,occupation,income
level...
Q1,Are these varia
HI:
Since you didn't provide a reproducible example (in particular, what
does str(MA) return?), it's hard to verify what specifically causes
the error, but a look at the gev() function's help page indicates that
the first argument is supposed to be a (numeric) vector, apparently
atomic.
One probl
Try this,
library(ggplot2)
d <- data.frame(theta = runif(10, 0, 360), r = runif(10, 0, 3))
ggplot(d, aes(x=theta, y=r, size=r)) + coord_polar(start=0)+
geom_point() +
scale_x_continuous(breaks=seq(0, 360, by=30), expand=c(0,0), lim=c(0, 360))+
scale_area()
HTH,
baptiste
On 28 June 2011
I would look at the ggplot2 package, I have seen examples using ggplot2 that
look similar to what you describe.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Patrick Jemison
Sent: Monday, June 27, 2011 4:36 PM
To: r-h...@stat.mat
Hi W. Kaisers,
sorry for the delay - I just spotted you question:
On Thu, Jun 16, 2011 at 5:52 AM, wrote:
> Dear R.oo package users,
>
> while testing some functionality of the R.oo, I found that during the first
> construction of a object from a class, the constructor is twice called, but
>
On Jun 27, 2011, at 8:36 PM, Joshua Wiley wrote:
Hi Ivo,
It depends how you are making the histogram plot. If you are using
the traditional graphics hist() function,
And if you are using histogram() you should be looking at , ...
surprise, surprise, ... the breaks argument.
then look a
Right. You forgot the comma!
--
David.
On Jun 27, 2011, at 7:10 PM, Nanami wrote:
it's a table; I read it from a file; I've tried to make it look
prettier:
head(intra)
chr miRNA start end strand ACC
hsa_ID region region_start region_end
chr1 miRNA 1
Hi Ivo,
It depends how you are making the histogram plot. If you are using
the traditional graphics hist() function, then look at the argument,
"breaks" (type ?hist at the console to pull up the documentation
explaining this). For example:
hist(x = sample(1:20, 300, TRUE), breaks = seq(0, 20, b
Dear Sir,
How do I change the intervals on the x axis of a histogram plot; let us say
for example the intervals were 0,5,10,15,and 20, and I wanted to change
the intervals to 0,2,4,6,8,10,12,14,16,18,20.
I look forward to receiving your words of wisdom.
Ivo
[[alternative HTML ver
it's a table; I read it from a file; I've tried to make it look prettier:
> head(intra)
chr miRNA start end strand ACC
hsa_ID region region_start region_end
chr1 miRNA 1102484 1102578 + ACC="MI342"; ID="hsa-mir-200b";
exon 1102
I'd like to create a polar plot similar to those created by the polarFreq
function in the openair package. However, this package seems to be specific
to wind speed and direction, and requires a "ws" (wind speed) and a "wd"
(wind direction) column. My data is unrelated to wind speed, but I'd like
Edward Wallace gmail.com> writes:
>
> Hello R users,
> I have a puzzle with the VGAM package, on my first excursion into
> generalized additive models, in that this very nice package seems to
> want to do either more or less than what I want.
>
> Precisely, I have a 4-component outcome, y, and
Here is another solution if you want to count a sequence like 0 as
three overlapping runs of 3 zeros.
> x <- sample(c(rep(0,20), rep(1,37)), 100, TRUE) # vector of 1M
> z <- rle(x) # get the runs
> indx <- which(z$values == 0 & z$lengths > 2) # find the runs
> # now determine the number
Hi all,
I'm trying to use a parallel script on a 20 node cluster, 8 processors
per node. Each node has a name, e.g., "vm", "vm0001", etc. Within
a foreach loop, I would like R to tell me what node it is actually
running on. How can this be accomplished? Thanks!
require(doMPI)
cl <- startMPIcl
Dear R list.,
I am running a script to get a compact letter display.
library(lme4)
library(multcomp)
library(gplots)
### Mixed Effects Model #
data <- read.table("AJmix.txt",header=TRUE, sep="\t")
attach(data)
y<-cbind(positive,negative)
treatment<-factor(treatment)
mouse<-fac
On Jun 27, 2011, at 6:56 PM, jim holtman wrote:
Use "&" instead of "&&"
Yes, and don't forget the comma!
--
David.
On Mon, Jun 27, 2011 at 6:01 PM, Nanami 13
wrote:
Hi everyone,
I am trying to find a way to filter a table; If I am given for
example the
following table:
head(intra)
try sqldf:
> require(sqldf)
> x
x
1 1
2 2
3 6
4 5
> y
s e
1 1 4
2 3 5
3 8 10
> sqldf("
+ select x.x
+ from x, y
+ where x.x between y.s and y.e
+ ")
x
1 1
2 2
3 5
>
On Mon, Jun 27, 2011 at 5:33 AM, Salih Tuna wrote:
> Thanks a lot. That solves the problem :)
> best,
Thank you David. Didn't realized someone posted related topic this morning.
John
- Original Message
From: David Winsemius
To: array chip
Cc: r-help@r-project.org
Sent: Mon, June 27, 2011 3:38:36 PM
Subject: Re: [R] cumulative incidence plot vs survival plot
On Jun 27, 2011, at 5:04
Use "&" instead of "&&"
On Mon, Jun 27, 2011 at 6:01 PM, Nanami 13
wrote:
> Hi everyone,
>
> I am trying to find a way to filter a table; If I am given for example the
> following table:
>> head(intra)
> chr miRNA start end strand ACC hsa_ID
> region region_start
This looks something like what you want.
http://r.789695.n4.nabble.com/Reading-in-a-series-of-files-using-a-for-loop-td906101.html
--- On Mon, 6/27/11, Trying To learn again wrote:
> From: Trying To learn again
> Subject: [R] Executing the same function on consecutive files
> To: r-help@r-proj
the backage lmomco can plot the L-moments ratio diagram
would it be possible to draw the TL moments diagram also?
--
Osama Abdelaziz Hussien
Department of Statistics
Faculty of Commerce
Alexandria University
Egypt
__
R-help@r-project.org mailing list
h
On Jun 27, 2011, at 5:04 PM, array chip wrote:
Hi David,
Thanks for responding, and plain text ...(didn't realized I was in
rich text).
The endpoint is disease recurrence, I was producing a regular KM
plot of
recurrence-free probability. Then someone recommend using cumulative
incidenc
Hi all,
I have the next problem: I have a matrix with size 8,000,000x18. My personal
computer...blocks...so I have cut my original file into 100 different file.
I have written a function that should be run on each of this file.
So imagine
I need to read data from q1 to q100 file
data<-read.tab
Dear R Users,
I was using R to import several years traffic data, but every time after
data successfully imported (no error or warning) when I tried to save this
workplace or tackle these data, R GUI would automatically shut down. Would
you have any ideas that how I should deal with this situation
Hi,
Consistent with recent reports
(http://tolstoy.newcastle.edu.au/R/e14/devel/11/06/0434.html) I have found what
I believe is an error new to R 2.13.0 when reading a UTF-8 encoded file.
Minimal example:
=== filename: test.txt =
1 2 3 Я 4
===
Hi Dennis:
I tried your suggestions and I am getting the following errors:
Error in x$CP1 : $ operator is invalid for atomic vectors
In addition: Warning message:
In sqrt(diag(varcov)) : NaNs produced
Peter Maclean
Department of Economics
UDSM
- Original Message
From: Dennis Murphy
Hi everyone,
I am trying to find a way to filter a table; If I am given for example the
following table:
> head(intra)
chr miRNA start end strand ACC hsa_ID
region region_start region_end gene_id transcrip_id
1 chr1 miRNA 1102484 1102578 + ACC="MI342";
As long as all the fields in each entry are the same, then the
following will work
df<-data.frame(photo_id=NA,owner=NA,secret=NA,server=NA,farm=NA,title=NA,
ispublic=NA,isfriend=NA,isfamily=NA,tags=NA)
x<-''
y<-strsplit(x,split="=\"")
tmp<-c()
for (i in 2:length(y[[1]])){
tmp[i-1
Dear group,
When running the installation test:
testInstalledPackages("both",outDir='c:/Test')
I got the following message:
Running ‘testci.R’
comparing ‘testci.Rout’ to ‘testci.Rout.save’ ...
files differ in number of lines:
Please note the test does not result in 'OK' as do the other test
Here's a one-liner. Let's see their software do that!
sum(replicate(100, sum(sample(c(rep(0, 20), seq(1:37)), 3, replace =
FALSE)) == 0))
Am 27.06.2011 23:08, schrieb robcinm:
I am taking a basic statistics course this summer, and while the majority of
the class is using a statistical packa
The first problem is that you are using a character string as the first
argument to agnes()
The help information for agnes says that its first argument, x, is
x: data matrix or data frame, or dissimilarity matrix, depending
on the value of the 'diss' argument.
Not a character
Hi robcinm,
You might also consider:
# data
x <- c(rep(0, 20), 1:37)
# number of simulations
B <- 1000
# result: TRUE/FALSE
out <- replicate(B, {
y <- sample(x, 3, replace = FALSE)
all(y == 0)
})
mean(out)
HTH,
Jorge
On Mon, Jun 27, 2011 at 5:08 PM, robcinm <> wrote:
> I
#sampling elements
x<-c(rep(0, 20), seq(1:37))
#number of simulations to perform
sims<-100
#vector to store results
results<-c()
#using for loop to perform simulations
for(i in 1:sims){
#take your sample
y<-sample(x,3,replace=FALSE)
#check if all elements are zero
Dear R users,
Please consider the following example:
tmp <- matrix(rnorm(100),10,10)
tmp[upper.tri(tmp, diag = TRUE)] <- NA
heatmap(tmp, col = heat.colors(200), Rowv=NA, Colv=NA)
I have three questions:
(1) How would I change the axis labels from 1:10 to c("apples", "pears",
"bananas", "kiwis"
I am taking a basic statistics course this summer, and while the majority of
the class is using a statistical package that came with the book, I am doing
everything in R for practical reasons. Forgive me if there is
documentation/instruction easily available on this topic, but Google and
forums sea
Hi David,
Thanks for responding, and plain text ...(didn't realized I was in rich text).
The endpoint is disease recurrence, I was producing a regular KM plot of
recurrence-free probability. Then someone recommend using cumulative incidence
is preferred because death was censored in the dataset
On 27.06.2011 20:28, scaramouch wrote:
Thank you for the answer,
If you thank me and ask me a follow up, please also send a message to
me, not only to the list.
Please also quote the original message, not all list members (and
particularly not myself) can remember the original stuff in th
On 27.06.2011 20:48, wwreith wrote:
Any ideas of what is happening when I attempt to load XLConnect? I think I
installed everything correctly. I posted what I get when I installed rJava
as well as when I attempted to load rJava directly. Thanks in advance for
any help you can give on this.
lib
Hi,
I have a 1,785,421 rows x200 variables dataset with some missing values.
Approximately 55% of 1,785,421x200 are missing cells.
In this
ftp://ftp.stat.berkeley.edu/pub/users/breiman/Using_random_forests_v4.0.pdf
document , it is claimed that random forests can impute with great accuracy
even wit
On Jun 27, 2011, at 4:31 PM, array chip wrote:
Hi, I am wondering if anyone can explain to me if cumulative
incidence (CI) is
just "1 minus kaplan-Meier survival"?
First tell us what you think CI is defined as. I suspect it is not the
same. The KM estimator is cumulative product of (alive
Hi, I am wondering if anyone can explain to me if cumulative incidence (CI) is
just "1 minus kaplan-Meier survival"? Under what circumstance, you should use
cumulative incidence vs KM survival? If the relationship is just CI =
1-survival, then what difference it makes to use one vs. the other?
On Mon, 27-Jun-2011 at 01:22AM -0700, thomas.chesney wrote:
|> Is there any easy way I can upgrade R without losing all of my
|> packages, when I'm using a computer (Mac) on an organisation's
|> network which blocks the package installer?
Keep a separate library for the packages you specifically
Any ideas of what is happening when I attempt to load XLConnect? I think I
installed everything correctly. I posted what I get when I installed rJava
as well as when I attempted to load rJava directly. Thanks in advance for
any help you can give on this.
library(XLConnect)
Loading required packag
Thank you for the answer, but how can i integrate the difference?
There is always an error with integrate().
Kindly regards, Scaramouch
--
View this message in context:
http://r.789695.n4.nabble.com/Overlapping-areas-under-normal-distributions-tp3625807p3628473.html
Sent from the R help mailing
On Jun 27, 2011, at 3:18 PM, Carsten Harlaß wrote:
Hello,
thanks for your response.
Of course I already thought about this "simple" solution of the
problem.
But I think this is not a nice workaround.
If I understand the manual correctly, density() already makes an
approximation. But this
Thanks,
I have been using zuurs book but it only goes as far as poisson and binomial
GEE's. Initially I fitted a glm with poisson and this was over dispersed.
Then moved to binomial, but residual patterns are not great (ie variance).
Looks like some spatial correlation. However, in the GEE with
Hello,
thanks for your response.
Of course I already thought about this "simple" solution of the problem.
But I think this is not a nice workaround.
If I understand the manual correctly, density() already makes an
approximation. But this approximation is just evaluated at the wrong points.
See:
SamiC aberdeen.ac.uk> writes:
>
> Hi, I want to fit a GEE with a negative binomial distribution. I have uesd
> already a poisson glm and then neg binommial to deal with alot of
> dispersion. In my neg binomial residuals i have some patterns so i have
> implemented a GEE, but only with a poisso
Hello,
I am trying to simulate 10 relicates of 100-tables. Each table is a 2 x 3
and 80% pf the tables are true nulls and 20% are non-nulls. The nulls follow
the Hardy Weinberg distribution (ratio) 1:2:1.
I have the code below but the p-values are not what I am expecting. I want
to use the Cochran
Regarding the subject, I want to thank the many respondents for clarifying the
nature of the relationship between R and the GPL, as well as giving help with
the structure of R-delivered source.
I want to emphasize I meant nothing at all harsh or accusatory in my email. I
did say I had access to
On Jun 27, 2011, at 12:56 PM, Christopher Desjardins wrote:
Hi,
I have the following data management issue. I am trying to combine
multiple
years of ethnicity data into one variable called ethnic. The data
looks
similar to the following
idethnic07ethnic08 ethnic09ethnic10
1
Hi,
I have the following data management issue. I am trying to combine multiple
years of ethnicity data into one variable called ethnic. The data looks
similar to the following
idethnic07ethnic08 ethnic09ethnic10
1 1 1 11
2 1
Thanks, Jim!
It is exactly what I want, appreciated!
On Mon, Jun 27, 2011 at 10:22 AM, jim holtman wrote:
> Is this what you want:
>
> > test
> [1] "H.1.Y" "N.0.E" "G.1.N" "E.0.P" "W.2.G" "W.4.G" "W.3.W" "W.0.N" "D.1.H"
> > sub("\\.([0-9]+)\\.", "{\\1}", test)
> [1] "H{1}Y" "N{0}E" "G{1}N" "E
Is this what you want:
> test
[1] "H.1.Y" "N.0.E" "G.1.N" "E.0.P" "W.2.G" "W.4.G" "W.3.W" "W.0.N" "D.1.H"
> sub("\\.([0-9]+)\\.", "{\\1}", test)
[1] "H{1}Y" "N{0}E" "G{1}N" "E{0}P" "W{2}G" "W{4}G" "W{3}W" "W{0}N" "D{1}H"
>
On Mon, Jun 27, 2011 at 1:18 PM, Changbin Du wrote:
> HI, Dear R-commun
HI, Dear R-community,
I have one vector of the following string,
> test<-c("H.1.Y", "N.0.E", "G.1.N", "E.0.P", "W.2.G", "W.4.G", "W.3.W",
"W.0.N", "D.1.H")
> test
[1] "H.1.Y" "N.0.E" "G.1.N" "E.0.P" "W.2.G" "W.4.G" "W.3.W" "W.0.N" "D.1.H"
*I want to change them into*
"H{1}Y" "N{0}E" "G{1}N" "
Look at ?approx. For your example (of course your random numbers give
different results):
> approx(f$x, f$y, c(-2, -1, 0, 1, 2))
$x
[1] -2 -1 0 1 2
$y
[1] 0.03757113 0.19007982 0.31941779 0.37066592 0.10227509
approx gives NA's if you try to interpolate outside the bounds of the data.
---
Look at package smatr. It fits RMA (called here standardized major axis)
regression, plots the line, and provides confidence limits.
--
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352
-Orig
G'day Gavin,
On Mon, 27 Jun 2011 16:36:57 +0100
Gavin Simpson wrote:
[...]
> I don't recall the GPL mentioning anything requiring that the source
> code be "helpful". The authors have most certainly fulfilled their
> requirements under GPL, as has CRAN in distributing the package
> sources.
>
>
Yes.
Perhaps also worth mentioning in this context because they're generic
are head() and tail() -- ?head
Cheers,
Bert
On Mon, Jun 27, 2011 at 9:01 AM, Eik Vettorazzi
wrote:
> Hi,
> mydata[1:3, -(1:4)]
>
> saves some typing.
>
> cheers
>
> Am 27.06.2011 16:51, schrieb Berry Boessenkool:
>>
>>
On Mon, Jun 27, 2011 at 10:34 AM, Berry Boessenkool
wrote:
>
>
> Hey all,
>
> I learned that using the equals sign "=" to assign objects is generally OK,
> but will not work in some cases.
> As I always use "<-" for assignments, I have not encoutered any problems.
>
> Could somebody provide an ex
No, you are correct. It meets the letter of GPL. Took me a while to find
FunctionINIT.R though. As I wrote in the original, source is available, if only
by keying in function names and seeing their value. Was hoping for greater
clarity.
I of course have the paper and the help. I was trying to u
Hi,
mydata[1:3, -(1:4)]
saves some typing.
cheers
Am 27.06.2011 16:51, schrieb Berry Boessenkool:
>
>
> Hey again,
>
> I didn't wat questions to get mangled up, so here's my second email.
>
> In matlab, there is the simple possibility to access colums x till last of a
> matrix using
> mydat
On 06/27/2011 10:34 AM, Berry Boessenkool wrote:
Hey all,
I learned that using the equals sign "=" to assign objects is generally OK, but
will not work in some cases.
As I always use "<-" for assignments, I have not encoutered any problems.
Could somebody provide an example or explanation, w
On Mon, 2011-06-27 at 11:14 -0400, Galkowski, Jan wrote:
> Fine. Attached. It's "waved".
>
> All it has is *.Rd files. Apparently the functions are collected in
> "functionINIT.R". But "00Index" and "DESCRIPTION" are not helpful.
>
> - j
The Rd files are the help or manual "pages" for the func
On Mon, Jun 27, 2011 at 11:14 AM, Galkowski, Jan wrote:
> Fine. Attached. It's "waved".
>
> All it has is *.Rd files. Apparently the functions are collected in
> "functionINIT.R". But "00Index" and "DESCRIPTION" are not helpful.
All the R code is in functionINIT.R. Are you objecting because the
On 27.06.2011 17:14, Galkowski, Jan wrote:
Fine. Attached. It's "waved".
All it has is *.Rd files. Apparently the functions are collected in "functionINIT.R". But
"00Index" and "DESCRIPTION" are not helpful.
Are you joking or just pulling us?
All these files are interpreted by R and essent
Apologies David,
Every once in a while I hit the wrong reply button. The post was meant to be a
Reply All. I'll post this one to the list.
--- On Mon, 6/27/11, David Winsemius wrote:
> From: David Winsemius
> Subject: Re: [R] Add use of dput() to the instructions at bottom of post?
> To: "Jo
Fine. Attached. It's "waved".
All it has is *.Rd files. Apparently the functions are collected in
"functionINIT.R". But "00Index" and "DESCRIPTION" are not helpful.
- j
-Original Message-
From: b.rowling...@googlemail.com [mailto:b.rowling...@googlemail.com] On
Behalf Of Barry Rowlin
Hi, I want to fit a GEE with a negative binomial distribution. I have uesd
already a poisson glm and then neg binommial to deal with alot of
dispersion. In my neg binomial residuals i have some patterns so i have
implemented a GEE, but only with a poisson family as i couldnt with neg
binomial. H
Hey again,
I didn't wat questions to get mangled up, so here's my second email.
In matlab, there is the simple possibility to access colums x till last of a
matrix using
mydata(1:3, 5:end).
In R, I so far use
mydata[1:3, 5:ncol(mydata)]
Is there a faster way? (in terms of typing)
Thanks ahe
I'm not an expert but some third party libraries won't recognize = as an
assignment for some objects (I learned this empirically) when the
assignment is made within a function. Using <- protects you from these
unknows, as you have discovered on your own.
Regards
David
On 6/27/2011 8:34 AM, Be
Hey all,
I learned that using the equals sign "=" to assign objects is generally OK, but
will not work in some cases.
As I always use "<-" for assignments, I have not encoutered any problems.
Could somebody provide an example or explanation, why getting used to "=" is
not a good idea?
Or is i
yahoo.com> writes:
>
> Hi, I can not estimate the zero inflated mixed model parameters successfully.
If it is possible, would you
> please help me write the code? In my case, I consider the location as a random
effect. My data are:
>
> location y x1 x2 x3
> 1
> 1
> 1
> 2
> 2
> 2
> 3
> 3
>
Hi all,
I'm currently working on updating an R package to run for loops in parallel
to speed up computation time. I'm using the 'foreach' package with a
foreach loop. When I run my code inside the loop, I get an error message
that a number of the functions aren't recognized (even though the func
On Mon, Jun 27, 2011 at 1:24 PM, Galkowski, Jan wrote:
> I wondered if there were standard practices in CRAN for delivery of R source
> implementing functions in R packages. I has encountered a couple of packages
> where the gzipped version of source contains very little, primarily the Help
> f
After your code below you could add...
x1g <- X*(1-Group)
x2g <- X*Group
## different moderator effects in the different groups...
mgu <- gam(Y~s(M,by=x1g)+s(M,by=x2g))
## same moderator effects, but different intercepts in the groups...
mgc <- gam(Y~s(M,by=X)+Group)
## Alternative way of spec
On Jun 27, 2011, at 9:44 AM, Ivan Calandra wrote:
I actually thought it was in the posting guide, but I could not find
it with a text search. Did I overlook it?
The Posting Guide has an equivalent method it suggests. It has the
trivial advantantage of being truly cut-and-pastable but the
On Mon, Jun 27, 2011 at 3:43 AM, Karen R. Khar wrote:
> Hi,
>
> I'm mighty new to R. I'm using it on Windows. I'm trying to cluster using a
> distance matrix I created from the data on my own and called it D10.dist. I
> loaded the cluster package. Then tried the following command...
>
>> agnes("E:
I actually thought it was in the posting guide, but I could not find it
with a text search. Did I overlook it?
I'm not sure that adding the dput() function at the bottom of every
e-mail will help, since you don't see it when you write an e-mail, just
when you receive one. Though it cannot hurt
I also tried...
D1 D2 D3 D4 D5 D6 D7 D8 D9
D2 0.608392
D3 0.4974510.537662
D4 0.6345480.3933430.537426
D5 0.5587850.5433990.6322210.726633
D6 0.6594830.7017780.7414
Dear UseRs,
I built varying coefficient models (in mgcv) for two groups separately, with
one explanatory and one moderator variable (see the example below).
# ---
# Example:
# --
# generate moderator variable (can the same for both groups)
modvar <- c(1:1000)
# generate group1 value
On 2011-06-27 03:02, 新鼎-智慧製造事業處-鄭紹文 wrote:
Dear sir,
If I have a vector as:
y<- c(1:4)
and a matrix as:
x<- matrix (5:12, nrow=4, ncol=2)
Then I create a data frame as:
t<- data.frame(y, x)
R will generate a data frame of 3 columns
names(t)
"y" "X1" "X2"
is.vector(t$X1) returns TRUE
is
hi,
because of my ignorance I can't figure out why would you need such a structure.
However the following trick works:
> a <- matrix(1:6,3)
> b <- data.frame(1:3)
> b$a <- a
> b
X1.3 a.1 a.2
11 1 4
22 2 5
33 3 6
> names(b)
[1] "X1.3" "a"
> class(b$a)
[1] "matrix"
> is.mat
It's often difficult to figure out what a problem data set looks like when
someone pastes a mess of output from R into an e-mail. The dput command, used
judiciously—I would hope no one would send a 1 M data set—can make life much
easier.
I wonder if it would be useful to add a hint in the inst
On Jun 27, 2011, at 7:24 AM, Galkowski, Jan wrote:
> I wondered if there were standard practices in CRAN for delivery of R source
> implementing functions in R packages. I has encountered a couple of packages
> where the gzipped version of source contains very little, primarily the Help
> file
On Mon, Jun 27, 2011 at 1:24 PM, Galkowski, Jan wrote:
> I wondered if there were standard practices in CRAN for delivery of R
> source implementing functions in R packages. I has encountered a couple of
> packages where the gzipped version of source contains very little, primarily
> the Help fil
1 - 100 of 125 matches
Mail list logo