fix on a data frame calls edit: see ?edit.data.frame. The help for
fix does say
Editing an \R object may change it in ways other than are obvious: see
the comment under \code{\link{edit}}.
The simple answer is not to use fix() or edit() on other than the data
frames they are documented t
John Sorkin wrote:
> Does anyone know a way that an function written in R can be called within a
> cell of an Excel spreadsheet. I would like to use the R function much as I
> use the native Excel functions, e.g. instead of using the excel function sum,
> =sum(A2,A6), I would like to use the fun
In a post on R-devel, Prof Ripley add the following comment
| > BTW, 1:dim(names)[1] is dangerous: it could be 1:0. That was the
| > motivation for seq_len.
I use the dim(names)[1] and dim(x)[2] along with length(x) with varying
levels of frustration depending on the object which I am trying to
fda 1.2.3
Version 1.2.3 of the fda package has just been released. This version adds to
previous versions a script to create most of the figures of chapter 6 of
"Applied Functional Data Analysis" by Ramsay and Silverman. Other changes
offer simpler calls to time warping /
Dear list members
Here is a strange problem that I have had for a long time, without
finding out how to solve it. Whenever I use fix() on a data.frame that
contains Dates, these are converted to numerics. As shown by the very
simple example:
a <- data.frame(var1 = 1, today = Sys.Date() )
a
fix(a)
Dear list members
Here is a strange problem that I have had for a long time, without
finding out how to solve it. Whenever I use fix() on a data.frame that
contains Dates, these are converted to numerics. As shown by the very
simple example:
a <- data.frame(var1 = 1, today = Sys.Date() )
a
fix
You are looking for RExcel, which does exactly that. Full documentation
and examples are included in the package.
http://sunsite.univie.ac.at/rcom/download/devel/
If you don't have R-2.6.1 yet, get the whole R system with
the RExcel installed
RAndFriendsSetup2061V1.82.exe
Otherwise, just get
See the R(D)COM Server (package "rcom") and RExcel from
http://sunsite.univie.ac.at/rcom/
Uwe Ligges
John Sorkin wrote:
> Does anyone know a way that an function written in R can be called within a
> cell of an Excel spreadsheet. I would like to use the R function much as I
> use the native E
>From: Nuno Prista <[EMAIL PROTECTED]>
>Date: 2007/12/07 Fri PM 03:10:01 CST
>To: [EMAIL PROTECTED]
>Subject: [R] Cannot insert label on top axis
see mtext by doing ?mtext.
>Hi,
>
>
>
>I am not being able to find code to insert a label on the top graphic, can
>anyone help?
>
>
>
>Thanks in adv
Hi,
I am not being able to find code to insert a label on the top graphic, can
anyone help?
Thanks in advance,
Nuno Prista
X<-1:10
plot(x, xlab="I can insert this label here but not on top axis")
axis(3)
[[alternative HTML version deleted]]
___
Does anyone know a way that an function written in R can be called within a
cell of an Excel spreadsheet. I would like to use the R function much as I use
the native Excel functions, e.g. instead of using the excel function sum,
=sum(A2,A6), I would like to use the function mysum written in R, e
Thanks - great, should have thought of option b)
-Original Message-
From: Martin Morgan [mailto:[EMAIL PROTECTED]
Sent: Friday, December 07, 2007 12:52 PM
To: alison waller
Cc: [EMAIL PROTECTED]
Subject: Re: [R] finding most highly transcribed genes - ranking, sorting
and subsets?
Hi Al
On 12/7/07, Aimin Yan <[EMAIL PROTECTED]> wrote:
> I try to make a xyplot like the following:
>
> xyplot(y1+y2~id|groups, ...)
>
> I also want to calculate cor(y1,y2) in each group, print it on each panel.
>
> Does anyone know how to write panel function for this?
This should work:
panel.cor <- f
See
?body
HTH,
Chuck
On Fri, 7 Dec 2007, piotr iksiński wrote:
I've complex problem and this's idealization of it:
v=1:10
fx<-function(x){
v[x]=v[x]*2}
fy<-function(y){
fx(y)}
for(i in 1:10){
fy(i)}
How to modife expresion (and only that):
{v[x]=v[x]^2}
to achive the redefin
I've complex problem and this's idealization of it:
v=1:10
fx<-function(x){
v[x]=v[x]*2}
fy<-function(y){
fx(y)}
for(i in 1:10){
fy(i)}
How to modife expresion (and only that):
{v[x]=v[x]^2}
to achive the redefinetion of the values of vector v, the result should
be: v=(1:10)*2. I think, that
I try to make a xyplot like the following:
xyplot(y1+y2~id|groups, ...)
I also want to calculate cor(y1,y2) in each group, print it on each panel.
Does anyone know how to write panel function for this?
Thanks,
Aimin
__
R-help@r-project.org mailing l
Look at package lme4.
If you have code set up for glme(), adapting it to glmmPQL in package MASS
will be rather easier, but if you are starting afresh I would suggest you
learn the lme4 syntax straight away.
On Fri, 7 Dec 2007, HAKAN DEMIRTAS wrote:
> Thanks for your reply. I am looking for an
The simplest way would be to have a flag, an indicator variable that
stores a value that indicates if a plot has been done before. Something
like this
plot (do my first plot here...)
is.plot=T
later in the code...
if (is.plot) {plot (do new plot here)} else {lines(add lines to the
previ
Use the same names (births, temp, ...) in each Rdata file and then load
each file into its own environment or proto object:
library(proto); x1951 <- proto() # or x1951 <- new.env()
load("1951.rda", envir = x1951)
Then pass the environment or proto object to each of your functions:
On 12/6/07, 정 태훈 <[EMAIL PROTECTED]> wrote:
> Hi, all;
>
> I got a reply for my previous several postings saying that I was
> spamming the r-help mailing list.
> I am very sorry to all subscribers if I did that.
> But I've been reposting my message to the mailing list several times
> because I didn
Hi, Roland
Thanks a lot for your help, I think it is very helpful. Actually the
function I am using in pamr is pamr.plotsurvival, which plots the
Kaplan-Meier plot, but I guess your suggestion should work for any type of
function, it's really a smart and simple idea, thanks!
Jack
On Dec 7, 2007
Hi Alison --
It's a funny twist of terminology, isn't it? high rank (we're #1!)
corresponds to low value. Maybe a wimpy stats joke? Anyway, (a) if m
is assigned rownames (e.g., from the appropriate column of the 'genes'
data frame in the limma object, rownames(m) <- maList$genes$GeneName)
they'll
> "TH" == Ted Harding <[EMAIL PROTECTED]>
> on Fri, 07 Dec 2007 10:41:02 - (GMT) writes:
TH> I have to express sympathy (with comments, below) with both
TH> these posters!
TH> On 07-Dec-07 07:40:30, Dieter Menne wrote:
>> ì_ íí gmail.com> writes:
>>> I go
Hi Jack,
Jack Luo wrote:
> Dear List,
>
> I am trying to modify the xlab and ylab for a current figure that was
> plotted by a package, I searched through the low level plotting command and
> they do not seem to contain how to do this (the only way is to use xlab,
> ylab as arguments in "plot" co
Hi,
Thanks for your reply. I am looking for an R package that has the same
functionality of the glme() function within the correlatedData library in
SPlus 6.2 or above. This generic function fits a generalized linear
mixed-effects model in the formulation described in Breslow and Clayton
(19
Read your file in without row names and check for duplicates:
DF <- read.table(myfile, skip = 1, header = FALSE)
myfile[duplicated(DF[[1]]), ] # list rows with duplicated column 1
On Dec 7, 2007 11:22 AM, Fan Yang <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to import a tab delimited file
I had the same problem one time. It was because I did a copy paste under
excel that is to say i put some data from an other file at the following of
the file, and R thought it was duplicate row.names. So i did two exports on
R and after i did a rbind... I don't know if you did a copy paste like i
Dear List,
I am trying to modify the xlab and ylab for a current figure that was
plotted by a package, I searched through the low level plotting command and
they do not seem to contain how to do this (the only way is to use xlab,
ylab as arguments in "plot" command, which I can not do since the pl
"Henrique Dallazuanna" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Try this:
>
> df <- data.frame(DMS=factor(rep(LETTERS[1:4], 10)),
> ITS=factor(rep(LETTERS[1:4], 10)))
> table(df)
> plot(table(df))
>
That gave me simply 10's on the diagonals of the table and the plot was
not very
Hi,
I am trying to import a tab delimited file (converted from .xls file) by
>Test<-read.table("/Users/txt", header=T, row.names=1)
The command has always worked for me, but now I have been getting the
error message saying that "duplicate 'row.names' are not allowed. I
have checked my o
Thanks so much Martin,
This method is definitely more straightforward. And you are right I don't
think I was doing anything wrong before. However, I thought that rank, would
rank the highest 1st, however after looking at the results using your
methods, I realized it ranks the lowest number 1. So
On Dec 7, 2007 4:28 AM, Roger Levy <[EMAIL PROTECTED]> wrote:
> I'm interested in writing a function that constructs a new plot on the
> current graphics device if no plot exists there yet, but adds lines to
> the existing plot if a plot is already there. How can I do this? It
> seems to me that
?make.names
Check out what R does with names that are not syntaxically correct.
On Dec 6, 2007 2:19 PM, mogra <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have a data file which has column names :
>
> a
> a,b
> a->b
>
> R converst a,b to a.b
> a->b to a..b
>
> Is there any way to handle this ?
>
> T
Dear list,
i have installed SQLiteDF (and SQlite 3.5.3 too)
After the suggested dataframe generation
iris.sdf <- sqlite.data.frame(iris)
i have close R and than restart it for verify the correct load of dataframe
:
the file data1 is saved in the usual folder .SQLiteDF
after the comm
Emmanuel,
Thanks for your reply. Please allow me to clarify. I am already extensively
using a RDBMS and to store the data, and have used SQL and ODBC to extract the
data into a set of R-files. (I have experimented with this a bit, and for my
specific application, storing the data in R see
While it may be true that for coxme models the "standard errors"
are not very good approximations, it is always useful to have them
to compare with other diagnostics such as likelihood ratios and
profile likelihoods. It is interesting to hear that with the currently
used methodology
"Computati
Can anyone tell me how to calculate quantiles of the studentized maximum
modulus distribution using R?
Thanks!
__
Rob Kabacoff, Ph.D.
www.statmethods.net
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing l
I think we need some actual sample code . Also by= 0
seems a bit funny.
--- qian z <[EMAIL PROTECTED]> wrote:
> I used merge() in a function, but it doesn't return
> correct data frame.
>
> add.name <- function(data, x)
>
> {
>
> ...
> ...
>
> newfile <- merge(data, res
I think that your first step should be to read the documentation of
whatever software you are using here (you didn't say).
You are getting iconv errors because you set an invalid encoding. You
haven't shown us all the steps you used, and in one of those not shown you
will find your error. If
Bin Yue wrote:
> Dear all:
>"predict.glm" provides an example to perform logistic regression when the
> response variable is a tow-columned matrix. I find some paradox about the
> degree of freedom .
> > summary(budworm.lg)
>
> Call:
> glm(formula = SF ~ sex * ldose, family = binomial)
>
>
First, 'subset' is an argument to glm(), but for some reason you did not
use it. Your subject line is quite misleading, and had it been the more
accurate
Adding a 'data' argument to glm messes up factors?
you might have realised the problem.
Second, your models are fitted to different
Check the cut() function.
b
On Dec 7, 2007, at 4:04 AM, "Sonia Mehault" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have a dataframe of say 20 lines with one line per individual. I
> want to group these 20 individuals
> by length class (eg. of 5cm) and get the mean value of all the other
> vari
Hi everyone,
I have a problem with running a glm using a subset of my data. Whenever I
choose a subset, in the summary the factors arent shown (as if the variable was
a continuous variable). If I dont use subsets then all the factors are shown. I
have copied the output from summary for both case
Hello
Since I changed my X11 settings to a Xinerama setup, calls to x11() result in
windows with a width half the size of the one specified by the corresponding
parameter. Furthermore, x axis labels are overlapping. Other devices (e.g.
pdf()), are not affected by these distortions.
Did anybody
Anyone knows how to plot the dendrogram generated by the hierarchical
clustering function hc from mclust package?
Xiaomeng Wan
Dalhousie University
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the post
Hi,
I have a data file which has column names :
a
a,b
a->b
R converst a,b to a.b
a->b to a..b
Is there any way to handle this ?
Thanks a lot.
--
View this message in context:
http://www.nabble.com/Read-File-%3A-Header-with-special-character-tf4958972.html#a14202399
Sent from the R he
HAKAN DEMIRTAS wrote:
> Hi,
>
> Is there an R library that has the same functionalities of Splus7.0+ library
> correlatedData?
If you mean an R *package* and tell us what functionalities are
available in "Splus7.0+ library correlatedData", we might be able to help.
Uwe Ligges
> I'd appreci
See:
https://stat.ethz.ch/pipermail/r-help/2007-May/132866.html
On Dec 7, 2007 3:32 AM, Rense Nieuwenhuis <[EMAIL PROTECTED]> wrote:
> Dear helpers,
>
> I've come up with what is probably a simple problem, but I cannot
> find the solution. I have a data-set containing survey-data from
> several c
On 07/12/2007 12:26 AM, Henrik Bengtsson wrote:
> On 06/12/2007, Loren Engrav <[EMAIL PROTECTED]> wrote:
>> As for news readers
>> I found R and R.mac and R.Bio on the sites you recommend, thank you very
>> much, they would avoid the individual emails, but then I would have to go
>> look at them, w
On Fri, 7 Dec 2007, Roger Levy wrote:
> I'm interested in writing a function that constructs a new plot on the
> current graphics device if no plot exists there yet, but adds lines to
> the existing plot if a plot is already there. How can I do this? It
> seems to me that the exists() function m
Folks,
I have a list of correlation matrices of equities, say, and I need to
manipulate each matrix: I weight each equity by its median absolute
correlation against all the other equities, such that the equity with the
least such correlation gets the highest weight. Something like min(over
all
Phil taylor wrote:
> Hi all
>
> I am trying to perform the follwing:
>
> fit<-pvclust(wq, method.hclust="ward", method.dist="euclidean")
What is wq? Which version of R? WHich version of the pvclust package (I
guess we are talking about that one?)? We also need a reproducible
example, as the
I have to express sympathy (with comments, below) with both
these posters!
On 07-Dec-07 07:40:30, Dieter Menne wrote:
> ì_ íí gmail.com> writes:
>> I got a reply for my previous several postings saying that
>> I was spamming the r-help mailing list.
>> I am very sorry to all subscribers if I
Try this:
if(length(dev.list()) == 0) plot(rnorm(100), type="l") else (lines(rnorm(100)))
On 07/12/2007, Roger Levy <[EMAIL PROTECTED]> wrote:
> I'm interested in writing a function that constructs a new plot on the
> current graphics device if no plot exists there yet, but adds lines to
> the e
I'm interested in writing a function that constructs a new plot on the
current graphics device if no plot exists there yet, but adds lines to
the existing plot if a plot is already there. How can I do this? It
seems to me that the exists() function might be co-opted to do this, but
it's not obvio
Hi
[EMAIL PROTECTED] napsal dne 07.12.2007 10:04:35:
> Hello,
>
> I have a dataframe of say 20 lines with one line per individual. I want
to
> group these 20 individuals
> by length class (eg. of 5cm) and get the mean value of all the other
variables
> (eg VarA and VarB) for each length class
Try this:
Length <- 10:30
VarA <- seq(1000,1200,10)
VarB <- seq(500,700,10)
Data <- cbind(Length,VarA,VarB)
# create a factor of desired Length classes and aggregate
classLength=cut(Length,c(10,15,20,25,30),include.lowest=TRUE)
aggregate(cbind(VarA,VarB),by=list(LengthClass=classLength),FUN=me
Try this:
Vec <- cut(Data[,1], breaks=c(10,15,20,25,30), include=T, right=F)
Data <- data.frame(Data, Vec)
aggregate(Data[,2:3], list(Data$Vec), mean)
On 07/12/2007, Sonia Mehault <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have a dataframe of say 20 lines with one line per individual. I want to
Sonia Mehault pisze:
> Hello,
>
> I have a dataframe of say 20 lines with one line per individual. I want to
> group these 20 individuals
> by length class (eg. of 5cm) and get the mean value of all the other
> variables (eg VarA and VarB) for each length class
>
> My dataframe is as follow:
>
>
What about ?by, something like this (still untested):
model.per.country <- by( data, data$COUNTRY, function (x) {
glm(dependent.var ~ FEMALE + AGE + EDUCLIN, family = binomial, data = x)
})
Or
model.per.country <- by( data, data$COUNTRY,
glm , dependent.var ~ FEMALE + AGE + EDUCLIN, famil
David Rees wrote:
> ...
> What I need is the following
>
> - One graph
> - y1, y2, y3 plotted as seperate lines vs x
> - z1, z2 give the range of the value of z, and need to be plotted as error
> bars or confidence intervals vs x
>
This doesn't look right to me, but it might give you a start:
try something like this (untested):
dataCountry <- split(data, data$COUNTRY)
model.per.country <- lapply(dataCountry, function (x) {
glm(dependent.var ~ FEMALE + AGE + EDUCLIN, family = binomial,
data = x)
})
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatis
Hello,
I have a dataframe of say 20 lines with one line per individual. I want to
group these 20 individuals
by length class (eg. of 5cm) and get the mean value of all the other variables
(eg VarA and VarB) for each length class
My dataframe is as follow:
Length <- 10:30
VarA <- seq(1000,1200,
Dear helpers,
I've come up with what is probably a simple problem, but I cannot
find the solution. I have a data-set containing survey-data from
several countries. What I want to do is to perform some regression
analyses, for each country separately. The question is, how to do
this nicely
You could use sample eg.
> sample(1:10,5,replace=T)
[1] 1 5 4 6 3
but there may be a more approriate function.
On Dec 7, 2007 8:59 AM, kexinz <[EMAIL PROTECTED]> wrote:
>
> I'm a beginner of R.
> I can use runif() to generate uniformly distributed numbers, but I don't
> know which function
I'm a beginner of R.
I can use runif() to generate uniformly distributed numbers, but I don't
know which function can generate uniformly distributed random integers, or
what kind of method?
Thanks!
--
View this message in context:
http://www.nabble.com/how-to-generate-uniformly-distrib
66 matches
Mail list logo