Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

R "programming"

Name: Anonymous 2013-02-02 9:12

Hey /prog/,

Has anyone here studied the R programming language, and if so could you help me with a trivial problem?

#################################################
twr2 <- function() {
#making the vector and storing in y
y <- c(1,3,45,6,7)

#pasting the vector into txt so we can write to file
txt = paste(y,sep="")

#txt is now ready to be written to file, so here we go:
fileConn= file("c:\\r\\writeTest.fis")
writeLines(txt, fileConn)
close(fileConn)
}
#################################################

The above code creates a vector, and then stores it in a file. The problem is the file contents are
on individual lines, how can I separate them with a comma, or just a spac etc. instead of a new line?

Any help would be much appreciated (I'm also aware of the general consesus on R, and I agree with it but I'm being forced to use it)

Name: Anonymous 2013-02-02 9:44

Ask Stack Overflow.

Name: Anonymous 2013-02-02 9:59

sep="," ? ^^

Name: Anonymous 2013-02-02 10:01

The dumbfuck with Down's (>>3) is right. Now fuck off and next time ask Stack Overflow.

Name: Anonymous 2013-02-02 10:25

>>4 lol i've never used R.. what's your excuse? ^^

Name: Anonymous 2013-02-02 10:40

>>5
My excuse is: I didn't get hit by a car when I was 5, so I'm not a fucking retard.

Name: Anonymous 2013-02-02 13:37

C ``pcogcamming''

Name: Anonymous 2013-02-02 21:34

I don't know yahoo answers was redirecting here, sorry about that >>1-san.

What you are looking for is
http://cran.r-project.org/doc/manuals/R-data.html#Export-to-text-files

You would have known that if you realised most things have a manual these days.

>>3 san's solution is correct.

Also, do a course on it if you want to understand it even better
https://www.coursera.org/course/compdata
then to apply you're new knowledge
https://www.coursera.org/course/dataanalysis

Name: Anonymous 2013-02-02 22:38

>>8
*your

Name: Anonymous 2013-02-02 23:41

>>6 and yet...... ^^

Name: Anonymous 2013-02-03 14:50

>>9
no it's you are new as in you are new here, Welcome!
xDDD
You've been hit by, YHBT by a SMOOTH ORI/G/INAL

Name: Anonymous 2013-02-03 14:58

>>10
And yet what?

Please try to say what you're thinking right now in a way we non-retards can understand. Also, avoid hitting the 6 key in your keyboard.

Name: Anonymous 2013-02-03 14:59

>>12
Stop bullying the retard, you piece of shit.

Name: Anonymous 2013-02-03 15:02

>>13
Back to r/sanfrancisco, libtard.

Name: Anonymous 2013-02-03 15:05

>>14
What the fuck did you just fucking say about me, you little bitch? I’ll have you know I graduated top of my class in the Navy Seals, and I’ve been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I’m the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You’re fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that’s just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little “clever” comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn’t, you didn’t, and now you’re paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You’re fucking dead, kiddo.

Name: Anonymous 2013-02-03 15:09

>>15
I’ve been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills.
Typical kike.

Name: Anonymous 2013-02-03 15:10

>>15
Holy shit. This takes me back.
Don't do this to an old man.
btw I invented that.

Name: Anonymous 2013-02-03 15:13

>>17
First the "have you ever been far as decided/consider this a pack of wild niggers" guy, now you.

Why the fuck do you feel pride over stupid imageboard ``memes'' and post about them here?

Name: Anonymous 2013-02-03 15:24

>>17
Did you ever kill that guy? Also, are you the one who killed bin Laden?

Name: Anonymous 2013-02-03 16:18

>>18
Welcome to /prog/!.
You need to take it easy; check yourself before you wreck yourself and you'll be just fine.

>>19
Did you ever kill that guy?
After writing it I discovered that it was physically impossible to shit fury.
As they became older, they grew up to be an expert shitposter. Shigata ka nai; we all have regrets I suppose.

Name: Anonymous 2013-02-03 16:47

>>20
I AM THAT SHITPOSTER!!!!!!

Name: Anonymous 2013-02-03 22:24


                   _  _   _                                                   __
  _ __           _| || |_| | __ _ _ __   __ _ _   _  __ _  __ _  ___    ___  / _|
 | '__|  _____  |_  ..  _| |/ _` | '_ \ / _` | | | |/ _` |/ _` |/ _ \  / _ \| |_
 | |    |_____| |_      _| | (_| | | | | (_| | |_| | (_| | (_| |  __/ | (_) |  _|
 |_|              |_||_| |_|\__,_|_| |_|\__, |\__,_|\__,_|\__, |\___|  \___/|_| 
     __     __       _     _ _ _        |___/             |___/                 
    / / __ / /__  __| | __| (_) |_                                              
   / / '__/ / _ \/ _` |/ _` | | __|                                             
  / /| | / /  __/ (_| | (_| | | |_                                              
 /_/ |_|/_/ \___|\__,_|\__,_|_|\__|                                             
                                                                                

Name: Anonymous 2013-02-04 2:03

>>22
R "programming" = ``/r/programming''
                  ▒████████████████████▒
              ░▓▓████████████████████████▓░░
            ▓██████████████████████████████████
         ▒██████████████████████████████████████░
       ░█████████████████████████████████████████▒
       ███████████████████████████████████████████░
      █████████████████████████████████████████████▓
   ░████████████████████████████████████████████████░
  ▓███████████████████▓▒░    ░███████████████████████
 █████████████████▒            ░▒▓████████████████████
 ██████████████▒░                 ████████████████████░
 ███████▓░                        ████████████████████▒
 ▓█████░                          █████████████████████
  ░███░          ░░               ░████████████████████░
    ██    ░   ░▓▓                   ░██████████████▓███
   ▓█▓ ░░░ ░░▒░  ▒▒▒░                 ▒██████████▓ ░ ░▒▒
   ▓█  ░  ▒▒ ░ ▓███████▓▓▓▓░           ▒████████▓ ▒    ▓▒
   ▒█   ███▓ ▓ █▓█▓███████████░         ███████░ ▒     ▒█
    ▒ ▒███▓ ▒▒       ░▒▒▒░▒▒██▒▒░       ▒████▒    ░     █
     ████░  ░░               ░░░        ▒███▒    ▓▒▒  ▓░░░
   ░████▒ ░      ░  ░▓█████░▓▒▓▒░        ░░░    ░░    ▓▒▒
   ███▓░   ░░▒▒  █   █▒░  ░░░░                  ░▒   ░▓▒▒
   ░█▓  ▒█████▓      ░░ ░░▒                      ▒   ▒▒ ▓
    ▒  ██▓   ▒▒░       ░                         ▓▒▒   ░▒
     ▒▓▓░ ░ ▒▒▓                                  ░░   ░▓
      █▒░░ ░░░▒                                      ░▒
      █   ░▒ ▒░     ░▒▒░░▒▒░                     ░▒░▓█▒
     ▒░  ░▒ ░▒         █   ▒▒░                   ▓  ██
     ▓   ▒  █     ▒░▒░░▒     ▒▒    ░▒            ▒  ██
     ▓   ▓ ▒▒▓░  ▓░           ░▓ ░ ░▓            ▓ ░█▓
     ▒░   ▒ ░░░         ░ ░    ░▒▒  ▓            █░▒█░
      ▓  ▒░      ░ ░░▒▓███████▓ ░▒  ▒░           ░░▓█░
      ░▓ ░▒  ░▒░░▒▓███▒▒ ░  ▒▒█▒▒▒  ▓             ░▓█
       ░▒ ▒  ▓██▓▓ ░   ▒░██████▒ ▓ ░▒            ░░▒
        ░▒ ░▒░██▓ ░▒█████████▒█  ▒ ▒             ░▒▒
         ░▒  ▒░░▓██████▓▒▒░░ ░   ▒░▒             ░░▒
           ▒▒ ▒░░ ▓▓░ ░     ▒    ▒▓              ▒ ▒░
            ░▒ ▒░░   ░ ░░▒░░    ▒▒▒            ░▓░ ▒░
              ▓ ▒   ░         ░▒░▒            ▒▒    █
               ▒▒▒            ░░ ▒           ▓░     ▒█
               ░▒                           ▒▒       ▒░
               ░▒              ▒                      ▒░
                ▓            ░▓░                      ▓▒▒
                 ▓         ▒▒▒                         █ ▓
                  ▒█░░▒░▒▒▒░                           █▓ ▒▒░
                  ▒▓▒░▒▓                                █░ ░░▒░
                ░▓  ▓   ▒                               ▒▒    ░▒▒
                ▓    ▓                                  ░▒      ▓░
               ▓░    ░▓                                 ▓░
               ░       ░                                ▓
                                                        ▒

Name: Anonymous 2013-02-04 2:07

>>23
That's pretty epic.
I'm a COBOL programmer btw ;)

Name: prog bumper 2013-02-04 4:42

bumping 'coz prog related

Don't change these.
Name: Email:
Entire Thread Thread List