[R] how can get rid of the level in the table

2005-04-15 Thread Cuichang Zhao
hello, 1. when i get a column data from a table, it always follows with the level. for exmaple if i have a table = (v1, v2), and table$v1 = (1, 2, 3); and col1 - table$v1; then there is level assign to the table, with 1 is level1 and 2 is level2 3 is level3 ect. however, when are want to get

[R] String in data frame

2005-04-15 Thread Cuichang Zhao
, bal), instead it outputs (NA, 1), if i keep #adding a to the namelist, it keeps adding 1 to the namelist instead of bal. However, i want to add bal to the namelist, not 1, so how i can do this? Thank you very much. Cuichang Zhao April 15, 2005

[R] how to separate a string

2005-04-13 Thread Cuichang Zhao
hello, i wonder how is string represent in R. if i have a string s= hello, how can i refer to first character in the string s? also if i have s1 = hello.1, s2 = ok.1, how can i separate the s1 into hello 1 and s2 into ok and 1? I have tried to use the substring function, but i don't where i

[R] how i can get input from user input

2005-03-29 Thread Cuichang Zhao
Hello, Could you please tell me how i can get an input from the user in R? C-Ming Mar 29, 2005 - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

[R] how can i make my program faster

2005-02-13 Thread Cuichang Zhao
Hello, right now, i have a program to collect data into a table. right now, my table is table1 - data.frame(trial = NA, x = NA, y = NA) for each time when i want to add data into my data, i have to copy data of table into an array for each column, and then i add new data into my array, then i

[R] table in R

2005-02-10 Thread Cuichang Zhao
Hello, I want to build some tables in my project using R, does R have some tables form that I can use? if i use the internal R table, how can initial a table before I use it? I want to my tables to have some columns, for example: (trial, x, y, goal) I want to put these columns into my tables,

[R] modular in R

2005-01-25 Thread Cuichang Zhao
hello, i wonder what command should i used in R to do the modular. right now i have a vector v - c(3, 4, 5, 6), but i have tried v%2 or v mod 2 or mod(v, 2) or modular(v, 2), and none of these works. Also, how can i find more function command online, i have to search in the mailing list

[R] plot function

2005-01-25 Thread Cuichang Zhao
seem not working if i only use lines(x, y). Thank you so much. Cuichang Zhao Jan 25, 2005 - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

[R] read data from a file and vector expansion

2005-01-24 Thread Cuichang Zhao
hello, if i need to read data from a file one line and one how can do? I am using lines - (input.txt) so that now the variable lines holds all the data in my file and i am using for loop to loop each lines[i] to get each line. for exmaple, right now my lines[i] = 1 2 3 44 54 23 24 I am wonder

[R] more question

2005-01-24 Thread Cuichang Zhao
Hello, thank you very much for your help in last email. it is very helpful. right now, i have more questions about my project, 1. solve can i remove the NA from a vectors: for exmample, if my vector is: v - (NA, 1, 2, 3, 4, 5) how can I remove the NA from vector v 2. how I can get input from