Felipe Carrillo
2010-Apr-24 19:11 UTC
[R] how to import a dataframe with mixed text and numbers
Hi: I?need?help with a dataframe. is a mix of dates and text. I want to create a table either?using latex function from hmisc or xtable. I already know how to do this but the problem is getting the dataframe into R. I don't have a reproducible example?.?If someone is interested in helping with this task I could send the excel file?offlist. Thanks Date???????????????????????????? ?First?????????????????? Second?????????????????????? Third 2/26/2010 --------------------0 ( ? ) ----------------------0 ( ? ) ------------------7,002 (33 ? 39) 2/27/2010-------------------- n (0 ? 0) ------------------n (0 ? 0)--------------- n (0 ? 0) 2/28/2010-------------------?357 (123 ? 123)---------0 ( ? )------------------- 130,342 (29 ? 57) 3/1/2010 --------------------144 (95 ? 152)-------------99 (65 ? 71)-------- 22,741 (31 ? 56) 3/2/2010 -------------------73 (126 ? 152)--------------- 0 ( ? ) ----------------8,365 (31 ? 53) 3/3/2010 -------------------43 (108 ? 108)--------------- 86 (66 ? 76) --------5,962 (33 ? 60) 3/4/2010------------------- n (0 ? 0) -----------------------n (0 ? 0)---------------- n (0 ? 0) 3/5/2010 ------------------270 (101 ? 140)-------------- 0 ( ? ) -----------------22,461 (30 ? 61) 3/6/2010 ------------------121 (111 ? 112)--------------- 40 (66 ? 66)--------- 12,485 (31 ? 55) 3/7/2010 -----------------------0 ( ? ) -----------------------0 ( ? ) -------------------7,352 (31 ? 56) 3/8/2010 --------------------34 (111 ? 111)-------------- 33 (74 ? 74)------------ 2,908 (32 ? 48) Biweekly Lower 90% Confidence Interval ------------?? -537--------- -549 -------------35,097 Biweekly Total -------------1,425 ----------------------------402 -----------------------------296,085 Biweekly Upper 90% Confidence Interval ----------3,388 --------------1,353 -------------557,074 Brood-year? Lower 90% Confidence Interval ---------------2,578,499 ---------------74,306 ------------2,249,920 Brood Year Total ----------4,455,877------------------------ 314,206 -----------------------7,347,719 Brood-year Upper 90% Confidence Interval ---------------6,333,255 --------------541,552 ----------------12,058,021? ? Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish & Wildlife Service California, USA
Tal Galili
2010-Apr-25 07:09 UTC
[R] how to import a dataframe with mixed text and numbers
I would try using something like read.table with read.table(..., sep = "-------------------") And then clean the variables one by one (you'll need to search the mailing list for help on time variables. And also for ways to search and replace text - all exist as answers here) ----------------Contact Details:------------------------------------------------------- Contact me: Tal.Galili@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) ---------------------------------------------------------------------------------------------- On Sat, Apr 24, 2010 at 10:11 PM, Felipe Carrillo <mazatlanmexico@yahoo.com>wrote:> -------------------[[alternative HTML version deleted]]
Possibly Parallel Threads
- how to lmport this dataframe into R
- replace question mark with a dash
- warning message: coxme with package multcomp
- two lmer questions - formula with related variables and output interpretation
- data frame manipulation - splitting monitoring interval and assigning stage