Hi
I think the following will help:
#Load some packages
library(lattice)
library(reshape)
#Sample data
dataset.frame
-
data.frame(id=c(a,b,c,a,c,b,a),colour=c(blue,green,red,red,red,green,green))
# calculate the counts
dataset.table - table(dataset.frame)
#and reshape the table
dataset.melt -
Hi Phil
Try the following
which(names(iris)=='Species')
[1] 5
HTH
Schalk Heunis
On Mon, Oct 12, 2009 at 8:53 AM, tdm ph...@philbrierley.com wrote:
Hi,
How do I access the index number of a field given I only know the field
name?
eg - I want to set the probability of the field 'species
This may be of some help:?try
On Mon, Oct 12, 2009 at 9:42 AM, Arif Chandra arif.chan...@hotmail.comwrote:
Hi R-users,
I would like to ask question related to error output.
If an error comments come out, then the program will automatically stop.
I want to ask , how I can still continue the
Tobias
The grangertest function in the lmtest package might be simpler for your
application.
Regards
Schalk Heunis
On Mon, Nov 16, 2009 at 5:31 PM, tobiasfa tobias.farnly...@gmail.comwrote:
Hi useRs..
I cant figure out how to test for causality using causality() in vars
package
I have
For normality check out: ?shapiro.test
HTH!
Schalk
On Tue, Jan 5, 2010 at 5:32 AM, Haiyang AI aihaiy...@gmail.com wrote:
Dear all,
I'm a beginner of R and I need to carry out some three-way mixed ANOVAs.
Following examples at http://personality-project.org/r/r.anova.html, I
managed to get
Hi
You can use the reshape package to achieve this. If you don't have it
installed, install.packages('reshape'). Then look at ?cast and (possibly)
?melt
HTH!
Schalk
On Tue, Jan 5, 2010 at 7:59 AM, Noli Sicad nsi...@gmail.com wrote:
Hi,
I need to transpose and aggregate the 4th and 5th
is the relationship (if any) between the heatmap function in R
and this technique? Is there an alternative function to use?
Thanks for the help!
Schalk Heunis
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
Levi
Thanks for the reply, do you know of any function or package that does
contain an implementation of two-way joining? I looked at the biclust
package which implements several other (more modern?) bi-clustering
techniques, but could not find two-way joining.
Schalk Heunis
On Mon, Aug 31
))
eval(parse(text = paste(anova(,myParStr,
I would have expected do.call(anova, myModels) to work
Hope this helps
Schalk Heunis
On Sat, Sep 5, 2009 at 10:43 PM, Jeroen Oomsj.c.l.o...@uu.nl wrote:
2009/9/5 Henrique Dallazuanna www...@gmail.com
Try this:
anova(myModels[[1]],myModels
colors match which range, consider
specifying the ranges in breaks.
Schalk Heunis
On Sun, Sep 6, 2009 at 4:50 PM, FMHkagba2...@yahoo.com wrote:
Hi,
Thank you for your response. I'm looking for the names of the colors denoted
by these codes and what do these colors represent
have you tried rbind?
On Tue, Sep 8, 2009 at 11:16 AM, FMHkagba2...@yahoo.com wrote:
Dear All,
I have some data which were stored in few matrices with different orders.
Let have three different matrices a, b and c, which have the same number of
column but different number of row.
a -
You want to use list:
a = list()
a[[1]] = c(1,2,3)
a[[2]] = c(1,2,3)
Note the [[..]] operator - check the An Introduction to R manual for
more details
Schalk Heunis
On Wed, Sep 9, 2009 at 6:00 AM, sclar...@illinois.edu wrote:
I just learned that vectors can't contain vectors, which frankly
this helps.
Schalk Heunis
On Wed, Sep 9, 2009 at 2:26 AM, KABELI MEFANEkabelimef...@yahoo.co.uk wrote:
R helpers
Please help me combine the simulated data to a form of table where:
Hypermarket have 10 rows, supermarket have 15 rows,..., spazashops with
35 rows.
Hypermarket - rnorm(10
Steven
I think list() can help you
##
indlist = list()
for (i in 1:(dim(x)[2])) {
indlist[[paste(ind, i, sep = )]] - which(x[ , i] == y)
}
accum = unlist(indlist)
print(indlist$ind1)
###
Schalk Heunis
On Mon, Sep 14, 2009 at 5:19 AM, Schalk Heunis
schalk.heu...@enerweb.co.zawrote:
Chris
try this (assume your dataset is in a dataframe called ms):
library(lattice)
xyplot(Value~Time|Name,data = ms)
HTH
Schalk
On Mon, Sep 14, 2009 at 2:19 AM, Chris Li chri...@austwaterenv.com.auwrote
Karen
You can copy and paste data directly into R from Excel:
1. Mark the data including the headings in Excel
2. Ctrl-C
3. In R:
myDF - read.delim(clipboard)
Following from Milton:
hist(myDF$VARNAME)
or
hist(myD[,1]) #to plot 1st collumn
hist(myD[,2]) #to plot 2nd collumn
Schalk Heunis
On Mon
2000-12-12
5 56849XX QWERTG50T0XX NA2000-03-30
6 12345XX POIQWE74H0XX1999-12-31 NA
HTH
Schalk Heunis
On Mon, Sep 14, 2009 at 4:41 PM, Luca Braglia brag...@poleis.eu wrote:
Hello *
I would like to reshape wide the following dataset:
rl
This might be of help, first applies the formatting:print(xtable(prettyNum(d,
decimal.mark=,)))
Schalk Heunis
On Tue, Sep 15, 2009 at 5:06 PM, Jakson A. Aquino jaksonaqu...@gmail.comwrote:
Hello,
How can I make xtable print a comma as decimal separator? Setting
the option OutDec isn't
Instead of eval(expr), use lapply(expr,eval)
HTH
Schalk Heunis
On Wed, Sep 16, 2009 at 5:50 AM, Michael Spiegel
michael.m.spie...@gmail.com wrote:
Hi,
I'm trying to use a list of symbols as one of the values to be
substituted in a substitute expression, but I can't figure out how
4 5
4 4 5 6
5 5 6 7
6 6 7 8
7 7 8 9
8 8 9 10
9 9 10 11
10 10 11 12
11 11 12 13
HTH
Schalk Heunis
On Thu, Sep 17, 2009 at 5:03 AM, Peng Yu pengyu...@gmail.com wrote:
Hi,
data.frame(x1=1:11,x2=2:12,x3=3:13,y=4:14)
I want to extract all the columns that with the name 'x
Hi bioinformatics_guy
I think you are looking for the image function:
image(mat)
The heatmap.2 function does hierarchical clustering on rows and columns and
then orders the rows and columns according to the results of the clustering.
Image simply plots the matrix.
HTH
Schalk Heunis
On Thu
Try placing the column names into labCol and the rownames into labRow
e.g.heatmap.2(mat,dendrogram=c(none),
Rowv=F, Colv=F, labRow = seq(-7.5,7.5,by=5), labCol=seq(-3,3,by=2))
Schalk Heunis
On Thu, Sep 17, 2009 at 3:53 PM, bioinformatics_guy wwwhite...@gmail.comwrote:
Schalk,
Thats a great
Marcio
Define two functions, e.g.
f1-function(i,j) i+j
f2-function(i,j) i-j
then call them based on the probability e.g. 0.7
f - if(runif(1)0.7) f1 else f2
f(1,1)
or more compact
(if(runif(1)0.7) f1 else f2)(1,1)
HTH
Schalk Heunis
On Thu, Sep 17, 2009 at 5:10 PM, Marcio Resende mresende
Subodh
Assuming the data is ordered by date then you can define
fin.years = (0:(10*12-1)) %/% 12
then use aggregate:
aggregate(x, list(fin.years),sum)
HTH
Schalk Heunis
On Thu, Sep 17, 2009 at 6:11 PM, Subodh Acharya shoeb...@gmail.com wrote:
Hi everyone,I have a data daily data (x) for 10
Try this
x[(row(x[1]) %in% 2:5) x$a==1,4:5] - c(8,9)
x[(row(x[1]) %in% 2:5) x$a!=1,4:5] - c(101,102)
HTH
Schalk Heunis
On Thu, Sep 17, 2009 at 11:17 PM, Dimitri Liakhovitski ld7...@gmail.comwrote:
Hello, dear R-ers!
I have a data frame:
x-data.frame(a=c(4,2,4,1,3,4),b=c(1,3,4,1,5,0),c
, j, i)
}
}
##
HTH
Schalk Heunis
On Fri, Sep 18, 2009 at 4:50 AM, Marcio Resende mresende...@yahoo.com.brwrote:
I am new in R and i am having trouble here. I´ve already searched in the
list
but hasn´t helped
On Fri, Sep 18, 2009 at 8:12 AM, Schalk Heunis
schalk.heu...@enerweb.co.zawrote:
Marcio
Looking at the script (not much explanation re your intention), I think
there is a couple of problems:
1. Not sure if the attached was supposed to be working code, but the
assignment operator
I think this is what you want
NAD$Sample.Id - t(Prot.amount[NAD$Sample.Id])
HTH
Schalk Heunis
On Sat, Sep 19, 2009 at 12:18 PM, Monna Nygård monn...@hotmail.com wrote:
Hi,
This is a question of a newbie getting into the exciting world of R.
I have several dataframes in the same
You could plot both histograms into the same file using this:
library(lattice)
jpeg(filename=combined.jpeg)
histogram(~d|f, data = df)
dev.off()
Schalk Heunis
On Sat, Sep 19, 2009 at 11:37 AM, Sam Player samtpla...@gmail.com wrote:
# I have a dataframe with data and factors similar
197.8169 199.3558
C. Draw the histogram
Drawing a histogram of means500 is achieved using the hist function
hist(means500)
HTH
Schalk Heunis
On Sat, Sep 19, 2009 at 11:24 PM, MikeH78 holli...@crimson.ua.edu wrote:
I was wondering if anyone could help me with a problem. I need to randomly
select
Jason
Try this
Residuals = residuals(lm(y~x))
plot(x,Residuals)
Schalk Heunis
On Sun, Sep 20, 2009 at 1:36 AM, Jason Priem ja...@jasonpriem.com wrote:
Hi,
I want to plot the residuals of a least-squares regression.
plot(lm(y~x), which=1)
does this, but it plots the y-axis of my data
to be able to handle a vector of
inputs. Look at sapply if this is an issue.
HTH
Schalk Heunis
On Sun, Sep 20, 2009 at 4:21 AM, Manuj Sharma smanuj1...@yahoo.in wrote:
I have fitted Hyperexponential distribution (HED) and Hypoexponential
distribution (HoED) to two different data sets (of size
Georg
for example:
data(swiss)
data=swiss
lapply(2:length(data),function(x) lm(data[,1]~data[,x]))
HTH
Schalk Heunis
On Sun, Sep 20, 2009 at 2:05 PM, Georg Ehret georgeh...@gmail.com wrote:
Dear R community,
I have a dataframe with say 100 different variables. I wish to regress
variable
property.
breaks - c(seq(0, 1-1e-10, length=16) ,1)
heatmap.2(volcano / max(volcano), col=c(heat.colors(16)[1:15],black),
breaks = breaks)
HTH
Schalk Heunis
On Mon, Sep 21, 2009 at 1:43 PM, bioinformatics_guy
wwwhite...@gmail.com wrote:
I'm trying to display the probability space
Ana
Not sure if I understood your problem, but on my side, the lines and
points are both on the same 3-d picture. However, the lines are just
very small: by setting data = data/100, the lines and points are both
visible.
HTH
Schalk Heunis
On Mon, Sep 21, 2009 at 4:38 PM, Ana Kolar annako
Don't know SAS, but you can use y-10 to make the answer available in
the global environement. See ?'-'
To define the output see ?return
Schalk Heunis
On Mon, Sep 21, 2009 at 5:29 PM, David Young dyo...@telefonica.net wrote:
Hello Group,
I'm trying to learn R and am having a problem getting
See http://finzi.psych.upenn.edu/Rhelp08/2009-March/192978.html
You can do something like:
default.search = paste(getwd(),/*.txt,sep=)
infile2 = choose.files(default.search,filters =
Filters[c(txt,All),], caption = Choose ECD datafile)
Schalk Heunis
On Wed, Sep 23, 2009 at 8:57 PM, mdusa
Walt
I get the same message using R2.9.2 on Vista. Using
sqlFetch(con,'Sheet1') seems to however.
HTH
Schalk Heunis
On Thu, Sep 24, 2009 at 6:23 PM, Data Analytics Corp.
dataanalyt...@earthlink.net wrote:
Hi,
I'm attempting to use the RODBC package on Windows Vista to import an excel
lapply will do the trick, try something like
lapply(1:length(dat1), function(x,dat1,dat2) cbind(dat1[[x]][,1:2],
dat2[[x]]),dat1,dat2)
HTH
Schalk
On Mon, Mar 22, 2010 at 10:18 AM, Ron_M ron_michae...@yahoo.com wrote:
Dear all,
I have following two list object, both are basically collection
On Sun, Dec 12, 2010 at 3:59 PM, Tim Clark mudiver1...@yahoo.com wrote:
I need help with using graphics in Word 2007 that will later be converted
into a
pdf document. I have tried several formats and found that I get the best
quality of graphics using .wmf, .eps format, but when I convert it
Tim
Works in Word 2002 on Windows XP with PDF-xchange 3.0 to convert to pdf.
Saw reponse from Duncan - agree might be problem with Word 2007 PDF
converter.
HTH
Schalk
On Sun, Dec 12, 2010 at 3:59 PM, Tim Clark mudiver1...@yahoo.com wrote:
I need help with using graphics in Word 2007 that
41 matches
Mail list logo