Hi
>
> I did save workspace and when I load it, I can see the variables,
> using ls().
> But I cannot see the commands from the program I saved. How to do
> that?
Perhaps you can check .Rhistory file.
Regards
Petr
>
> __
> R-help@r-project.org maili
Hi Eduardo
in the preamble put
\usepackage[figureright]{rotating}
see manual for figureright if you do not like it
and then some graphics with options where needed
\begin{sidewaysfigure}
\centering
\includegraphics[width=,%
clip=true,%
trim=0in 0in 0in 0in,%
Dear all
Last week, I posted a question and some of you spent their valuable time to
respond. Thank you (once again). This time, after doing a lot of homework, I
return with a second question on the issue.
I was advised to use poLCA for a Latent Class Analysis with covariates. The
software w
Hi:
Here's one approach:
a=matrix(1:50,nrow=10)
a2=floor(jitter(a,amount=50))
# Write a function to combine the columns of interest
# into a data frame and fit a linear model
regfn <- function(k) {
rdf <- data.frame(x = a[k, ], y = a2[k, ])
lm(y ~ x, data = rdf)
}
# Use lapply() to
Hello, I'm trying to generate a sine wave in R to fit my observations using
the general formula:
y=a*sin(b[x+h*pi)]+k
where a = amplitude, b=period, h=phase shift, and k=vertical shift
I want to use following translation to bring the sine function up onto the
y-axis to range from 0-1, and this w
For pete's sake, I knew that. I apologize for wasting everyone's time. I tell
ya, this has been an off week for me.
Thank you for your kind responses.
On Aug 4, 2011, at 9:35 PM, Rolf Turner wrote:
>
> Note that ***histogram()*** (as opposed to "hist()") is a function from the
> "lattice" pack
You clearly have some strange ... err, whatever.
--- On Thu, 8/4/11, Ted Harding wrote:
> From: Ted Harding
> Subject: [R] Not really off-topic ...
> To: r-h...@stat.math.ethz.ch
> Received: Thursday, August 4, 2011, 8:44 PM
> Greetings all!
> Just arrived via my daily digest of the ALLSTAT li
Hi,
When a function returns a SEXP of type LGLSXP (logical) to signal whether
it succeeded or failed, how is it intrepreted? Is it like C where SUCCESS
= 0 or other value?
Thanks.
--
Alexandre
--
Alexandre Santos Aguiar, MD, SCT
signature.asc
Description: This is a digitally signed mess
You can study this yourself using the System.time() utility: just write
System.time() around any block of code and R will time it for you.
Offhand, I'd guess example2 may be ever so slightly quicker since it doesn't
have to create colA and colB, but not to a degree that would be noticeable
for rea
Yes, the stats package has a lag function, but it's not really appropriate
for the sample data Dimitri gave us: to wit, it's not of "ts" (time series)
class so lag doesn't know what to do with it and gives an error message.
Perhaps it's just that I never really took the time to get used to it, but
Note that ***histogram()*** (as opposed to "hist()") is a function from the
"lattice" package. So at some stage you must have issued the command
"require(lattice)" or equivalently "library(lattice)". (So your ``exact
code''
is a little misleading.)
You are thus getting bitten by the fact that
Greetings all,
I am curious to know if either of these two sets of code is more efficient?
Example1:
## t-test ##
colA <- temp [ , j ]
colB <- temp [ , k ]
ttr <- t.test ( colA, colB, var.equal=TRUE)
tt_pvalue [ i ] <- ttr$p.value
or
Example2:
tt_pvalue [ i ] <- t.test ( temp[ , j ], temp[ , k ]
Save the result of histogram(), then print() the saved object.
On Aug 4, 2011 5:13 PM, "Mark Ebbert" wrote:
Dear R Gurus,
I'm seeing some strange behavior that I can't explain. I'm generating a
figure for a paper and I like to save the script (no matter how simple) for
future reference. My prac
On 11-08-04 5:24 PM, Mark Ebbert wrote:
Dear R Gurus,
I'm seeing some strange behavior that I can't explain. I'm generating a figure
for a paper and I like to save the script (no matter how simple) for future
reference. My practice is to write the script and run it using the 'source()'
functi
Greetings all!
Just arrived via my daily digest of the ALLSTAT list
is the following:
http://www.youtube.com/StatisticalSongs#p/u/4/JEYLfIVvR9I
If you watch/listen, you will see/hear that it is not
at all off-topic.
And now to bed, before my correspondence is analysed.
Best wishes,
Ted.
--
I'm on my phone so I can't verify this but have you tried the apply function?
apply(attri,2,Moran.I,Locate.dists.inv,NA.rm=T)
Michael Weylandt
On Aug 4, 2011, at 4:54 PM, Scott Seely wrote:
> Dear R users,
>
> I have two data frames that consist of statistical information for most
> countries
Your function only works for the first dimensions (e.g. indices
indicating the positions in the first two dimensions in datacube), correct?
Otherwise it looks very handy! And certainly more elegent than my
function monster!
Jannis
On 08/04/2011 09:58 PM, R. Michael Weylandt wrote:
Hi Jannis
Dear R users,
I have two data frames that consist of statistical information for most
countries around the world. One dataframe consists of the latitude and
longitude ("coord.csv") of each country, while the other consists of 100's
of different attributes ("countryattri.csv") for each country (lik
Dear R Gurus,
I'm seeing some strange behavior that I can't explain. I'm generating a figure
for a paper and I like to save the script (no matter how simple) for future
reference. My practice is to write the script and run it using the 'source()'
function. What's weird is that the resultant fig
Hey all,
Correct me if I'm wrong but, the 'stats' package has a lag() function
like so
lagged.series=lag(series,number of lags wanted)
Furthermore, I am pretty sure that lag( ) accepts negative lags:=>
leads.
lag(x,1)=> object of one lag, lag(x,-1) object with one
lead
The apply function also works with multi-dimensional arrays, I think
this is what you want to achieve using a 3d array:
aaa <- array(NA, dim = c(2, dim(a)))
aaa[1,,] <- a
aaa[2,,] <- a2
apply(aaa, 3, function(x)lm(x[1,]~x[2,]))
__
R-help@r-project.org m
On Fri, Aug 5, 2011 at 12:02 AM, Marc Schwartz wrote:
>> Can the x matrix in the glmnet() function of glmnet package be a
>> data.frame with numeric columns and factor columns? I am asking this
>> because I have a model with both numeric and categorical predictors,
>> which I would like to study w
On Aug 4, 2011, at 5:41 PM, Paul Smith wrote:
> Dear All,
>
> Can the x matrix in the glmnet() function of glmnet package be a
> data.frame with numeric columns and factor columns? I am asking this
> because I have a model with both numeric and categorical predictors,
> which I would like to stud
Dear All,
Can the x matrix in the glmnet() function of glmnet package be a
data.frame with numeric columns and factor columns? I am asking this
because I have a model with both numeric and categorical predictors,
which I would like to study with glmnet. I have already tried to use a
data.frame, bu
On Thu, Aug 4, 2011 at 9:35 PM, Marc Schwartz wrote:
>> Suppose that you are trying to create a binary logistic model by
>> trying different combinations of predictors. Has R got an automatic
>> way of doing this, i.e., is there some way of automatically generating
>> different tentative models an
As currently implemented it works for both "Location" and "Destination" (I
really should think of some better variable names) of any dimensionality,
but it does assume that if say, you give a 2d location, those correspond to
the first two dimensions of destination.
But if you give 1d or 3d, e.g.,
> This seems to work:
>
> apply(mat1,1,function(x){paste(x,collapse="")})
>
> The collapse command inside of paste is (I think) the easiest way to
> combine strings.
>
> Michael Weylandt
>
>
> On Thu, Aug 4, 2011 at 5:45 PM, Wegan, Michael (DNRE) > wrote:
>
>> I have a matrix of 5 columns and 64 r
Dear Peter,
Thanks very much for the references. It seems the method is based on parametric
proportional hazard models by incorporating cubic spline of the baseline
hazards, not sure if tweaking survreg() would do?
Best,
John
- Original Message -
From: Peter Jepsen
To: 'array chip'
I have a matrix of 5 columns and 64 rows, let's call it "mat1". All values are
1 or 0. I need to take the values of the elements by row and create a single
numeric element that can be placed its respective slot in a 64-element list,
named "list1". For example, mat1[11,1:5] = 0,1,1,0,1 and I m
Hi there,
Does anyone know if there is a package in R for multi-demensional
Gaussian quadrature? I checked out the package "gaussquad" but it can
only do 1D. Thanks!
Lei Liu
Associate Professor
Division of Biostatistics
Department of Public Health Sciences
University of Virginia School of Med
I hope someone experience with plyr package comes and helps because this
sounds like what it does well, but for your specific example something like
this works:
A = rbind(a,a2)
q = apply(A,2,function(x) {lm(x[1:nrow(a)] ~ x[-(1:nrow(a))])})
but yeah, that's pretty rough so I hope someone can come
Hi all, the reference for this method was:
“Flexible parametric proportional-hazards and proportional-odds models for
censored survival data, with application to prognostic modeling and estimation
of treatment effects” published in Stat Med (2002) 21: 2175
The abstract is:
Modelling of censo
I realize this should be simple, but even after reading over the several
help pages several times, I still cannot decide between the myriad "apply"
functions to address it. I simply want to apply a function to all the rows
(or columns) of the same index from two (or more) identically sized arrays
This function you wrote is interesting, but I almost missed it since I
didn't see a direct example!
cubeValues(NULL, data, indices)
cubeValues(1, data, indices)
cubeValues(c(1,2), data, indices)
(sorry if I'm beating a dead horse here)
On Thu, Aug 4, 2011 at 2:58 PM, R. Michael Weylandt <
michae
Hi,
Does anyone know of a package that implements Multi-task SVM in R? I found
one in Matlab :
http://www.ece.umn.edu/users/cherkass/predictive_learning/Resources/MTL_Software_Description.pdf
I was wondering if there is something similar in R?
Thank you for your help.
Sincerely,
Vishal
On Aug 4, 2011, at 2:03 PM, Paul Miller wrote:
>
> Hello everyone,
>
> I need to do a sample size calculation. The study two arms and two endpoints.
> The two arms are two different cancer drugs and the two endpoints reflect
> efficacy (based on progression free survival) and toxicity.
>
> U
Check out ?savehistory in utils.
Also, I think most GUI's do this - I can certainly attest that RStudio does
Michael Weylandt
On Thu, Aug 4, 2011 at 11:55 AM, Bogdan Lataianu wrote:
> I did save workspace and when I load it, I can see the variables,
> using ls().
> But I cannot see the commands
(I was just about to send this before your last reply)
As a more general tip, I find that using %in% is easier to understand than
"is.element" and "setdiff" because it can be more universal, especially when
combined with "all" and the "!".
To me the functions like setdiff are easier to read, but h
Hello,
I am running randomForest models on a number of species. I would like to be
able to automate the printing of dependence plots for the most important
variables in each model, but I am unable to figure out how to enter the
variable names into my code. I had originally thought to extract the
Dear All,
I am trying to add some text annotation to a graph using matplot() as
follows:
vars <- c("v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v8", "v10")
id <- seq(5.000, 0.001, by = -0.001)
sid <- c(4.997, 3.901, 2.339, 0.176, 0.151, 0.101, 0.076, 0.051, 0.026,
0.001)
rn <- sample
Thanks, Gene, for your hint! I indeed did not check any possible
situation and my function was not returning what I intened it to return.
This updated version, however, should. I am sure there are much easier
ways (or ready made functions) to do the same.
ind.datacube = function(
##title<< c
On Aug 4, 2011, at 2:23 PM, Paul Smith wrote:
> Dear All,
>
> Suppose that you are trying to create a binary logistic model by
> trying different combinations of predictors. Has R got an automatic
> way of doing this, i.e., is there some way of automatically generating
> different tentative model
On 04/08/2011 12:03 PM, Vijayan Padmanabhan wrote:
Hi
I am looking at generating a random dataset of say 100 values fitting in a
normal distribution of a given mean and SD, I am aware of rnorm
function. However i am trying to build into this function one added
constraint that all the random value
Thanks a lot for the recommendations - some of them I am implementing already.
Just a clarification:
the only reason I try to compare things to SPSS is that I am the only
person in my office using R. Whenever I work on an R code my goal is
not just to make it work, but also to "boast" to the SPSS
Hi
I am looking at generating a random dataset of say 100 values fitting in a
normal distribution of a given mean and SD, I am aware of rnorm
function. However i am trying to build into this function one added
constraint that all the random value generated should also obey the
constraint that they
Wonderful! Thanks, Jeremy.
Is bestglm() also able of trying nonlinear transformations of the
variables, say log(X1) for instance?
Paul
On Thu, Aug 4, 2011 at 8:28 PM, Jeremy Miles wrote:
>
> Sounds like you want a best subsets regression, the bestglm() function,
> found in the bestglm() packa
I am using SRC function in the sensitivity library. The independent
variables (X) are a few dummy variables and the dependent variable (y)
is numeric, ranged from 0,18 to 0.84. Example of independent variables
are red coded as [0,0,0,1], green [0,0,1,0], blue [0,1,0,0], and
yellow [1,0,0,0]. Error
I did save workspace and when I load it, I can see the variables,
using ls().
But I cannot see the commands from the program I saved. How to do
that?
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the pos
On Aug 4, 2011, at 2:40 PM, Eduardo M. A. M. Mendes wrote:
> Dear R-users
>
> I am trying to understand how Sweave works by running some simple examples.
> In the example I am working with there is a chunk where the R-commands
> related to plotting a figure are placed. When running R CMD Swe
David and Josh,
Thank you for the suggestions. I have attached a file ('q_values.txt') that
contains the values of the 'Q' variable.
David -- I am attempting an 'S' mode PCA, where the columns are actually the
cases (different stream gaging stations) and the rows are the variables (the
maximum f
Dear John
I am not aware of an R package that does this, but I believe that Patrick
Royston's -stpm- function for Stata does. Here's two references found in
http://www.stata-journal.com/sjpdf.html?articlenum=st0001_2:
Royston, P. 2001. Flexible parametric alternatives to the Cox model. Stata
J
Hi,
I am looking for the equivalent of capture.output for stdin. Imagine I am
writing a test for a function that reads from stdin, say scan.
>1: foobar
2: Read 1 item
[1] "foobar"
(please don't reply that scan can also read from a file, that's not what I
am trying to test; let's say I found a bug
On 04/08/2011 3:40 PM, Eduardo M. A. M. Mendes wrote:
Dear R-users
I am trying to understand how Sweave works by running some simple examples. In
the example I am working with there is a chunk where the R-commands related to
plotting a figure are placed. When running R CMD Sweave … , pdflate
On Aug 4, 2011, at 11:46, Dimitri Liakhovitski
wrote:
> Thanks a lot, guys!
> It's really helpful. But - to be objective- it's still quite a few
> lines longer than in SPSS.
Not once you've sources the function! For the simple case of a vector, try:
X <- 1:10
mylag2 <- function(X, lag) {
Hi Jannis,
Like Gene, I'm not entirely sure what your code is intended to do, but it
wasn't hard to adapt mine to at least print out the desired slice through
the higher-dimensional array:
cubeValues <- function(Insert, Destination, Location) {
Location = as.matrix(Location)
Location = ar
Dear R-users
I am trying to understand how Sweave works by running some simple examples. In
the example I am working with there is a chunk where the R-commands related to
plotting a figure are placed. When running R CMD Sweave … , pdflatex the
output is a portrait figure. I wonder whether it
Sounds like you want a best subsets regression, the bestglm() function,
found in the bestglm() package will do the trick.
Jeremy
On 4 August 2011 12:23, Paul Smith wrote:
> Dear All,
>
> Suppose that you are trying to create a binary logistic model by
> trying different combinations of predicto
Marc,
Try this one
barchart(data=dta, ~x, group=y,
stack=T,col=sort(brewer.pal(7,"Purples")), xlab="Percent",
box.width=.5, scales=list(tick.number=10),
panel=function(x,y,...){
panel.barchart(x,y,...)
panel.text(cumsum(x)-dta$x/2,y,labels=dta$x)
panel.text(cumsum(x)-dta$x/2,1.3,labels=as.charact
Dear All,
Suppose that you are trying to create a binary logistic model by
trying different combinations of predictors. Has R got an automatic
way of doing this, i.e., is there some way of automatically generating
different tentative models and checking their corresponding AIC value?
If so, could
> -Original Message-
> From: Dimitri Liakhovitski [mailto:dimitri.liakhovit...@gmail.com]
> Sent: Thursday, August 04, 2011 11:47 AM
> To: Daniel Nordlund; r-help
> Subject: Re: [R] Efficient way of creating a shifted (lagged) variable?
>
> Thanks a lot, guys!
> It's really helpful. But
I'm just wondering
When I use your function on your data I get a result that is not very
intuitive. Is this what you were trying to do?
(I took the liberty of setting dims to 3 since 'auto', 1, and 2 didn't
work.
> data<- array(rnorm(64),dim=c(4,4,4))
> indices<- matrix(FALSE,nc
Hello everyone,
I need to do a sample size calculation. The study two arms and two endpoints.
The two arms are two different cancer drugs and the two endpoints reflect
efficacy (based on progression free survival) and toxicity.
Until now, I have been trying to understand this in terms of a on
But quite a few thousand dollars cheaper - seems a fair trade to me!
Seriously though: your last few requests have been focused on time objects,
so I strongly suggest you take a look at xts/zoo (
http://cran.r-project.org/web/packages/xts/index.html) -- it will make time
objects much easier for yo
Thanks a lot, guys!
It's really helpful. But - to be objective- it's still quite a few
lines longer than in SPSS.
Dimitri
On Thu, Aug 4, 2011 at 2:36 PM, Daniel Nordlund wrote:
>
>
>> -Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
>> On Beha
Hi, I was reading a paper published in JCO "Prediction of risk of distant
recurrence using 21-gene recurrence score in node-negative and node-positive
postmenopausal patients with breast cancer treated with anastrozole or
tamoxifen: a TransATAC study" (ICO 2010 28: 1829). The author uses a metho
Michael, thanks a lot!
Really appreciate it - what wasn't hard for you would be for me!
Dimitri
On Thu, Aug 4, 2011 at 2:20 PM, R. Michael Weylandt
wrote:
> You are getting 105 because the default behavior of findInterval is such
> that v[N+1] := + Inf (as noted in ? findInterval); that is, the
You are getting 105 because the default behavior of findInterval is such
that v[N+1] := + Inf (as noted in ? findInterval); that is, the last
interval is actually taken to stretch from the final element of sbwl.dates
unto eternity. It shouldn't be hard to write a catch line to set that to
whatever
More than happy to help.
I think the term is "sparse" matrix.
I haven't totally wrapped my mind around why your version seems to work (and
testing it, it does seem to work for non-sparse matrices as well), but
still, if it makes sense to you, why bother with adding one to the sum and
the if state
Dear all,
I used modFit of the package FME to fit a set of ODE to a ste of
experimental data.
The summary of this fit give me the following error
> summary(Fit)
Residual standard error: 984.1 on 452 degrees of freedom
Error in cov2cor(x$cov.unscaled) : 'V' is not a square numeric matrix
In add
If you start looking at the time series classes (xts, zoo, etc) they have
very quick and flexible lag functions built in.
Might this be a slightly more efficient solution for the homebrew
implementation?
OurLag <- function(y, k=1) {
t = y[,1,drop=F]; d = y[,-1,drop=F];
if (is.matrix(y)) {
Hi, all,
I'm trying to modify the code to a log scale for y-axis from the post
http://tolstoy.newcastle.edu.au/R/help/06/06/28612.html
However, the error bar did not change accordingly. The following is the code I
used based on the singer.ucl data.
Thanks in advance!
prepanel.ci <- function(x,
Hello!
I have a data set:
set.seed(123)
y<-data.frame(week=seq(as.Date("2010-01-03"), as.Date("2011-01-31"),by="week"))
y$var1<-c(1,2,3,round(rnorm(54),1))
y$var2<-c(10,20,30,round(rnorm(54),1))
# All I need is to create lagged variables for var1 and var2. I looked
around a bit and found several
Dear all,
I used modFit of the package FME to fit a set of ODE to a ste of eperiemntal
data.
The summary of this fit give me the following error
> summary(Fit)
Residual standard error: 984.1 on 452 degrees of freedom
Error in cov2cor(x$cov.unscaled) : 'V' is not a square numeric matrix
In addit
Thank you, Martin.
Yes, on my computer (48Gb memory) it also gives a message "caught
segfault" as you got. So it is because the matrix size is too large.
I apologize for the offence I've caused.
2011/8/4 Martin Maechler :
>> C6H5NO2
>> on Thu, 4 Aug 2011 16:03:54 +0800 writes:
>
>
It's not immediately obvious
You need to look at coord_cartesian() and its ylim argument.
Best, t
Sent from my iPhone
On 4 Aug 2011, at 02:38 PM, Christopher Desjardins
wrote:
> Hi,
> I am using ggplot2 to with the following code:
>
> gmathk2 <-
> qplot(time,math,colour=Kids,data=kids.ach.
On 08/04/2011 08:53 AM, Belmont, John W wrote:
I am trying to correct for the effect of 2 covariates in a gene
expression data set.
design<-model.matrix(~0 + Factor + cov1 + cov2)
QUESTION: How to set up the contrast matrix?
The usual commands
fit <- lmFit(selDataMatrix, design)
cont.matrix
Thanks!
I found (by properly reading docs) to use the inputenc package. The Rd
package solve most problems except for where I has a multiple line
code element in my Rd file. I tried to convert it to a LaTeX Rd 'code'
element and use an 'alltt' environment to hold the multi-line text. I
worked arou
Hi all,
After reading this interesting discussion I delved a bit deeper into the
subject matter. The following snippet of code (see the end of my mail)
compares three ways of performing this task, using ddply, ave and one
yet unmentioned option: data.table (a package). The piece of code
generates
Best I know, they are effectively the same** within R but I prefer "[" for a
couple of reasons.
1) "[" works for all data types, while $ is sometimes picky: e.g.,
x = matrix(rnorm(9),3); colnames(x) <- c("a","b","c")
x.df = as.data.frame(x)
x$a gives "Error in x$a : $ operator is invalid for atom
Dear list,
I would like to plot several age distributions that are influenced by a factor
(called group in the data example below). I would like to use historam() in the
lattice package, but I can't figure out how to set up the data. Could someone
give me a hint how to do it for the example b
Worked like a charm!
Thanks a lot Jean V Adams
--
View this message in context:
http://r.789695.n4.nabble.com/R-loop-problem-tp3718449p3718670.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://s
Hi,
I am using ggplot2 to with the following code:
gmathk2 <-
qplot(time,math,colour=Kids,data=kids.ach.lm.k5,geom="smooth",method="lm",formula=y~ns(x,1))
+ opts(title="Smoother Plot: Math K-5") + xlab("Time") + ylab("Math") +
scale_colour_brewer(pal="Set1"); gmathk2
This plots all the smoother f
I'm not Josh Wiley, but I think I can answer this:
When dealing with lists, its often more convenient to use "[[" instead of
"[" because "[" returns a single element list while "[[" returns the list
element itself. (i.e., if I set x = list(Q = rnorm(64), V =
matrix(rnorm(64),8)) then x["Q"] is a l
Hi John,
The limma package is part of Bioconductor, so you should be asking this
question on the BioC listserv rather than
R-help.
In addition, please see the posting guide. The example you give is not
self-contained, and the term 'does not work' is so unspecific as to be
useless.
On 8/4
Sorry for renewing the topoic. I thought it worked but now I've run
into a little problem:
# My data frame with dates for week starts (Mondays)
y<-data.frame(week=seq(as.Date("2009-12-28"),
as.Date("2011-12-26"),by="week") )
# I have a vector of super bowl dates (including the future one for 201
Hi
r-help-boun...@r-project.org napsal dne 04.08.2011 14:56:09:
> a217
> Odeslal: r-help-boun...@r-project.org
>
> 04.08.2011 14:56
>
> Komu
>
> r-help@r-project.org
>
> Kopie
>
> Předmět
>
> [R] Counting rows given conditional
>
> Hello,
>
> I have an input file that contains multiple
> C6H5NO2
> on Thu, 4 Aug 2011 16:03:54 +0800 writes:
> Thank you very much, Josh!
> As you suggested, I will contact the developers of "Matrix".
> PS, C6 are just initial characters of my email account :-)
> Best wishes,
> C6
well, as the posting guide (http:/
Hello,
I have an input file that contains multiple columns, but the column I'm
concerned about looks like:
"TR"
5
0
4
1
0
2
0
To count all of the rows in the column I know how to do NROW(x$TR) which
gives 7.
However, I would also like to count only the number of rows with values >=1
(i.e. not 0
I am trying to correct for the effect of 2 covariates in a gene expression data
set.
design<-model.matrix(~0 + Factor + cov1 + cov2)
QUESTION:
How to set up the contrast matrix?
The usual commands
fit <- lmFit(selDataMatrix, design)
cont.matrix <- makeContrasts(FacCont=Group1-Group2, level
On 11-08-04 8:20 AM, Martin Maechler wrote:
Duncan Murdoch
on Tue, 2 Aug 2011 16:51:38 -0400 writes:
> On 11-08-02 2:39 PM, wwreith wrote:
>> Does anyone know how to create a 3D Bargraph using
>> ggplot2/qplot. I don't mean 3D as in x,y,z coordinates. Just a
>> 2D b
Try this:
q <- z[match(p, y)]
Jean
`·.,, ><(((º> `·.,, ><(((º> `·.,, ><(((º>
Jean V. Adams
Statistician
U.S. Geological Survey
Great Lakes Science Center
223 East Steinfest Road
Antigo, WI 54409 USA
715-627-4317, ext. 3125 (Office)
715-216-8014 (Cell)
715-623-6773 (FAX)
http://www.g
On 11-08-04 1:42 AM, Michael O'Keeffe wrote:
Hi,
I've written a package and converted my Rd files into LaTeX using
Rdconv. When I copy and paste these files in to my Sweave document I
get the error message when compiling the Sweave file:
! Undefined control sequence.
l.32 \inputencoding
Rosario,
I don't think persp() is the function you need.
You may find that the maps in R's historical world map would work for you.
In that case you can try something like this (an example mapping France
and Germany):
require(maps)
map("world", c("France", "Germany"), xlim=c(-6.61, 17.21), yl
Hi Rosario,
you might have a look at the "maps" and "maptools" (for reading
shape-files) packages.
#e.g.
library(maps)
map("world",c("sweden","germany"))
Cheers
Am 04.08.2011 02:58, schrieb Rosario Garcia Gil:
> Hello
>
> I am trying to draw a basic black and white map of two European countri
> Duncan Murdoch
> on Tue, 2 Aug 2011 16:51:38 -0400 writes:
> On 11-08-02 2:39 PM, wwreith wrote:
>> Does anyone know how to create a 3D Bargraph using
>> ggplot2/qplot. I don't mean 3D as in x,y,z coordinates. Just a
>> 2D bar graph with a 3D shaped bard. See attach
A subset of actual data and what you would expect as a result would be
very helpful. All you say is that p.q are vectors, but it would
appear that they are character vectors, but the content is unknown.
Also will the expression "q[i==p]<-z[i==y]" have the same length on
each side; the vectors app
Dear R-Users,
I am using R for years now but recently I encounter a problem with the
pdf-size of graphics generated with sweave. However, I am new in this forum.
Hence, please don't hesitate if I am wrong here.
I use a script which runs perfectly in R 2.11.1 and the pdf-size of the
graphs is abou
The Centre for Multilevel Modelling is very pleased to announce the
addition of R practicals to our free on-line multilevel modelling course.
These give detailed instructions of how to carry out a range of analyses
in R, starting from multiple regression and progressing through to
multilevel m
Hi Joshua,
Really helpful that you posted so many useful solutions for my problem.
I can understand all your codes except these:
*[code]
lapply(lst, `[[`, "y")
## or if you are only retrieving a single value
sapply(lst, `[[`, "y")
[/code]*
Can you explain these a little bit? What does '[[' mean
Many thanks, Greg. It works like a dream.
Best wishes,
Pete
From: Greg Snow
To: Peter Morgan , "r-help@r-project.org"
Date: 03/08/2011 19:06
Subject:Re: [R] Coefficient names when using lm() with contrasts
Sent by:r-help-boun...@r-project.org
If you add column nam
1 - 100 of 123 matches
Mail list logo