Well,since the intercept is the same as mean of group1,I take it for granted
that the 1-sample ttest must test based on group==1...
If the intercept is estimated from the whole sample,why does the intercept
is the same as mean of group1?
2011/8/17 Eik Vettorazzi
> Hi Lao,
> thats not the sam
On Aug 18, 2011, at 1:36 AM, Jie TANG wrote:
for example:
a data.frame
data
V1 V2 V3
1 2 3
4 5 6
If I want to calculate the V2
I can get data$V2
But now I want to calculate the dimension name and then analysis the
data.
for example
No=3*x ;x=1,2,3,...n
anadata=data$VNo
How
Hi all:
If I have a dataframe of N columns.If I wanna get the min(or max,or
mean...etc)of the whole dataframe,how to do it quickly?
What I can do is only:
min(data[,1:ncol(data)])
Any other suggestion?
Thanks!
best
[[alternative HTML version deleted]]
__
for example:
a data.frame
data
V1 V2 V3
1 2 3
4 5 6
If I want to calculate the V2
I can get data$V2
But now I want to calculate the dimension name and then analysis the data.
for example
No=3*x ;x=1,2,3,...n
anadata=data$VNo
How could I do?
--
TANG Jie
[[alterna
On Aug 18, 2011, at 12:03 AM, Kota Hattori wrote:
Hi all,
I would like to ask a question with regard to R graphics. I am
currently
trying to add data points in boxplots using points(). In my script,
I add
up boxplots three times using add=TRUE. I use points() every time I
add
boxplots, a
I'd be interested in seeing a solution to this as well. How do you add in
extra constraints for a transportation problem? All that is given in the
lpsolve documentation is how to solve the most basic transportation problem.
--
View this message in context:
http://r.789695.n4.nabble.com/help-
"2x^2 + 3y^2 <= 6"
My guess is because lpsolve doesn't handle non linear programs.
--
View this message in context:
http://r.789695.n4.nabble.com/lpSolve-constraints-don-t-seem-to-have-an-effect-tp898253p3751751.html
Sent from the R help mailing list archive at Nabble.com.
_
Hi all,
I would like to ask a question with regard to R graphics. I am currently
trying to add data points in boxplots using points(). In my script, I add
up boxplots three times using add=TRUE. I use points() every time I add
boxplots, and I see data points. However, I see all data points are clu
foreach and allied packages have helped me speed up some code
significantly. I have four cores in my machine and this allows me to
get away with this...
HTH
Stephen
On Wed, Aug 17, 2011 at 9:59 PM, Jim Holtman wrote:
> anytime my code starts to take more than a couple of minutes to run what
>
anytime my code starts to take more than a couple of minutes to run what might
look like a simple set of commands, I use Rprof to see where the time goes.
Run this on your script and you might get some insight into the problem area.
If it ran for an hour, I would defintely take a deep dive int
Hi
If space="bottom" then I think that par.settings needs to be utilized
?xyplot
search for par.settings
names(trellis.par.get())
trellis.par.get()[[28]]
layout heights may be needed
names(trellis.par.get()[[28]])
[1]
"top.padding" "main" "main.key.padding" "key.top"
On Aug 17, 2011, at 8:14 PM, mark_horo wrote:
Hi I'm trying to speed my loop up. Any Suggestions?? At the moment
it takes a
few days to run.
THE CODE
We are not surprised.
Rainfall_dataset <- read.table("1km_grid_nzmg.csv",
header=TRUE, sep=",", na.strings="NA", dec=".", strip.w
Hi Michael
I am not sure of your decimal format of the week but if you can
convert it to a calendar day of the year by multiplying by 7
then you could you could use eg if 321 was the calendar day
strptime(paste(2010, 321,sep=" "),format="%Y %j")
[1] "2010-11-17"
Regards
Duncan
Duncan Mack
Well I didn't expect it to converge because the first three lines (black,
orange and turquoise) didn't converge.
I was trying to find a condition in which it would be more efficient for T
cells to spend less time in the lymph nodes, and I did when you increase the
number of DC's per lymph node (s
Hi I'm trying to speed my loop up. Any Suggestions?? At the moment it takes a
few days to run.
THE CODE
---
for(i in 1:11) {
for (j in 3:12) {
for (k in 1
General suggestions: avoid cbind() and avoid accessing data frames. Convert
data frames to matrices before accessing them. Also, why do you print? You
don't really want to print(t) for every iteration of the loop, do you? Also
avoid defining elements within the loop that need to be defined only onc
Daniel,
it works, thanks for your time with this simple matter.
Best,
Alex
On Wed, 17 Aug 2011 16:35:48 -0700
"Daniel Nordlund" wrote:
>
> > -Original Message-
> > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> > On Behalf Of Alex Ruiz Euler
> > Sent: Wedn
Dear R community,
I have a 2 million by 2 matrix that looks like this:
x<-sample(1:15,200, replace=T)
y<-sample(1:10*1000, 200, replace=T)
x y
[1,] 10 4000
[2,] 3 1000
[3,] 3 4000
[4,] 8 6000
[5,] 2 9000
[6,] 3 8000
[7,] 2 1
(...)
The first column is a popula
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Alex Ruiz Euler
> Sent: Wednesday, August 17, 2011 3:54 PM
> To: r-help@r-project.org
> Subject: [R] More efficient option to append()?
>
>
> Dear R community,
>
> I have a 2 m
On Aug 17, 2011, at 5:53 PM, Shawn Boles wrote:
Could somebody point me to documentation of the '::' used as a
separator between package and function? Example: utils::help.start().
Sigh
?"::"
--
David Winsemius, MD
West Hartford, CT
__
R-h
Dear R community,
I have a 2 million by 2 matrix that looks like this:
x<-sample(1:15,200, replace=T)
y<-sample(1:10*1000, 200, replace=T)
x y
[1,] 10 4000
[2,] 3 1000
[3,] 3 4000
[4,] 8 6000
[5,] 2 9000
[6,] 3 8000
[7,] 2 1
(...)
The first column is a populat
Could somebody point me to documentation of the '::' used as a separator
between package and function? Example: utils::help.start().
Thank You.
Shawn
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch
Hi Frank, it's true to one of your reply to my previous post, can only be seen
in Nabble.
- Original Message -
From: David Winsemius
To: Frank Harrell
Cc: r-help@r-project.org
Sent: Wednesday, August 17, 2011 3:08 PM
Subject: Re: [R] Labelling all variables at once (using Hmisc label)
On Aug 17, 2011, at 5:49 PM, Frank Harrell wrote:
I'm puzzled. I provided a solution that did not require looping.
Frank
Hi Frank;
Do you realize that some portions of your Nabble postings are not
being communicated to the ordinary mail-clients? This code did not
appear in my copy from
On Aug 17, 2011, at 5:47 PM, David Winsemius wrote:
On Aug 17, 2011, at 5:19 PM, Rosario Garcia Gil wrote:
Hello
I am trying to run a PCA on the attached file, but I get this error
message:
pc<-prcomp(data[,-(1:2)],scale=T)$x
Error in svd(x, nu = 0) : infinite or missing values in 'x'
I'm puzzled. I provided a solution that did not require looping.
Frank
Monsieur Do wrote:
>
> I did read the help page before posting, but didn't find the direct way...
> My function here works fine. But just for learning purposes, I'd like to
> be able to avoid the loop...
>
> with.labels <- f
You did not follow the posting guide. You did not specify which packages you
were using. It appears that you are mixing the rms package with some other
functions such as gls. If you want to use rms, use the Gls function instead
of gls, and type ?contrast.rms to see examples of the use of contras
On Aug 17, 2011, at 5:19 PM, Rosario Garcia Gil wrote:
Hello
I am trying to run a PCA on the attached file, but I get this error
message:
pc<-prcomp(data[,-(1:2)],scale=T)$x
Error in svd(x, nu = 0) : infinite or missing values in 'x'
What part of "missing values in 'x'" is unclear in tha
Hi!
I try to explain the efffect of (1) forest where i took samples's soils (*
Lugar*: categorical variable with three levels), (2) nitrogen addition
treatments (*Tra*: categorical variable with two levels) on total carbon
concentration's soil samples (*C: *continue* *variable) during four months
On Aug 17, 2011, at 4:52 PM, Folkes, Michael wrote:
Hello all,
I'm hoping to convert a decimal value for week of the year back to a
date object.
Eg:
strptime(paste(2010,1:52,sep=" "),format="%Y %W")
Yeah, agree that seems as though it should have been successful. I
cannot get any of my i
Hello
I am trying to run a PCA on the attached file, but I get this error message:
pc<-prcomp(data[,-(1:2)],scale=T)$x
Error in svd(x, nu = 0) : infinite or missing values in 'x'
Thanks in advance
/R x y x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14
1 25.49 45.62 125 156 165 130 179 152 82 165
On Aug 17, 2011; 5:43pm Luke Duncan wrote:
Hi Luke,
The differences you are seeing are almost certainly due to different
contrast codings: Statistica probably uses sum-to-zero contrasts whereas R
uses treatment (Dunnett) contrasts by default. You would be well advised to
consult a local statistic
Hello all,
I'm hoping to convert a decimal value for week of the year back to a date
object.
Eg:
strptime(paste(2010,1:52,sep=" "),format="%Y %W")
I expected (hoped?) this would give me the date for Monday of each week.
Instead, it's giving me 52 values of today's date.
Where am I erring?
Than
I did read the help page before posting, but didn't find the direct way... My
function here works fine. But just for learning purposes, I'd like to be able
to avoid the loop...
with.labels <- function(x, labels=NULL, csvfile=NULL) {
if(!is.null(csvfile)) labels <- read.csv(csvfile, sep="\t", hea
Thank you for your answers. Problem solved. Eik's cue to
all.names(match.call())[-1] was particularly enlightning!
Do
> De : Eik Vettorazzi
[mailto:e.vettora...@uke.uni-hamburg.de]
> Envoyé : 17 août 2011 08:46
> À : Monsieur Do
> Cc : r-help@r-project.org
> Objet : Re: [R] Obtaining variable'
Hello!
I have a contour and I need *to rotate* it 180 degrees counterclockwise and
180 degrees around the x-axis.
This is a code. I get all the values from the ncdf file:
A = get.var.ncdf(nc, "air", start=c(1,1,1,1), count=c(144,73,1,1))
contour(A)
Thank you!
--
View this message in context:
I try loading Rmpi directly I don't have any problem i.e. I loading Rmpi by R
x64 2.12.2 (GUI)
--
View this message in context:
http://r.789695.n4.nabble.com/statEt-Rmpi-problem-in-Eclipse-statEt-tp3750738p3750743.html
Sent from the R help mailing list archive at Nabble.com.
Hi,
I try use Rmpi package to my compute. In my work I'm using eclipse version
3.6.2 and statEt version 0.10.0 (launch Rterm or RJ). Actually I observed
strange behavior, when I try loading Rmpi directly I don't have any problem
i.e.:
library("Rmpi")
mpi.spawn.Rslaves()
8 slaves are spawned s
Dear all,
I'm facing a problem in estimation of glm model with weibull distribution. I
run this :
eqn0<-formula(fdh~cup1+cup2+cup3+cup4+fin1+vd1+cm2+cm4+milieu+cpro1+cpro2+cpro3a+cpro3b+schef+log(y))
regWeib0<-vglm(eqn0,family=weibull,subset(br, fdh<1))
I have en estimation but there is a messa
I have found the solution
betareg(formula, data) is equivalent to vglm(formula,betaff(zero=2),data)
Sorry for the previous post.
Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774
- Mail original -
De : justin bem
À : R Maillist
Cc :
Envoyé le : Mercredi 17 Août 2011 20h30
Objet : [R
Dear all,
I'm trying to estimate beta regression with the betareg package and VGAM package
With the betareg package (Cribari-Neto and Zeilis) I use this code
betareg(formula, data)
In my mind it possible with VGAM function vglm as
vglm(formula,betaff, data)
But betaff have two shapes an
Dear Michael,
Thanks a lot for your reply and for your help.I was struggling so much but your
suggestion showed me a path to the solution of my problem.I have tried your
code on my data frame step wise and it looks fine to me.But when i tried chi
square test-
res=chisq.test(y1[id],p=y2[id],res
Hello,
We are trying to use R to simulate a model based on some parameters 'a' and
'b'.
This involves the following integration:
model<-function(s,x,a,b)(exp(-s*x*10^-5.5)*(s^(a-1)*(1-s)^(b-1)))
g<- function(x,a,b){
out<-c()
for (i in 1:length(x)){
out[i]<-1- (integrate(model,0,1
Hi:
I would agree with Paul Hiemstra about using Hadley's code instead;
see ?plyr:::mutate for details. It would also make sense to sort the
data and edf by group - this does it in one line:
arrange(ddply(df, .(Group), mutate, edf = edf(Value)), Group, edf)
HTH,
Dennis
On Wed, Aug 17, 2011 at 4
I'm trying to create a dotplot with some grouping.
I've been able to create what I want using dotchart (basic graphics), but can't
quite get it using dotplot (lattice). I prefer to use lattice (or ggplot2)
because I think it's a bit easier to control some other aspects of the plot
appearance.
> -Original Message-
> From: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de]
> Sent: Wednesday, August 17, 2011 11:14 AM
> To: Nordlund, Dan (DSHS/RDA)
> Cc: r-help@r-project.org
> Subject: Re: [R] Using require() vs. library()
>
> Actually require() is a wrapper around library() with
On 17.08.2011 17:17, tcentofanti wrote:
I tried to install R 2.13.1 this morning on a Windows XP SP3 machine. I have
the 2 previous versions of R running flawlessly. However when I try to open
R from my Programs, I get an error and then R crashes. I've seen a few posts
with this error but none
Actually require() is a wrapper around library() with more error
handling to be used inside other functions. Just type require(), you can
read the few lines of code quickly.
Uwe Ligges
On 17.08.2011 19:57, Nordlund, Dan (DSHS/RDA) wrote:
-Original Message-
From: istaz...@gmail.com [
I think everything below is right, but it's all a little helter-skelter so
take it with a grain of salt:
First things first, make your data with dput() for the list.
Y = structure(c(0, 35, 0, 0, 0, 0, 84, 84, 0, 48, 84, 0, 22, 0, 0,
0, 0, 0, 10, 0, 48, 0, 0, 48, 0, 22, 0, 0, 0, 0, 84, 84, 0, 48,
Hi:
On Wed, Aug 17, 2011 at 1:56 AM, gaiarrido wrote:
> Hi,
> I´ve got this model
>> model<-glm(prevalence~agesex+agesex:month,binomial)
>
> and the output of anova is like that
>
>> anova(model,test="Chisq")
> Df Deviance Resid. Df Resid. Dev P(>|Chi|)
> NULL
Hi Jack,
You need to quote non-syntactic names.
A$`A 1`
A$'A 1'
A$"A 1"
should all work, with the first form being the recommended one.
Best,
Ista
On Wed, Aug 17, 2011 at 1:45 PM, Jack Luo wrote:
> Hi,
>
> After I read an xlsx file into the work space:
> A <- read.xlsx("B.xls", header = T, ch
> -Original Message-
> From: istaz...@gmail.com [mailto:istaz...@gmail.com] On Behalf Of Ista
> Zahn
> Sent: Wednesday, August 17, 2011 10:12 AM
> To: Nordlund, Dan (DSHS/RDA)
> Cc: r-help@r-project.org
> Subject: Re: [R] Using require() vs. library()
>
> Hi Dan,
> Is there something you w
Hi,
After I read an xlsx file into the work space:
A <- read.xlsx("B.xls", header = T, check.names = F)
There are several headers with the names like:
colnames(A) [1:4]
# [1] "A 1""B"
[3] "C 2" "D"
I can get the content of column 2 and column 4 eas
.
>
> - Firstly, for each observation, I have means for a treatment and for
> a control, but I don’t always have corresponding standard deviations (52 of a
> total of 93 observations don’t have standard deviations). Nevertheless I have
> the sample sizes for all observations so I wonder
Dear Emilie,
Regarding your questions:
1) It's not the weighting that is the main issue when you do not have the SDs.
The problem is that you need the SDs to calculate the sampling variances of the
mean differences (I assume that this is your outcome measure for the
meta-analysis). Those are n
Hi Dan,
Is there something you would like to know that is not covered by help(library) ?
Best,
Ista
On Wed, Aug 17, 2011 at 12:40 PM, Nordlund, Dan (DSHS/RDA)
wrote:
> A recent post prompts me to ask this question. Is there any reason to prefer
> using library() over require()? I tend to use
Thanks for the idea Rolf, it helped me isolate the cause. FWIW I still
wanted to get the automatic dependencies check that install.packages()
provides - an incredibly powerful incentive.
I found the following workaround to be effective for me.
repos = getOptions("repos")
repos["CRAN"] = "http:/
A recent post prompts me to ask this question. Is there any reason to prefer
using library() over require()? I tend to use require() instead of library()
to load packages, but I wonder if there are situations where it would be better
to use library().
Enquiring minds would like to know,
Da
I tried to install R 2.13.1 this morning on a Windows XP SP3 machine. I have
the 2 previous versions of R running flawlessly. However when I try to open
R from my Programs, I get an error and then R crashes. I've seen a few posts
with this error but none of the fixes work (rename .RDATA, run as
--n
That worked great, thanks! Now that I have created list h (see below), I
would like to use the selections made in h to make new selections in list c
(see below). List c needs to get the exact same shape as h, so that `8026`in
1997 (c$`1997`$`8026`) looks like this:
$`1997`$`8026`
B
B 8
Hello,
Â
I would like to do a meta-analysis with the package « metafor ». Ideally I
would like to use a mixed model because Iâm interested to see the effect of
some moderators. But the data set I managed to collect from literature presents
two limits.
Â
-Â Â Â Â Â Â Â Â Firstly, for ea
Dear R gurus
I am analysing data from a study of behaviour and shade utilization of
chimpanzees. I am using GLMs in R (version 2.13.0) to test whether shade/sun
utilization is predicted by behaviour observed. I am thus interested in
whether an interaction of behaviour (as a predictor) and presence
On 17.08.2011 16:27, Luis Felipe Parra wrote:
Uggs, as I understand rJava is for calling Java from within R and what I
need is to call R within Java. Am I wrong?
Partly: rJava contains JRI these days, see:
http://www.rforge.net/rJava/
Uwe Ligges
2011/8/17 Uwe Ligges
Are you sure "rJava"
On Wed, 2011-08-17 at 08:06 -0700, ivo welch wrote:
> hi gavin---I am not even sure that it is a cairo bug, much less do I
> know about the details where it sits. for all I know, it could be an
> Apple problem. the "possible bug report" was not only for the cairo
> package (what's the difference b
Not sure what output you get in the first case. You don't need:
ps.options=setEPS()
just:
setEPS()
Using:
set.seed(1)
test <- matrix(runif(500*500), 500)
setEPS()
postscript(file = "exponcoverapprox.eps")
boxplot(test[30, 1:500], test[90, 1:500], test[150, 1:500], test[210, 1:500],
Thank, Eik, it works!
-Jack
On Wed, Aug 17, 2011 at 9:19 AM, Eik Vettorazzi <
e.vettora...@uke.uni-hamburg.de> wrote:
> Hi Jack,
> yes there is. see ?read.table for option check.names
>
> and to the 2nd task "." is a special character in regular expressions,
> so mask it or don't use regular exp
Hi Eik,
Thanks, that got me on the right track. After looking at how
get_all_vars() works, I am using:
all.vars(as.formula(m))
which works great.
Thanks again,
Josh
On Wed, Aug 17, 2011 at 6:14 AM, Eik Vettorazzi
wrote:
> Hi Josh,
> I think,
>
> m <- lm(mpg ~ factor(cyl)+I(mpg^2), data = mt
On Aug 17, 2011, at 11:19 AM, Bert Gunter wrote:
(Note: Posted at the suggetsion of David Winsemius, to whom I already
sent a private reply).
Inline Below.
On Wed, Aug 17, 2011 at 7:34 AM, David Winsemius > wrote:
On Aug 17, 2011, at 9:15 AM, mike1989 wrote:
Dear R Users,
I am writing co
(Note: Posted at the suggetsion of David Winsemius, to whom I already
sent a private reply).
Inline Below.
On Wed, Aug 17, 2011 at 7:34 AM, David Winsemius wrote:
>
> On Aug 17, 2011, at 9:15 AM, mike1989 wrote:
>
>> Dear R Users,
>>
>> I am writing code to present my output data (I'm using Latt
Hi all,
I'm trying to do model reduction for logistic regression. I have 13
predictor (4 continuous variables and 9 binary variables). Using subject
matter knowledge, I selected 4 important variables. Regarding the rest 9
variables, I tried to perform data reduction by principal component
analysis
hi gavin---I am not even sure that it is a cairo bug, much less do I
know about the details where it sits. for all I know, it could be an
Apple problem. the "possible bug report" was not only for the cairo
package (what's the difference between a package and a library? in my
user R code, I invoke
The problem is a bit weird.
This does not work:
ps.options=setEPS()
postscript(file="exponcoverapprox.eps")
boxplot(test[30,1:500],test[90,1:500],test[150,1:500],test[210,1:500],test[270,1:500],test[330,1:500],test[390,1:500],names=c("1","3","5","8","10","13","1"),outline=FALSE,ylim=c(0.01,50),lo
On Aug 17, 2011, at 10:39 AM, carol white wrote:
Thanks for your all replies.
Actually, I have more than this number of variables. I want to make
a selection of variables with anova and I thought that I can apply
anova to the object obtained by lm. The purpose is to select the
genes disc
Thanks for your all replies.
Actually, I have more than this number of variables. I want to make a selection
of variables with anova and I thought that I can apply anova to the object
obtained by lm. The purpose is to select the genes discriminting control
samples from disease.
Best,
Carol
On Aug 17, 2011, at 9:15 AM, mike1989 wrote:
Dear R Users,
I am writing code to present my output data (I'm using Lattice
Package).
However, it's essential for me to control space between barchart and
legend.
I've read the package's specification, but unfortunately I haven't
spot the
in
Is there anyone who can help me with chi square test on data frame.I am
struggling from last 2 days.I will be very thankful to you.
Dear all,
I have been working on this problem from so many hours but did not find any
solution.
I have a data frame with 8 columns-
V1 V2 V3
Uggs, as I understand rJava is for calling Java from within R and what I
need is to call R within Java. Am I wrong?
2011/8/17 Uwe Ligges
> Are you sure "rJava" is not fine for you?
>
> Uwe Ligges
>
>
> On 16.08.2011 17:16, Luis Felipe Parra wrote:
>
>> Hello, I am trying to install SJava but I h
Are you sure "rJava" is not fine for you?
Uwe Ligges
On 16.08.2011 17:16, Luis Felipe Parra wrote:
Hello, I am trying to install SJava but I haven't been able to complete it
successfully. I have tried to install it from bioconductor using the
followin code and got the following output:
source
Hi,
Maybe this post can help you:
http://tolstoy.newcastle.edu.au/R/e2/help/06/10/2735.html
On Wed, Aug 17, 2011 at 10:15 AM, mike1989 wrote:
> Dear R Users,
>
> I am writing code to present my output data (I'm using Lattice Package).
> However, it's essential for me to control space between ba
Thank you bbolker for your help and advice about guide.
Komine
--
View this message in context:
http://r.789695.n4.nabble.com/exponential-model-with-decreasing-tp3747572p3749933.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help
Dear R Users,
I am writing code to present my output data (I'm using Lattice Package).
However, it's essential for me to control space between barchart and legend.
I've read the package's specification, but unfortunately I haven't spot the
information how to do this. Here's the code I've written:
I'm not sure this is the most elegant way. See ?formula for the canonical way
of doing this in R. However, I am hoping you're not fitting a model with more
than 2,000 predictors, are you? If so, ummm, wow.
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@
Hi Carol,
it might be another question if it is sensible to use 2100 regression
parameters, but you can use . to regress one response against all other
variables in a data frame as in:
lm(formula = mpg ~ ., data = mtcars)
and you can even exclude specific variables using "-"
lm(formula = mpg ~ .
another approach is:
Df <- as.data.frame(cbind(rcauchy(100), matrix(runif(100*50), ncol = 50)))
fit <- lm(V1 ~ ., data = Df)
fit
I hope it helps.
Best,
Dimitris
On 8/17/2011 3:28 PM, R. Michael Weylandt wrote:
The most elegant solution is going to depend on where you data comes from,
but on
Thanks for the suggestion, Duncan.
However, I was trying to maintain the contingency
table/cross-classification structure of the original table.
My use of xtable on this table, maintains the structure I want, but
the labels for the rownames and colum names is lost.
On Tue, Aug 16, 2011 at 11:0
Hi!
You can try import the file with header = F, and after inform that the first
row is a header.
On this post is some idea:
http://stackoverflow.com/questions/2293131/reading-first-row-as-header-is-easy-what-gives-with-two-rows-being-the-header
On Wed, Aug 17, 2011 at 10:03 AM, Jack Luo wrote:
The most elegant solution is going to depend on where you data comes from,
but one way to do it if you have a matrix of data:
D = cbind(rcauchy(100), matrix(runif(100*50),ncol=50)) # Some nonsense data
lm(D[,1] ~ D[,-1])
If you let us know how your data is set up, a more specific response can be
Hello,
It might be an easy question but if you have many variables to fit in the lm
function, how do you take all without specifying var1+var2+...+var2100 in the
terms parameter in response ~ terms?
Cheers,
Carol
__
R-help@r-project.org mailing list
Hi Jack,
yes there is. see ?read.table for option check.names
and to the 2nd task "." is a special character in regular expressions,
so mask it or don't use regular expressions:
gregexpr("[.]","A.B.C.D") #or
gregexpr(".","A.B.C.D",fixed=T)
cheers.
Am 17.08.2011 15:03, schrieb Jack Luo:
> Hi,
>
Hi Josh,
I think,
m <- lm(mpg ~ factor(cyl)+I(mpg^2), data = mtcars)
nd<-get_all_vars(m,data=mtcars)
is what you are after.
cheers.
Am 17.08.2011 04:27, schrieb Joshua Wiley:
> Hi All,
>
> I am writing a function to predict values based on a model. It works
> fine as long as the formula just
Hi,
I have a silly question regarding the usage of two commands: read.table and
gregexprï¼
For read.table, if I read a matrix and set header = T, I found that all the
dash ("-") becomes dots (".")
A = read.table("Matrix.txt", sep = "\t", header = F)
A[1,1]
# "A-B-C-D".
A = read.table("Matrix.t
On Tue, Aug 16, 2011 at 4:35 PM, Fredrik Karlsson wrote:
> Hi,
>
> I would like to add an additional key inside of a panel based on a factor
> that is not the "groups" argument.
> I've tried using the panel.key function in latticeExtras, but I cannot get
> the line types the way I want it.
>
> Usi
On Aug 17, 2011, at 1:46 AM, Monsieur Do wrote:
> Say I have a list of variables,
>
> listVar <- list(age,sex)
>
> I am looking for a way to either
>
> 1- create a vector c("age","sex") from it, or
> 2- get the names one by one in a for loop such as these
>
> a) for (i in 1:length(listVa
Dear list,
I'm trying to fit a chapman-richards equation to my data, only I
cannot interpret the parameters a, b and d. I know that the parameter
b denotes the asymptote, but for the others I couldn't figure out. But
I do need to know this in order to set my starting values. Here's the
model:
mod
Hi,
there is no direct way, since
listVar <- list(age,sex)
creates a unnamed list, as can be seen by
names(listVar) #or
str(listVar)
You can do sth like
listVar <- list(age=age,sex=sex) # or
listVar2 <- list(age,sex)
names(listVar2)<-c("age","sex")
and afterwards access them using names().
Or yo
On Tue, 2011-08-16 at 17:46 -0700, ivo welch wrote:
> I think I found a bug in the Cairo library, plus weird behavior in
> both the Cairo and the normal pdf device. The baseline of the spades
> symbol seems to be off. This is easier to show than it is to explain.
> The problem does not appear in
On Wed, 2011-08-17 at 09:49 +0200, COCCIA , CRISTINA wrote:
>
> Good morning all,
>
> I'm trying to find the package "packfor" to install on my library in
> R, but I'm not available to find it online, so I would ask to you if
> you please let e know how I could find it and if I need a special R
Here is: http://r-forge.r-project.org/R/?group_id=195
On Wed, Aug 17, 2011 at 9:08 AM, Ista Zahn wrote:
> A google search for "packfor r package" will do it.
>
> Best,
> Ista
>
> On Wed, Aug 17, 2011 at 3:49 AM, COCCIA , CRISTINA
> wrote:
> >
> >
> > Good morning all,
> >
> > I'm trying to find
A google search for "packfor r package" will do it.
Best,
Ista
On Wed, Aug 17, 2011 at 3:49 AM, COCCIA , CRISTINA wrote:
>
>
> Good morning all,
>
> I'm trying to find the package "packfor" to install on my library in R, but
> I'm not available to find it online, so I would ask to you if you pl
Have a look at function ave(), e.g.,
set.seed(1)
(df <- data.frame(Group=rep(c("Group1","Group2","Group3"), each=10),
Value=c(rexp(10, 1), rexp(10, 4), rexp(10, 10)))[sample(1:30,30),])
edf <- function(x) ecdf(x)(x)
df$edf <- with(df, ave(Value, Group, FUN = edf))
df
I hope it helps.
Best
1 - 100 of 123 matches
Mail list logo