[R] Converting CSV file to numeric and calculate ttest
shawin
shawinkarim at gmail.com
Wed Sep 2 21:08:18 CEST 2015
p value should be 0.3
On Wed, Sep 2, 2015 at 8:07 PM, Navien [via R] <
ml-node+s789695n4711770h69 at n4.nabble.com> wrote:
> I have a csv file i convert it to numeric value , then i apply t-test ,
> but t-test result is not correct: please could you guide me. the data :
> ID x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15
> 1367452_at 9.488404158 9.470895414 9.282433728 9.366707445 9.955383045
> 9.640816474 9.606262272 9.329651027 9.434541611 9.473922432 9.311412966
> 9.3154885 9.434977488 9.470895414 9.764258059
> 1367453_at 8.630629966 8.55831075 8.788391003 8.576231135 8.671587906
> 8.842979993 8.861958856 8.58330436 8.603596508 8.570129609 8.59798922
> 8.572686772 8.679751791 8.663950953 8.432875347
> 1367454_at 9.354748885 9.367668838 9.259952558 9.421538213 9.554635162
> 9.603744578 9.452197983 9.284228877 9.404607878 9.317737979 9.343115301
> 9.310644266 9.27227486 9.360337823 9.44706281
> 1367455_at 9.944863964 9.950427516 10.19101759 10.07350804 10.03269879
> 10.1307908 10.03487287 9.74609383 9.886379007 9.775472567 10.036596
> 9.544738458 9.699611598 9.911962567 9.625804277
> AT1 <-
> read.csv("C:/Users/shawin/Desktop/RProgramms/RAdipose/AT1.csv",
> stringsAsFactors=TRUE)
>
>
> str(AT1)
> matAT = data.frame(AT1[,-1])
> str(matAT)
> write.csv(matAT,"matAT.csv",row.names=FALSE)
> #convert the csv file to numeric
> matAT<-as.matrix(sapply(matAT,as.numeric))
> str(matAT)
> group<-factor(rep(c("Ob","Ln"),times=c(7,8)))
> t.test(matAT[1,]~group)
>
>
>
>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://r.789695.n4.nabble.com/Converting-CSV-file-to-numeric-and-calculate-ttest-tp4711770.html
> To start a new topic under R help, email
> ml-node+s789695n789696h75 at n4.nabble.com
> To unsubscribe from R, click here
> <http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=789695&code=c2hhd2lua2FyaW1AZ21haWwuY29tfDc4OTY5NXwtMjQ0MzkwMjQ1>
> .
> NAML
> <http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://r.789695.n4.nabble.com/Converting-CSV-file-to-numeric-and-calculate-ttest-tp4711770p4711771.html
Sent from the R help mailing list archive at Nabble.com.
[[alternative HTML version deleted]]
More information about the R-help
mailing list