An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090209/5847e3e5/attachment-0001.pl>
(no subject)
4 messages · glenn, ONKELINX, Thierry, David Winsemius +1 more
Dear Glenn, Are you looking for str()? Try str(bycontract) HTH, Thierry ------------------------------------------------------------------------ ---- ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and quality assurance Gaverstraat 4 9500 Geraardsbergen Belgium tel. + 32 54/436 185 Thierry.Onkelinx at inbo.be www.inbo.be To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher The plural of anecdote is not data. ~ Roger Brinner The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey -----Oorspronkelijk bericht----- Van: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Namens glenn Verzonden: maandag 9 februari 2009 11:13 Aan: r-help at r-project.org Onderwerp: [R] (no subject) Is there a general method for finding out what "something" is in R please. I have a list (bycontract) that;
is.list(bycontract3)
[1] TRUE And an element of this list would be this say;
bycontract3[[1]]
[1] 22 3.2 -8 -17 49 3 [7] 30 -3 -21 8 3 12 [13] 49 19 -13 -2 25 39 [19] -12 -90 -1 15 -87 30 I can not seem to see what type of object this element is (is.list = FALSE) - also is there a way to take all the elements and just put them in just one series please Regards glenn ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is door een geldig ondertekend document. The views expressed in this message and any annex are purely those of the writer and may not be regarded as stating an official position of INBO, as long as the message is not confirmed by a duly signed document.
You first need to look at the documentation for the mode, class and typeof functions. (This should have been covered early in any of the standard texts.) You are using the function "[[" on a list with one element and it appears you are getting a vector. Try: is.vector(bycontract[[1]]) mode(bycontract) class(bycontract) typeof(bycontract) this.thing <- bycontract[[1]] mode(this.thing) class(this.thing) typeof(this.thing) Now you have in "this.thing" what some people outside R might call "just one series", but R users would call a "vector". There are very useful indexed series objects of class "zoo", but it doesn't appear as though you are quite ready for that level of complexity. Install and load the zoo package for addition of that facility when you are ready .
David Winsemius in this case On Feb 9, 2009, at 5:13 AM, glenn wrote: > Is there a general method for finding out what "something" is in R > please. > > > > I have a list (bycontract) that; > > > >> is.list(bycontract3) > > [1] TRUE > > > > And an element of this list would be this say; > > > >> bycontract3[[1]] > > [1] 22 3.2 -8 -17 49 3 > > [7] 30 -3 -21 8 3 12 > > [13] 49 19 -13 -2 25 39 > > [19] -12 -90 -1 15 -87 30 > > > > I can not seem to see what type of object this element is (is.list = > FALSE) > - also is there a way to take all the elements and just put them in > just one > series please > > > > Regards > > > > glenn > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Hi,
I'm trying to create a connectivity diagram using RgraphViz library. I want to increase the edge's label fontsize, but the size did not change.
Did I do something wrong ?
M <- matrix(nrow=5,ncol=5,byrow=TRUE,data=mytable)
colnames(M) <- levels(pf$agent)
A <- new("graphAM", M, "directed", values = list(weight=M))
eAttrs <- list()
ew <- as.character(unlist(edgeWeights(A)))
names(ew) <- edgeNames(A, recipEdges = "distinct")
eAttrs$label <- ew
fs2 <- rep(c(72), length(ew))
names(fs2) <- edgeNames(A, recipEdges = "distinct")
eAttrs$labelfontsize <- fs2
plot(A, attrs = list(node = list(label = "foo", fillcolor = "lightblue"), edge = list(color = "red")), edgeAttrs = eAttrs,recipEdges="distinct")
Thanks.