search for: hualihua

Displaying 14 results from an estimated 14 matches for "hualihua".

2008 Jul 01
2
ignore warning messages?
Hi All, I'm working with R and want to ignore the warning messages given, is there a way to stop R from giving out warning messages any more? an example: tt = "test" as.numeric(tt) would give me the following message: [1] NA Warning message: NAs introduced by coercion I decide to ignore the warning message for now and don't want it to show any more, can someone help?
2008 Jul 14
2
position of a specific character
Hi All, I'm wondering whether there is a quick way to know the position of a specific charcater in a long character: for example frg="((D:41.04,I:41.04):45.05,(((E:2.32,((G:0.67,J:0.67):0.44,H:1.11):1.21)" and I would like to know that the 1st, 2nd, 26th, 27th, 28th ... character is "(", is there a quick way to do that? Thanks! Hua
2008 Jun 10
5
the title is too long for a graph
Hi All, I have a problem of putting long titles on a graph: for example, x= seq(1:100) y=seq(1:100) plot(x,y,main="p=0.05:A-B=3,C-D=10,D-E=100,A-F=2,AFR-E=3,ACE-D=1,ADEF-M=0,AED-E=10,DE-F=3,AB-J=4,AC-J=10,ED-F=1,ED-B=4,AF-B=10,CD-S=10,AM-C=4") R seems not able to print the whole title. The title content might be changing and thus I don't know how long it is beforehand. Is there a
2008 Jun 19
1
print one character on several lines
Hi All, I'm wondering how I can print one large/long character on several lines so that the output will not overflow a page. Setting fill be TRUE or even numbers does not help. An example is below: ipuFile <- file("input.txt", "w") cat("This is a very long character and I want to print it on several lines. This is a very long character and I want to
2008 Oct 09
2
R book needed
Hi there, I'm looking for advice on a R book that's for somewhat advanced user. I've been using R for a while and can do the basic analysis with no problem. My problem is that for many already existing commands, such as gsub, textconnection, list, etc, I don't use them, simply because I don't know their existence! Can someone recommend a good book that I can refer to and can
2008 Jun 12
2
numbers as part of long character
Hi, I'm looking for some way to pick up the numbers which are contained and buried in a long character. For example, outtree.new="(((B:1204.25,E:1204.25):7581.11,F:8785.36):8353.85,C:17139.21);" num.char =
2008 Jun 19
1
create .exe file with R?
Dear all, I'm writing to check with you whether there is a way to create .exe file(or something like that) with R. Now working on creating a program to take inputs from users (with tcl/tk), I would appreciate any idea to make the program run on its own rather than every time having to run my source code in R. Thanks! Hua
2008 Jul 06
0
color with tcl/tk?
Dear all, I'm using tcl/tk to create a program to get answers from the user. I'd like a way to highlight/emphasize some of the information using colors. It'll be even better if I can color part of the messages instead of the whole thing. For example, I want to put the word "Hello" in red: require(tcltk) ReturnVal <- tkmessageBox(title="Greetings from R
2009 Feb 19
0
change the label size when drawing trees with ape
Hi All, I want to be able to change the labe size on a tree when using ape package so that the graph can look nicer, but don't know how. Playing with the "font" doesn't seem to help. (Right now the labels barely show.) Thanks for your help! Code I'm using now #------------------------- t1 = "(((1:77.37,2:77.37):9.4,4:86.77):7.56,3:94.33);" t2 =
2009 Apr 14
0
disappearing dialog boxes when using tcltk
Dear all, I'm trying to use tcltk to build a small user-interface and couter the problem: It seems that sometimes the dialog box will be minimized automatically though I want it to be on top of the screen all the time. For example, when runing the following code, if you type in "a1", "a2", "a3", etc when being asked for an integer, the program is supposed to
2010 Mar 30
2
Install package of "BRugs"?
Hi All, I'm trying to install the package "BRugs" and could not find it on the install package list. Then I tried the suggestion to run the following command in R install.packages("BRugs") but get the following error message: Loading required package: BRugs Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there
2010 Apr 16
2
how to change the position of xlab in truehist?
Hi, I'm wondering how can I change the position of xlab in truehist. For example, the following code creats a histogram with 4 bins for my discrete data. I want each bin to be labelled as 0, 1, 2, or 3 in the middle, so that it's clear each bin corresponds to each of the discrete case. I was thinking of first delete xlab and then add marks myself, but it doesn't look like it's
2008 Jan 08
1
use "save.image" inside a function?
Hi, All I'm trying to save the workspace as a Check Point for possible future come back. The "save.image" function works if the whole coding is in a main function: rm(list=ls()) t = 1 t = t+1 print(paste("before",t)) # [1] "before 2" save.image("tt.RData") t = t+1 print(paste("after",t)) # [1] "after 3"
2007 Nov 12
3
help on drawing a tree with "ape"?
Dear all, I'm using the "ape" package in R and want to draw a phylogenetic tree with not only the tip labels but also some labels for the edges. e.g. Mark the edge AB as "m" in the tree ABC. Couldn't find a way to do that. Can someone help? Thanks, Hua