[R] simple data.frame question
jholtman at gmail.com
Tue Oct 23 21:58:53 CEST 2007
Your first statement may create a data frame, but your second
statement now store a vector in an object with the same name, but is
now not a data frame, that is why it "appears" that the first row is
overwritten. What are you trying to do?
On 10/23/07, pharos <patrick_schmoellerl at yahoo.de> wrote:
> At first I have to admit that I'm quite new to R and need some basic
> information. Although I searched the internet and this forum where I found
> answers to really sophisticated questions, I couldn't find the answer to my
> really simple one - or I didn't understand it for English is not my
> I'm using Rpad to simulate a webserver on my PC. Further I've got an html
> <form> with some checkboxes/radiobuttons. My first code-chunk attempts to
> create a data.frame (but I don't know, if I've done it correct):
> [i]statistik <- data.frame(car = factor(), ubahn = factor () [...],
> quantity = numeric())[/i]
> When clicking on a button, I want to submit the values from the <form> to
> the data.frame.
> [i]statistik <- c(car, autobus, ubahn, strassenbahn, bicycle, walk,
> When clicking another buttons I want to show the saved values.
> What in fact happens is that by submiting the values, the first row of the
> data.frame is overwritten. At least that's what it looks like to me. If you
> need any further information, please let me know.
> I'd allready be happy if you could point out what's the exact place to look
> for in some kind of manual. Thanks for your help!
> View this message in context: http://www.nabble.com/simple-data.frame-question-tf4679785.html#a13371775
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
+1 513 646 9390
What is the problem you are trying to solve?
More information about the R-help