[R] fill=T?

2012-03-07 Thread karena
ead in the file using 'read.table("data", head=T, fill=T), then the data.frame in R will be: abcd 1234 186NA 120NA 110NA Could anyone tell me how to handle this? Thank you very much, Karena -- View this message in con

[R] R packages for pathway analysis?

2011-12-08 Thread karena
What R packages do you guys use for 'pathway analysis'? By 'pathway analysis', I mean to check the enrichment of certain genes in KEGG | GO pathways. Thank you, Karena -- View this message in context: http://r.789695.n4.nabble.com/R-packages-for-pathway-analysis-tp41752

[R] A questions regarding R plots

2011-10-19 Thread karena
Hi Dear all, I am making Venn Diagram plots in R. I attached an example: http://r.789695.n4.nabble.com/file/n3919206/venn.jpeg I want to get rid of the black boarder line, is there any way to do it? Thank you very much, Karena -- View this message in context: http://r.789695.n4.nabble.com

[R] Questions regarding R plots

2011-10-19 Thread karena
Hi Dear all, I am making some Venn Diagram plots in R. http://r.789695.n4.nabble.com/file/n3919144/venn.0.001.jpg This is one plot that I generated. What I want to do is to get rid of the black boarder line. Is there any way to do this? Thank you very much, Karena -- View this message in

[R] A question regarding random effects in 'aov' function

2011-09-20 Thread karena
ividual variation and batch effects). How should I write my 'aov' function? I am not sure about the 'random effects' part i.e. fm <- aov(expression.level~tissue.type+Error(Sample.ID)+Error(batch), data=sample) ?? Thank you, karena -- View this message in context:

Re: [R] Questions on 'lme' function, urgent!

2011-09-15 Thread karena
Ok. Thank you. karena On Thu, Sep 15, 2011 at 5:33 PM, Bert Gunter [via R] < ml-node+s789695n3816961...@n4.nabble.com> wrote: > You should post this to the r-sig-mixed-models list, not here. > > -- Bert > > On Thu, Sep 15, 2011 at 1:42 PM, karena <[hidden > email

[R] Questions on 'lme' function, urgent!

2011-09-15 Thread karena
odRatio(H1) in a chi-square distribution is less than 0.05, then we will say H2 is accepted. However, my problem is, I don't know how to specify these parameterizations in 'lme' function based H0, H1 and H2, respectively. Can anyone help me with that? Thank you very much, Karena

Re: [R] Questons about 'igraph' package

2011-09-15 Thread karena
Thank you so much, Gabor. It works well! -- View this message in context: http://r.789695.n4.nabble.com/Questons-about-igraph-package-tp3814338p3816219.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list h

[R] Questons about 'igraph' package

2011-09-14 Thread karena
nodes are red and green, but the 'name' attribute doesn't work, I still have the numeric id on each node (0-99). Can anyone tell me how to solve this problem? Thank you, Karena -- View this message in context: http://r.789695.n4.nabble.com/Questons-about-igraph-

Re: [R] Random number generation

2011-07-22 Thread karena
Thank you guys for all the help. I appreciate! -- View this message in context: http://r.789695.n4.nabble.com/Random-number-generation-tp3685463p3686392.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Random number generation

2011-07-21 Thread karena
To Jason: Still thank you, your reply gives me some clue about how to do this. To Duncan: Thank you for rely. It helped. Karena -- View this message in context: http://r.789695.n4.nabble.com/Random-number-generation-tp3685463p3685821.html Sent from the R help mailing list archive at

[R] Random number generation

2011-07-21 Thread karena
Hi, I want to generate multiple sets of random numbers. The requirement is that: 1) each set have 3 random numbers; 2) the sum of the three number is always 1. how to do this? thank you, karena -- View this message in context: http://r.789695.n4.nabble.com/Random-number-generation

Re: [R] R string functions

2011-06-15 Thread karena
Thank all you guys for the great help~. I appreciate -- View this message in context: http://r.789695.n4.nabble.com/R-string-functions-tp3600484p3600975.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] R string functions

2011-06-15 Thread karena
;T" appeared 5 times, how can I use a string function to get the these number? thanks, karena -- View this message in context: http://r.789695.n4.nabble.com/R-string-functions-tp3600484p3600484.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] How to include multiple random effects in 'lme' function

2011-06-15 Thread karena
Can anyone help me with this? thank you in advance. Karena -- View this message in context: http://r.789695.n4.nabble.com/How-to-include-multiple-random-effects-in-lme-function-tp3598339p3600164.html Sent from the R help mailing list archive at Nabble.com

[R] How to include multiple random effects in 'lme' function

2011-06-14 Thread karena
S code, it has multiple random effects, how can I convert this SAS code to R code? library(nlme) fm <- lme(trait~time+money, random=list(???), data=example) How should I fill up the list()? thank you very much, Karena -- View this message in context: http://r.789695.n4.nabble.com

Re: [R] About 'hazard ratio', urgent~~~

2011-06-14 Thread karena
Thanks a lot for the great help~ -- View this message in context: http://r.789695.n4.nabble.com/About-hazard-ratio-urgent-tp3595527p3597025.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.

[R] About 'hazard ratio', urgent~~~

2011-06-13 Thread karena
Hi, I am new to R. My question is: how to get the 'hazard ratio' using the 'coxph' function in 'survival' package? thanks, karena -- View this message in context: http://r.789695.n4.nabble.com/About-hazard-ratio-urgent-tp3595527p3595527.html Sent from the

[R] Convert SAS code to R code about survival analysis

2011-06-13 Thread karena
education status. How convert such SAS codes to R code? thank you very much, karena -- View this message in context: http://r.789695.n4.nabble.com/Convert-SAS-code-to-R-code-about-survival-analysis-tp3594657p3594657.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] How to do covariate adjustment in R

2011-05-20 Thread karena
Thanks a lot for the great help, Timothy! K -- View this message in context: http://r.789695.n4.nabble.com/How-to-do-covariate-adjustment-in-R-tp3537463p3538962.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mail

Re: [R] How to do covariate adjustment in R

2011-05-19 Thread karena
b*sex+c*per_se My question is: how to get the value of 'per_se' for each gene? thanks again. Karena -- View this message in context: http://r.789695.n4.nabble.com/How-to-do-covariate-adjustment-in-R-tp3537463p3537711.html Sent from the R

[R] How to do covariate adjustment in R

2011-05-19 Thread karena
and 'sex', then compare the 'remaining gene expression' value between 'liver' and 'brain'. How to do the covariate adjustment to remove the effects of these two covariates? Should I do a 'step-wise' regression or something? Which function in R shoul

[R] Questions about 'heatmap.2' function

2011-04-26 Thread karena
actly the same), and the error message I got is : "Error in image.default(z = matrix(z, ncol = 1), col = col, breaks = tmpbreaks, : breaks must all be finite" Can anyone help me on this? thank you very much! karena -- View this message in context: http://r.789695.n4.nabble.com/Ques

Re: [R] Questions about 'igraph' package.......

2011-03-28 Thread karena
Thank you very much, Gabor! That helps. -- View this message in context: http://r.789695.n4.nabble.com/Questions-about-igraph-package-tp3412734p3412925.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list h

Re: [R] Questions about 'igraph' package.......

2011-03-28 Thread karena
One more question is: when you plot the gene network, you only get a number on each node, then how can you match the numbers to the genes? thank you very much, Karena -- View this message in context: http://r.789695.n4.nabble.com/Questions-about-igraph-package-tp3412734p3412745.html Sent from

[R] Questions about 'igraph' package.......

2011-03-28 Thread karena
I am using 'igraph' package to make some graphs of 'gene-gene interaction'. I can get a data.frame which has three columns. gene1 gene2 pvalue AGT MLR1.2e-04 MLR 11BHSD1 1.71e-05 IFG211BHSD2 2.2e-07 . . . .

[R] how to handle 'g...@gtdata' ?

2010-11-03 Thread karena
ic data to 'g...@gtdata' directly, without converting data of other format to 'g...@gtdata' first? thank you very much! karena -- View this message in context: http://r.789695.n4.nabble.com/how-to-handle-gwaa-gtdata-tp3026206p3026206.html Sent from the R help mailing list

[R] how to make multiple curves in one plot

2010-11-01 Thread karena
is for another variable in the data.frame -log10(results_chr_p$p). My question is: how to make multiple lines in one plot, especially when using the 'running' function in it?? thank you very much, karena -- View this message in context: http://r.789695.n4.nabble.com/how-to-make-multiple-curves

Re: [R] [Help]:How to use "loop" to achieve this aim?

2010-10-01 Thread karena
try:ch -- for(i in 1:22) { chrn <- paste("chr",i,sep="") chrn=MEDIPS.readAlignedSeqences(BSgenome="hg19", file="chrn",numrows= ) chrn=MEDIPS.genomeVector(data=chrn, bin_size=50,extend=250) ... ... write.table(frameschrn.frame500.step250, file="frames.chrn.meth.txt", sep="\T",

Re: [R] a question about replacing the value in the data.frame

2010-09-09 Thread karena
Thanks a lot! -- View this message in context: http://r.789695.n4.nabble.com/a-question-about-replacing-the-value-in-the-data-frame-tp2532010p2533036.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list ht

Re: [R] regression function for categorical predictor data

2010-09-09 Thread karena
Hi, thank you very much for the help. one more quick question: is that, my predictor variable should be coded as 'factor' when using either 'lm' or 'glm'? sincerely, karena -- View this message in context: http://r.789695.n4.nabble.com/regression-function-

[R] regression function for categorical predictor data

2010-09-08 Thread karena
Hi, do you guys know what function in R handles the multiple regression on categorical predictor data. i.e, 'lm' is used to handle continuous predictor data. thanks, karena -- View this message in context: http://r.789695.n4.nabble.com/regression-function-for-categorical-pred

[R] a question about replacing the value in the data.frame

2010-09-08 Thread karena
2 1 1 0 so for this data set, what I wanna do is to replace all the '2' with '1', how can I do it in an efficient way? thank you, karena -- View this message in context: http://r.789695.n4.nabble.com/a-question-about-replacing-the-val

Re: [R] any statement equals to 'goto'?

2010-08-31 Thread karena
these seem something that I am looking for, I will try them, thank you!! -- View this message in context: http://r.789695.n4.nabble.com/any-statement-equals-to-goto-tp2402107p2402264.html Sent from the R help mailing list archive at Nabble.com. __ R-h

[R] any statement equals to 'goto'?

2010-08-31 Thread karena
16, so I just wanna ignore variable116, is there a statement that can do this: when getting this error message 'Error in MEEM...', directly goto the next variable? thank you, karena -- View this message in context: http://r.789695.n4.nabble.com/any-statement-equals-to-go

Re: [R] an issue about missing data

2010-08-05 Thread karena
age2+age3+sex+b.bmi, kin=gs.b.gkin, data=gs.b) ## Hi, david, above is my code. So I first removed the 3 individuals who have some missing data, then I performed the polygenic function with the complete data. thanks, karena -- View this message in context: http:/

Re: [R] an issue about missing data

2010-08-05 Thread karena
thank you, but even after I tried 'complete.cases' function, I still get the same error messages. help. -- View this message in context: http://r.789695.n4.nabble.com/an-issue-about-missing-data-tp2315094p2315519.html Sent from the R help mailing list archive at Nabble.com. __

[R] an issue about missing data

2010-08-05 Thread karena
.bmi, kin=gs.gkin, data=gs) --- ## and I got the following error message: Error in svd(X): infinite or missing values in 'x'. I know this may be due to some missing data issue, but I just don't know how to solve this problem. anyone can help? thanks a lot, karena -- View

[R] a question about 'read.table' with or without 'read.table'.(urgent)

2010-08-04 Thread karena
s.is=T) # I got > temp snp1 snp2 snp3 1 AA 000 2 GG GG0 3 00 AA0 The difference is for 'snp3', we can see, in 1) the values for snp3 are all '00', while in 2) the values are all '0'. How can I keep the original values for snp3 as '

[R] questions about string handling

2010-08-04 Thread karena
s the most efficient way to do it? thanks you very much, karena -- View this message in context: http://r.789695.n4.nabble.com/questions-about-string-handling-tp2314335p2314335.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-p

Re: [R] a question about 'read.table' with or without 'read.table'.(urgent)

2010-08-04 Thread karena
Great! Thank you -- View this message in context: http://r.789695.n4.nabble.com/a-question-about-read-table-with-or-without-read-table-urgent-tp2314423p2314450.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org maili

[R] a issue about the qutation mark?

2010-07-16 Thread karena
quot;) #line 8 funcname(folder/hyper.csv) #last line 2) the code working: read.csv(trait.file) # line 8 funcname("folder/hyper.csv") # last line anyone can tell me why is the difference? thank you, karena -- View this message in context: http://r.789695.n4

Re: [R] question about string handling....

2010-07-16 Thread karena
hey, guys, all these methods work perfectly. thank you!! -- View this message in context: http://r.789695.n4.nabble.com/question-about-string-handling-tp2289178p2291497.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.

[R] question about string handling....

2010-07-14 Thread karena
the Parentheses. so var3 would be: var3 ok db 90 78 iojfodjfo how to do this? thanks, karena -- View this message in context: http://r.789695.n4.nabble.com/question-about-string-handling-tp2289178p2289178.html Sent from the R help mailing list a

Re: [R] ifelse statement

2010-07-07 Thread karena
that makes sense. thank you, guys! -- View this message in context: http://r.789695.n4.nabble.com/ifelse-statement-tp2281576p2281706.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.c

Re: [R] how to calculate summary statistics for each factor

2010-07-07 Thread karena
yeah, both work. Thank you, guys... -- View this message in context: http://r.789695.n4.nabble.com/how-to-calculate-summary-statistics-for-each-factor-tp2279777p2281532.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.

[R] ifelse statement

2010-07-07 Thread karena
e value of "c(corr.iris, cor.temp)" has not been assigned to corr.iris, even when the (i==1 & j==2) is not satisfied. what's the problem here? thanks, karena -- View this message in context: http://r.789695.n4.nabble.com/ifelse-statement-tp2281576p228157

[R] how to calculate summary statistics for each factor

2010-07-06 Thread karena
19 326 3 20 how to calculate the summary value for each factor? thanks karena -- View this message in context: http://r.789695.n4.nabble.com/how-to-calculate-summary-statistics-for-each-factor-tp2279777p2279777.html Sent from the R help mailing list archive at

Re: [R] string handling

2010-06-04 Thread karena
Thank you guys very much, these help!! -- View this message in context: http://r.789695.n4.nabble.com/string-handling-tp2242119p2243388.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.eth

[R] string handling

2010-06-03 Thread karena
I only want "G", "G", and for "abd89C/T90", I only want "C" and "T", how to get these? thank you, karena -- View this message in context: http://r.789695.n4.nabble.com/string-handling-tp2242119p2242119.html Sent from the R help mailing list ar

[R] how to use GenABEL genetic information??

2010-05-28 Thread karena
about how to deal with this problem. thank you very much! karena -- View this message in context: http://r.789695.n4.nabble.com/how-to-use-GenABEL-genetic-information-tp2234760p2234760.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] any function in R similar to the "scan" function in SAS?

2010-05-06 Thread karena
yeah, that's also working well, thanks! -- View this message in context: http://r.789695.n4.nabble.com/any-function-in-R-similar-to-the-scan-function-in-SAS-tp2131264p2132750.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-pr

Re: [R] any function in R similar to the "scan" function in SAS?

2010-05-06 Thread karena
thank you guys very much! -- View this message in context: http://r.789695.n4.nabble.com/any-function-in-R-similar-to-the-scan-function-in-SAS-tp2131264p2131930.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mail

Re: [R] question about 'write.table'

2010-05-05 Thread karena
Thank both of you guys!! -- View this message in context: http://r.789695.n4.nabble.com/question-about-write-table-tp2126309p2131165.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.c

[R] any function in R similar to the "scan" function in SAS?

2010-05-05 Thread karena
now, and I want to get the first and second columns. If in SAS, I can do the following: one = scan(three,1,'-') two = scan(three,-1,'-') How can I do this in R? thank you, karena -- View this message in context: http://r.789695.n4.nabble.com/any-function-in-R-similar-t

[R] question about 'write.table'

2010-05-04 Thread karena
quot; loop? say, for (i in 1:100) { write.table(, file='...', ....) } thank you, karena -- View this message in context: http://r.789695.n4.nabble.com/question-about-write-table-tp2126309p2126309.html Sent from the R help mail

Re: [R] macro variable in R?

2010-04-22 Thread karena
Thank you all for the great help... I appreciate! -- View this message in context: http://r.789695.n4.nabble.com/macro-variable-in-R-tp2020772p2023108.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list h

[R] macro variable in R?

2010-04-22 Thread karena
1: 10) { matrix_$i <- matrix(nrow=i, ncol=i) } rather thank creating these matrices one by one manually. Anyone have any suggestions? thanks, karena -- View this message in context: http://r.789695.n4.nabble.com/macro-variable-in-R-tp2020772p2020772.html Sent from the R help mailing l

Re: [R] Odp: a question about deleting rows

2010-01-14 Thread karena
thank all of you for the help. to Petr: thanks for the suggestion, I will read the R intro manual. :-) -- View this message in context: http://n4.nabble.com/a-question-about-deleting-rows-tp1013403p1014267.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] merging issue.........

2010-01-13 Thread karena
thank you very much! -- View this message in context: http://n4.nabble.com/merging-issue-tp1013356p1013433.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] a question about deleting rows

2010-01-13 Thread karena
and n4=0 and n5=0 then delete the row. how can I do that? thank you, karena -- View this message in context: http://n4.nabble.com/a-question-about-deleting-rows-tp1013403p1013403.html Sent from the R help mailing list archive at Nabble.com. __ R

[R] merging issue.........

2010-01-13 Thread karena
hi, I have a question about merging two files. For example, I have two files, the first file is like the following: id trait1 110.2 211.1 39.7 610.2 78.9 10 9.7 11 10.2 The second file is like the following: idtrait2 1 9.8 2 10.8 4 7.8 5 9.8 6 10.1

Re: [R] how to handle missing values "." when importing data in R

2010-01-12 Thread karena
thank you guys. All the columns of my data are numeric. I tried both methods, and they both work. I appreciate your help. -k -- View this message in context: http://n4.nabble.com/how-to-handle-missing-values-when-importing-data-in-R-tp1012298p1012397.html Sent from the R help mailing list arc

Re: [R] how to handle missing values "." when importing data in R

2010-01-12 Thread karena
Hi, tim, thank you very much for the reply, but I am really a new user. How to change all NAs to zero? thanks again. karena jholtman wrote: > > ?read.table > > na.strings='.' > > Then change all NAs to zero df$col[is.na(df$col)] <- 0 > > On

[R] how to handle missing values "." when importing data in R

2010-01-12 Thread karena
hi, I have a question about importing data in R. I want to import a file which has missing value in it, and the missing values are denoted as ".", I want to first read in the file, and then change the "." into the number zero "0". how can I do that? thank you, k