LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-30-2003, 02:34 PM   #1
SerfurJ
Member
 
Registered: May 2003
Posts: 80

Rep: Reputation: 15
Arrow R question- how to use apply on a two variable t-test


does anyone know how to use the apply function on a two-variable t-test? i've tried everything.

apply(data[1:4],1,t.test) # works, but only one-variable
apply((data[1:4],data[5:9]),1,t.test) # syntax error

i've also tried using for:

for (i in 1:1000) t.test(data[i,1:4],data[i,5:9])

but it doesn't print anything!

t.test(data[i,1:4],data[i,5:9]) # works fine!

yes, sink() is empty.

thanks for any help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to test if an env variable is set King of Men Linux - Newbie 5 11-03-2005 04:39 AM
test a variable to see if it contains information farmerjoe Programming 4 04-25-2005 02:34 PM
python variable question bendeco13 Programming 6 02-03-2005 07:22 AM
Test uninitialized variable AMMullan Programming 6 02-12-2004 10:29 AM
Enviromental variable question wr3ck3d Linux - Software 3 05-01-2003 06:44 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration