On Tue, 8 Jan 2008, Anders Schwartz Corr wrote:
>
> Hi,
>
> I'm running gam (mgcv version 1.3-29) and glm (logit) (stats R 2.61) on
> the same models/data, and I got error messages for the gam() model and
> warnings for the glm() model.
>
> R-help suggested that the glm() warning messages are due
Dear R-users,
I would like to create a new data frame composed of 2 columns of another
data frame. But it does not give me what I want...
> casesCNST[1:10,]
case X1 X2 X3 X4 expected
1A1 0 0 0 0E
2A2 0 0 0 1C
3A3 0 0 0 2C
4A4 0 0 0 3
mika03 wrote:
> http://www.nabble.com/file/p14664173/at-modality.png
>
>
> I created the above image with R and I have one problem left:
>
> Some of the labels of the axes do not show up, probably because there's not
> enough space.
>
>
> I use the following code to create the plot:
> modalit
Delphine Fontaine genexion.com> writes:
> I would like to create a new data frame composed of 2 columns of another
> data frame. But it does not give me what I want...
>
> > casesCNST[1:10,]
>case X1 X2 X3 X4 expected
> 1A1 0 0 0 0E
> 2A2 0 0 0 1C
...
> > ex
Hello,
I have a dataset with 20,000 variables.and I would like to compute a pearson
correlation matrix which will be 2*2. The cor() function doesnt work
in this case due to memory problem. If you have any ideas regarding a
feasible way to compute correlations on such a huge dataset, please
Dear R Users:
I have race-ethnicity groups identified in the factor variable Ethnic_G.
I need to collapse Ethnic_G into a new variable with only two factors, 1
(White, non-Hispanic) and 2 (Minority).
As seen in the code and output below, the recoded race-ethnicity variable is
put into logi
Dear all:
I have very small observed values and would like to do a goodness-of-fit test.
Is there a multinomial exact goodness of fit test in R? Thank you very much!
Sincerely,
Jian
-
[[alternative HTML version deleted]]
___
My question arises when I use levelplot graphics. For example,
levelplot(z~x*y|fg) where fg is a factor with three levels of
'a','b','c'. The panels come out in a default order. I would like to
rearrange the panels in a manner of 'c','b','a'. I used
fg<-ordered(fg, levels=c('c','b','a'))
Bu
Anders,
A very flexible logistic regression model is quite often able to predict some
subset of the data `perfectly' with the unfurtunate consequence that the
corresponding linear predictor is not well defined. My guess would be that
the extra flexibility of the gam is what is causing slightly
Hello,
I have a memory problem when I run package WinBUGS with R (2.6.1).
Until now I have been using a Pentium IV 3.2Ghz computer with 512Mb of
RAM memory (with Windows XP Pro SP2), and I hadn't had any problem.
Now I have a new computer with the following characteristics: Intel
Core 2 duo 2.33Gh
On 1/7/2008 3:32 PM, Thomas MacFarland wrote:
> Dear R Users:
>
> I have race-ethnicity groups identified in the factor variable Ethnic_G.
>
> I need to collapse Ethnic_G into a new variable with only two factors, 1
> (White, non-Hispanic) and 2 (Minority).
>
> As seen in the code and output
At 11:46 06/01/2008, Simo Vundla wrote:
>Hi,
>I'm trying to import categorical data from SPSS to R using the script:
>xxx <-spss.get("xxx.por", use.value.labels=TRUE) but unfortunately
>am getting an error message 'error reading portable-file dictionary'.
>
>I have successfully imported data in th
Delphine Fontaine a écrit :
> Dear R-users,
>
> I would like to create a new data frame composed of 2 columns of another
> data frame. But it does not give me what I want...
>
>> casesCNST[1:10,]
>case X1 X2 X3 X4 expected
> 1A1 0 0 0 0E
> 2A2 0 0 0 1C
> 3
Rong Jian wrote:
> Dear all,
> I would like to do a goodness-of-fit test on my data to see if they follow a
> mixture of 2 poisson distributions. I have small numbers for observed values.
> Most of them <5. The chisq.test gives warning message: Chi-squared
> approximation may be incorrect in: c
> I want to get the minimum arc (in degrees) needed to include a set of
> compass directions. I would like to use the range.circular() function
> of the package circular, because that package understands a compass-type
> of angle convention, but it gives results I don't understand. Howver, I
> ca
On Mon, 7 Jan 2008, Rong Jian wrote:
> Dear all:
>
> I have very small observed values and would like to do a goodness-of-fit
> test. Is there a multinomial exact goodness of fit test in R? Thank you
> very much!
chisq.test(simulate.p.value = TRUE)
for some senses of 'exact'.
>
> Sincerely,
>
It works for me.
fg <- ordered(letters[1:3])
levelplot(1:3 ~ 1:3 * 1:3 | fg)
# (panels a, b, c)
fg <- ordered(fg, levels=c('c','b','a'))
levelplot(1:3 ~ 1:3 * 1:3 | fg)
# (panels c, b, a)
> packageDescription("lattice")$Version
[1] "0.17-2"
On Jan 8, 2008 4:43 AM, Weidong Gu <[EMAIL PROTECTED]>
Rod wrote:
> Hello,
>
> I have a memory problem when I run package WinBUGS with R (2.6.1).
> Until now I have been using a Pentium IV 3.2Ghz computer with 512Mb of
> RAM memory (with Windows XP Pro SP2), and I hadn't had any problem.
> Now I have a new computer with the following characteristics: I
Using the package /RMySQL/ I have established a connection ('con1') to a
MySQL-Database called 'mc'.
This database contains a table called 'mc_2000' which has 20 observations
on several
variables. One of these variables is called 'B5' (type 'double').
When I generate a numeric vector in R cal
Dear Chuck and Thomas,
Thanks, Chuck, for answering Thomas's question.
A small point: If Thomas recode()s the factor directly, as you suggest, then
as.factor.result=TRUE is the default.
Regards,
John
John Fox, Professor
Department of Sociology
McMaster Univers
Jan Galkowski wrote
> I'm adapting a FORTRAN 77 package for use with R. Pretty
> straightforward.
>
> Except for a glitch it took me some time to figure out. This existing
> package has subroutines which have parameters called "NA". So, I called
> subroutines like
>
> bnodes <- function(n, l
On 1/8/2008 7:11 AM, Marcus Wurzer wrote:
> Using the package /RMySQL/ I have established a connection ('con1') to a
> MySQL-Database called 'mc'.
> This database contains a table called 'mc_2000' which has 20 observations
> on several
> variables. One of these variables is called 'B5' (type
On Jan 8, 2008 12:41 PM, Duncan Murdoch <[EMAIL PROTECTED]> wrote:
>
> Rod wrote:
> > Hello,
> >
> > I have a memory problem when I run package WinBUGS with R (2.6.1).
> > Until now I have been using a Pentium IV 3.2Ghz computer with 512Mb of
> > RAM memory (with Windows XP Pro SP2), and I hadn't h
Bram,
On Tue, Jan 08, 2008 at 03:11:07PM +0100, Bram Kuijper wrote:
> Hi all,
>
> As an R newbie, I wonder how I can store multiple matrices in a list()
> or vector() object without losing their structure. I should be able to
> retrieve the matrix from the list later on.
>
> If I just append()
Hi all,
As an R newbie, I wonder how I can store multiple matrices in a list()
or vector() object without losing their structure. I should be able to
retrieve the matrix from the list later on.
If I just append() the matrices to a list() object, they automatically
lose their dimensions, wherea
Hi,
I have a matrix data with 21 rows and 6 columns. Below and attach with is my
matrix data. My problem is to split the column into 3 subcolumns (except for
column 3 and 4) . I want my new matrix data to have 14 columns and 21 rows.
Kindly help is highly appreciated.
[,1]
On 1/8/2008 8:49 AM, Rod wrote:
> On Jan 8, 2008 12:41 PM, Duncan Murdoch <[EMAIL PROTECTED]> wrote:
>>
>> Rod wrote:
>> > Hello,
>> >
>> > I have a memory problem when I run package WinBUGS with R (2.6.1).
>> > Until now I have been using a Pentium IV 3.2Ghz computer with 512Mb of
>> > RAM memory
> John Sorkin wrote:
> The difference is not so much the language
> as the end users.
> S-Plus, R, SAS, etc. are all similar in that
> they are all tools to an end and not an end
> in themselves.
Try to find one user who:
1. is familiar with both SAS and R/S-Plus;
2. has to do real data analys
If mat is your matrix then this will produce a 14 column data frame:
DF <- read.table(textConnection(apply(mat, 1, paste, collapse = " ")))
On Jan 8, 2008 9:36 AM, mohamed nur anisah <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a matrix data with 21 rows and 6 columns. Below and attach with is
Try this also:
do.call(rbind, lapply(apply(df, 1, paste, collapse=" "),
function(.x)read.table(textConnection(.x
On 08/01/2008, mohamed nur anisah <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a matrix data with 21 rows and 6 columns. Below and attach with is
> my matrix data. My problem is
On Jan 8, 2008 12:34 AM, suman Duvvuru <[EMAIL PROTECTED]> wrote:
> Hello,
> I have a dataset with 20,000 variables.and I would like to compute a pearson
> correlation matrix which will be 2*2. The cor() function doesnt work
> in this case due to memory problem. If you have any ideas regar
Hi
Do you have a source data available. Maybe you could try to read it in
such manner that you will get desired result without further adjustment.
See all options in read.* functions.
If you really wanted to split already imported data you will need to use
regular expressions and I am not an
Dear useRs,
I would like to access a remote Oracle database through R but I just cannot
find sufficient online information to do so. As a result, I am wondering if you
can provide me with a link to a document that details the steps I need to
undertake to successfuly complete the task (e.g., packag
Hi,
I am using the EBImage package for image display and analysis and want to read
the cursor (mouse) position on the image. The function "locator()" would be
ideal, but this appears to work only on plots, not images.
> a <- Image((0:(w^2))/w^2, c(w,w))
> if ( interactive() ) display(a)
> loca
Yes, this works well. Also 'table' suggested by Bert Gunter also
works perfectly.
Thank all who've helped me on this.
Gang
On Jan 7, 2008, at 7:39 PM, jim holtman wrote:
> Does this do what you want?
>
>> x <- read.table(textConnection("AB C D
> + A1 B1 C1 D1
> + A1 B2 C1 D1
> + A1
On Tue, 8 Jan 2008, Peter Hietz wrote:
> Hi,
>
> I am using the EBImage package for image display and analysis and want
> to read the cursor (mouse) position on the image. The function
> "locator()" would be ideal, but this appears to work only on plots, not
> images.
>
>> a <- Image((0:(w^2))/
Hello,
I'm trying to obtain a maximum likelyhood estimate of a gaussian model
by the MLE command, as I did with a Poisson model:
x <- rep(1:2,each=500)
y <- rnorm(length(x), mean=10+3*x, sd=1)
glm1 <- glm(y ~ x , family=gaussian())
library(stats4)
func1 <- function(alfa=10, beta=3, sigma=
A good summary of the differences between S-PLUS and SAS, along with
their respective advantages and disadvantages, is given in Section 1.6
of http://lib.stat.cmu.edu/S/Harrell/doc/splusp.pdf.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of bogdan romoce
try the following:
delta <- c(2.5, 2.5, 1)
v <- list(
matrix(round(rnorm(70, 2), 2), 5, 14),
matrix(round(rnorm(70, 2), 2), 5, 14),
matrix(round(rnorm(70, 2), 1), 5, 14)
)
v
mapply(function(x, y){ x[x > y] <- NA; x }, v, delta, SIMPLIFY =
FALSE)
I hope it helps.
Best,
Dimitris
--
useR's,
I am trying to find a quick way to change some values in a list that are
subject to a condition to be NA. Consider the 3x1 matrix:
delta <- matrix(c(2.5,2.5,1), nrow = 1)
And consider the list named v that has 3 elements
> v
v[[1]]
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
How do I retain "POSIXct" formatting when using apply, with FUN=max?
#example:
mydata <- rep(Sys.time(), 10)
mydf <- data.frame(matrix(data=mydata, nrow=2, ncol=length(mydata) ) )
for(i in seq(mydf))class(mydf[[i]]) <- class(mydata)
str(mydf)
maxdates <- apply(mydf,2,max,na.rm=T)
str(maxdat
Matthias Gondan wrote:
> Dear R users,
>
> I noticed a problem in the anova command when applied on
> a single coxph object if there are missing observations in
> the data:
>
> This example code was run on R-2.6.1:
>
> > library(survival)
> > data(colon)
> > colondeath = colon[colon$etype==2, ]
Dear R users,
I noticed a problem in the anova command when applied on
a single coxph object if there are missing observations in
the data:
This example code was run on R-2.6.1:
> library(survival)
> data(colon)
> colondeath = colon[colon$etype==2, ]
> m = coxph(Surv(time, status) ~ rx + sex
Thank you, this works perfectly!
Dimitris Rizopoulos wrote:
>
> try the following:
>
> delta <- c(2.5, 2.5, 1)
> v <- list(
> matrix(round(rnorm(70, 2), 2), 5, 14),
> matrix(round(rnorm(70, 2), 2), 5, 14),
> matrix(round(rnorm(70, 2), 1), 5, 14)
> )
>
> v
> mapply(function(x, y)
I would like to use aggregate.ts() and apply() on circular data, but I
can't figure out how to get the circular data components to pass
through:
library(circular)
x <- circular(c(20, 30, 355, 5, 345, 25), units = "degrees")
% I want to get the mean angle for each successive pair; answer should
be
Dear all,
i need some help with plotting.
the specific problem is the following:
#FYI
a=100
b=95
d=94.5
e=70
all=c(a,b)
all2=c(d,e)
plot(all,type="b",col="blue",xlim=c(1,4),ylim=c(20,150))
lines(all2,type="o",col="yellow")
this does work so far, but ...
i´d like to have 4 intersects, just nam
Dear users,
I try to follow the instruction on this page to install R on 4.4BSD network.
http://cran.r-project.org/doc/manuals/R-admin.html#Using-make
I can unpack the file but the system can't recognize the command:
./configure
make
Any ideas what should be the right command?
Thanks!!
K.
On 1/8/2008 2:48 PM, Knut Krueger wrote:
> Hi to all,
> Is there a possibility to choose which value is used for the intercept
> or does in not make any sense?
> f.e I would like to use outcome2 for the intercept
>
> ## Dobson (1990) Page 93: Randomized Controlled Trial :
> counts <- c(18,17,15,2
Hi to all,
Is there a possibility to choose which value is used for the intercept
or does in not make any sense?
f.e I would like to use outcome2 for the intercept
## Dobson (1990) Page 93: Randomized Controlled Trial :
counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
treatment <- gl(
add_pkg -r R
Kitty Lee wrote:
> Dear users,
>
> I try to follow the instruction on this page to install R on 4.4BSD network.
>
> http://cran.r-project.org/doc/manuals/R-admin.html#Using-make
>
>
> I can unpack the file but the system can't recognize the command:
>
> ./configure
> make
>
>
useR's,
This is a follow up question to one I previously asked. Consider the
3-element list below
> res
[[1]]
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
[,13] [,14]
[1,] NA NA NA 1.25 0.25 0.75 NA NA NANANANA 1.25
0.25
[2,] 1.25 0.25 0.7
do you mean the following?:
out <- rowMeans(matrix(unlist(res), ncol = length(res)))
dim(out) <- dim(res[[1]])
out
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel:
Antonio Gasparrini wrote:
>
> Hello,
>
> I'm trying to obtain a maximum likelyhood estimate of a gaussian model
> by the MLE command, as I did with a Poisson model:
>
> x <- rep(1:2,each=500)
> y <- rnorm(length(x), mean=10+3*x, sd=1)
>
> glm1 <- glm(y ~ x , family=gaussian())
>
> library
Yes, that's it. Thank you again!
Dimitris Rizopoulos wrote:
>
> do you mean the following?:
>
> out <- rowMeans(matrix(unlist(res), ncol = length(res)))
> dim(out) <- dim(res[[1]])
> out
>
>
> Best,
> Dimitris
>
>
> Dimitris Rizopoulos
> Ph.D. Student
> Biostatistical Centre
> School
?par look at xaxt
?axis
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of bunny ,
> lautloscrew.com
> Sent: Tuesday, January 08, 2
Dear all,
meanwhile i found out how to handle the coordinate thing and plot the
lines like i like.
the remaining problem is, i need something like names.arg does in
barplot for my plot.
my plot connects several dots with several lines. and now i like
characters as the names of the intersect
I have a text string "test.a..34"
I wish to extract the text that comes after ".." (e.g. "34"), and the text
that comes before ".." (e.g. "test.a").
What is a good way to do this? Also, can you help me understand how to use
"wildcards" such as "*" with sub, etc?
#This seems
Thanks to Saeed Abu Nimeh. I used pkg_add to install R package on 4.4BSD.
My directory now has the following:
BUILDDIRMakefrag.cc_lo config.log m4 tests
MakeconfMakefrag.cxxconfig.status po tools
MakefileR-2.6.1 doc
This will work:
> sub(".*\\.\\.", "", "test.a..34")
[1] "34"
This say match all characters upto and including the two periods. You
have to escape the periods since they have special meaning in regular
expression (match a character).
On Jan 8, 2008 6:08 PM, Charilaos Skiadas <[EMAIL PROTECTED]>
It all depends on what you are doing. Take a look at 'apply'; it says:
If X is not an array but has a dimension attribute, apply attempts to
coerce it to an array via as.matrix if it is two-dimensional (e.g.,
data frames) or via as.array.
Now take a look at what happens when you convert your dat
If this is really the case you are dealing with, wouldn't strsplit do
the job more easily?
On Jan 8, 2008, at 5:47 PM, Thomas Pujol wrote:
> I have a text string "test.a..34"
>
> I wish to extract the text that comes after ".." (e.g. "34"), and
> the text that comes before ".." (e.g. "test.
jim holtman wrote:
> Now take a look at what happens when you convert your dataframe to a matrix:
>
>
>> x <- as.matrix(mydf)
>> str(x)
>>
>
> It is a character matrix.
>
>
This is a bit confusing (but deliberate; as.matrix.data.frame explicitly
counts POSIXct as non-numeric):
>
Hello,
I'm having trouble getting the igraph package to load on Solaris. I
can get igraph to compile and install from a local directory without
issues using simply "R CMD INSTALL igraph", however "library(igraph)"
from within R gives the following errors:
Error in dyn.load(x, as.logical(local
Hi,
I noticed that R has a few bound-constrained nonlinear min and max solvers,
such as optim, nlm, etc. But I could not find a constrained min and max
solver that is not LP. Does this mean R do not have this capability? It is
hard to believe that R may not be as advanced as Excel in certain areas
when you do pkg_add -r R it should install R and you will not need to
run make. To invoke R, you just need to type R in your prompt. Here is
what I have on my FreeBSD:
FreeBSD 7.0-PRERELEASE (GENERIC2) #0: Sat Jan 5 21:27:47 CST 2008
Welcome to
%R
R version 2.6.0 (2007-10-03)
Copyright
Peter Dalgaard schrieb:
> Matthias Gondan wrote:
>
>> Dear R users,
>>
>> I noticed a problem in the anova command when applied on
>> a single coxph object if there are missing observations in
>> the data:
>>
...
>> In the documentation for anova.coxph, there is a warning that
>>
>>
66 matches
Mail list logo