[R] How to add a new row in to an existing data set in R Language?

2012-10-03 Thread killerkarthick
Hi...
I have one 2 data set with 3 variables and 4 observations. I want to combine
the two data sets. I tried with merge but it gives only the common values. I
need common values and and remaining values also. Please help me?
this is my data set
dataset:1
nameva1 va2
AA  10  100
BB  20  200
CC  30  300
DD  40  400

dataset:2
nameva1 va2
AA  36  444
BB  10  111
CC  20  222
DD  NA  333
Please reply me.



--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-add-a-new-row-in-to-an-existing-data-set-in-R-Language-tp4644855.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] sorting dataframe

2012-10-03 Thread killerkarthick
Please show the data set...



--
View this message in context: 
http://r.789695.n4.nabble.com/sorting-dataframe-tp840507p4644857.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to add a new row in to an existing data set in R Language?

2012-10-04 Thread killerkarthick
Hi Ista Zahn,
 Thanks for your advice. Please see the
following Image.




 






 i am expecting the result should same in the image. 




--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-add-a-new-row-in-to-an-existing-data-set-in-R-Language-tp4644855p4645113.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to add a new row in to an existing data set in R Language?

2012-10-04 Thread killerkarthick
Hi.
I have one dataset with 3 variables with 4 observations. I want to add the
some more observation into the existing dataset.
Data;Mydata
center  drugchange
101 P   18
102 P   14
103 D   12
104 D   18
105 P   10
 This is the data set. So I want to add some more rows to the existing
dataset that rows are
106 P   17
107 D   18
108 D   NA
109 P   13
110 P   12
Without using any combine functions. This is possible?
Please reply me...



--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-add-a-new-row-in-to-an-existing-data-set-in-R-Language-tp4645114.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to add a new row in to an existing data set in R Language?

2012-10-04 Thread killerkarthick
Thanks for your answer Arun,
That above image  shows the merge in SAS but its possible as same in R
please reply me let me know?



--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-merge-data-set-in-R-Language-tp4644855p4645119.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to remove the obs column in R?

2012-10-07 Thread killerkarthick
>From the following image I need to remove the obs column for my documentation
purpose.Please reply me..
 



--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-remove-the-obs-column-in-R-tp4645382.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to create a table with borders?

2012-10-08 Thread killerkarthick
Hi..
I tried to create a table with borders. But I am not able to
create. I tried to use *latex()* function but it showing in a different
please help me to create tables?

the output comes  as follows 
> rdata
   subject sex condition before afterchange
11   F   placebo   10.1   6.9 31.683168
22   F   placebo6.3   4.2 33.33
33   M   aspirin   12.4   6.3 49.193548
44   F   placebo8.1   6.1 24.691358
55   M   aspirin   15.2   9.9 34.868421
66   F   aspirin   10.9   7.0 35.779817
77   F   aspirin   11.6   8.5 26.724138
88   M   aspirin9.5   3.0 68.421053
99   F   placebo   11.5   9.0 21.739130
10  10   M   placebo   11.9  11.0  7.563025
> tab<-tabular( (condition + 1) ~ (n=1) + Format(digits=2)*
+   (before + after)*(mean + sd), data=rdata )
> tab

  before  after 
 condition n  mean   sd   mean  sd  
 aspirin5 11.92.1  6.9   2.6
 placebo5  9.62.4  7.4   2.6
 All   10 10.82.4  7.2   2.5
> latex(tab)
\begin{tabular}{lc}
\toprule
 &  & \multicolumn{2}{c}{before} & \multicolumn{2}{c}{after} \\
\cmidrule(lr){3-4}\cmidrule(lr){5-6}
condition  & n & mean & sd & mean & sd \\ 
\midrule
aspirin  & $\phantom{0}5$ & $11.9$ & $\phantom{0}2.1$ & $\phantom{0}6.9$ &
$\phantom{0}2.6$ \\
placebo  & $\phantom{0}5$ & $\phantom{0}9.6$ & $\phantom{0}2.4$ &
$\phantom{0}7.4$ & $\phantom{0}2.6$ \\
All  & $10$ & $10.8$ & $\phantom{0}2.4$ & $\phantom{0}7.2$ &
$\phantom{0}2.5$ \\
\bottomrule 
\end{tabular}
>




--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-create-a-table-with-borders-tp4645470.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to create a table with borders?

2012-10-09 Thread killerkarthick
Thanks arun,
   But what is the alternative solution in windows. Please
reply me.



--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-create-a-table-with-borders-tp4645470p4645527.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to import data from text file using scan() Function?

2012-10-18 Thread killerkarthick
Hi
 I have one text file which containing 4 variables with 10 observations.
I would like to import with scan() function. Please give some
suggestion
Thanks...
Mydata set is.

id  namesex age
111 HELEN   f   22
112 DONNA   f   22
113 ERICm   21
114 LINDA   f   23
115 AXELm   27
116 Madhuri f   32
117 Tarun   m   39
118 Aashiryaf   23
119 Nachik  m   24
120 Leena   f   32



--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-import-data-from-text-file-using-scan-Function-tp4646611.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to find the lenth of more than ten variables?

2012-12-02 Thread killerkarthick
Hi
I have one data set with 20 variables. I want to find the length of each
variables at a time. Please help me ..
Thanks in advance




--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-find-the-lenth-of-more-than-ten-variables-tp4651751.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.