[R] Anova Type II and Contrasts

2012-07-06 Thread mails
the study design of the data I have to analyse is simple. There is 1 control group (CTRL) and 2 different treatment groups (TREAT_1 and TREAT_2). The data also includes 2 covariates COV1 and COV2. I have been asked to check if there is a linear or quadratic treatment effect in the data. I

[R] Reshape data frame with dcast and melt

2012-03-19 Thread mails
Hello, I implemented two functions reshape_long and reshape_wide (see full working example below) to reshape data frames. I created several small examples and the two functions seemed to work properly. However, using the reshape_wide function on my real data sets (about 200.000 to 300.000 rows)

[R] Help on reshape function

2012-03-06 Thread mails
Hello, I am trying to reshape a data.frame in wide format into long format. Although in the reshape R documentation they programmer list some examples I am struggling to bring my data.frame into long and then transform it back into wide format. The data.frame I look at is: df - data.frame(ID1

Re: [R] Help on reshape function

2012-03-06 Thread mails
Hey Michael, thanks for your help. I think the reshape2 library works much better than the normal reshape function. However, I still cannot retransform my data.frame into wide format once used melt function to transform it into long format. How do I get it back to wide format? The documentation,

[R] Delete rows from data.frame matching a certain criteria

2012-03-01 Thread mails
Hello, consider the following data.frame: test - data.frame(n = c(1,2,3,4,5), v = c(6,5,7,5,3), pattern = c(1,1,NA,1,NA)) test n v pattern 1 1 6 1 2 2 5 1 3 3 7 NA 4 4 5 1 5 5 3 NA I tried to use apply and the adply function to set v to

[R] Outlier removal techniques

2012-02-09 Thread mails
Hello, I need to analyse a data matrix with dimensions of 30x100. Before analysing the data there is, however, a need to remove outliers from the data. I read quite a lot about outlier removal already and I think the most common technique for that seems to be Principal Component Analysis (PCA).

[R] Problems reading tab-delim files using read.table and read.delim

2012-02-08 Thread mails
Hello, I used read.xlsx to read in Excel files but for large files it turned out to be not very efficient. For that reason I use a programme which writes each sheet in an Excel file into tab-delim txt files. After that I tried using read.table and read.delim to read in those txt files.

Re: [R] unlink: parameter force not available in R windows version

2012-02-05 Thread mails
Hi Brian, that explains it. I will update R to 2.14.x tomorrow. Thanks for your post. -- View this message in context: http://r.789695.n4.nabble.com/unlink-parameter-force-not-available-in-R-windows-version-tp4357464p4358761.html Sent from the R help mailing list archive at Nabble.com.

[R] unlink: parameter force not available in R windows version

2012-02-04 Thread mails
Hello, I use the R command unlink(file, recursive = TRUE, force = TRUE) to delete folders, subfolders and files on Mac OS X. When I was running my script on a Windows computer I realised that for unlink there is no option/parameter force. I do not know why but without that force option R

Re: [R] unlink: parameter force not available in R windows version

2012-02-04 Thread mails
Hello, I am not exactly sure but I think the version which is installed on that windows computer is 2.13.x So it looks like that the people who developed that function recently updated it. I need to check that on Monday. Thanks for you answer. -- View this message in context:

[R] Relevel dynamically

2012-01-16 Thread mails
Dear list, I am running R code which produces a data.frame with variable rows. For plotting purposes I need to relevel the column called names but since the dimension of the data.frame can vary I do not know how to dynamically revel the data.frame. Here is an example data.frame called df to

Re: [R] Relevel dynamically

2012-01-16 Thread mails
Hi Michael, yes you were right and your solution works great. thanks a lot. I managed to do it but with 4 lines of code rather than only 1. Cheers -- View this message in context: http://r.789695.n4.nabble.com/Relevel-dynamically-tp4299531p4300080.html Sent from the R help mailing list

[R] Help needed in interpreting linear models

2012-01-13 Thread mails
Dear members of the R-help list, I have sent the email below to the R-SIG-ME list to ask for help in interpreting some R output of fitted linear models. Unfortunately, I haven't yet received any answers. As I am not sure if my email was sent successfully to the mailing list I am asking for help

Re: [R] Help needed in interpreting linear models

2012-01-13 Thread mails
Hi Petr, thanks for your answer. First of all it's not homework I am a student and need to analyse cancer data using linear models. I looked into that topic since a week now and still struggling in interpreting some of the R output that is why I was asking for help here. I don't quite