similar to: data frame of strings formatted

Displaying 20 results from an estimated 1000 matches similar to: "data frame of strings formatted"

2012 Mar 05
1
index instead of loop?
Hello, Does anyone know of a way I can speed this up? Basically I'm attempting to get the data item on the same row as the report date for each report date available. In reality, I have over 11k of columns, not just A, B, C, D and I have to do that over 100 times. My solution is slow, but it works. The loop is slow because of merge. # create sample data z.dates =
2012 Mar 03
0
removing data look-ahead, something faster.
Hello, Thank you for your help/advice! The issue here is speed/efficiency. I can do what I want, but its really slow. The goal is to have the ability to do calculations on my data and have it adjusted for look-ahead. I see two ways to do this: (I'm open to more ideas. My terminology: Unadjusted = values not adjusted for look-ahead bias; adjusted = values adjusted for look-ahead bias.) 1) I
2009 Nov 16
5
Writing a data frame in an excel file
Hello, I am having trouble by using the write.table function to write a data frame of 4 columns and 7530 rows. I don?t know if I should just use a sep="\n" and change the .xls file into a .csv file. Thanks in advance ----- Anna Lippel new in R so be careful I should be asking a loooooooot of questions!:teeth: -- View this message in context:
2007 May 04
1
R question
I had a question about Random Forests. I have a text file with 10 dichotomous variables and a bivariate response vector. I read this file into R as a data frame, and then used the command "randomForest(Response ~., dataset, etc.." where "Response" is the column header of the response variable and "dataset" is the name of the data frame. I get an error that says
2010 Aug 04
1
Carriage return character issue
Hi all, I imported a file (in CSV format) into R for processing, then imported the result into MySQL. However, there are *carriage return* characters (hexadecimal: *0D*) that are appended to the characters in the last field of the table. i.e *\r* appended to the character values (as shown below) Before importing into MySQL: asdf After importing into MySQL: asdf*\r* ** ** Are there any options
2006 Jul 29
1
DOE in R
Hi. I'm a student in a graduate program at Simon Fraser University in Canada. I am trying to run a simple screening experiment with some simulated data. I simply want to do an ANOVA of an experiemnt with 5 factors (4 have 2 levels, the last has 3 levels) and 48 runs (ie, full factorial). The thing is that I have multiple observations for each level combination (run). So, 1) How do I do
2010 Apr 27
4
Selecting rows based on contents of string
Hi there, I have a data frame with a column named "Flags", whose contents are strings containing any of the following characters, multiple characters allowed: A,B,C,D,E,F,G. Here is the head: GeocodeID PlaceID CountyCode CBSACode StateProvCode PropertyTypeGroupID Flags 1 0 0 0 0 AK 1 ABC 2
2012 May 02
2
selection by two unique variables
Dear Group, I am working with a large dataset where I need to select for each unique id the the unique lastpk row. Here is a sample subject: id wtdt wt lastpk 64050256 2010-09-18 275 2010-09-16 64050256 2010-09-19 277 2010-09-18 64050256 2010-09-20 272 2010-09-18 64050256 2010-09-21 277 2010-09-18 I want the result as:
2010 Dec 24
4
Removing rows with earlier dates
Hi all, I'm new to the list but have benfited from it quite extensively. Straight to my rather strange question: I have a data frame that contains mapping rules in this way: ACCOUNT, RULE COLUMNS, Effective Date The dataframe comes from a database that stores all dates. What I would like to do is to create a data frame with only the most recent rule for each account. In traditional
2010 Jan 13
4
a question about deleting rows
I have a file like this: id n1 n2 n3 n4 n5 n6 1 3 4 7 8 10 2 2 4 1 2 4 3 10 3 7 0 0 0 0 8 4 10 1 0 0 2 3 5 11 1 0 0 0 5 what I want to do is: only if n2=0 and n3=0 and n4=0 and n5=0 then delete the row. how can I do that? thank you, karena -- View this message
2008 Aug 24
1
Plotting 3 way Anova
Hi I'd really like to get a bar plot showing the means of my anova data. I have looked everywhere and can only seem to find instructions for 2 way anova's. I basically want to look at the mean condition of my subjects spilt by age, sex and year (as a factor rather than a continuous variable, hence Anova and not Ancova). and want to show it firstly as a bar graph with standard error. I
2003 Dec 11
1
plot of survival probability vs. covariate
Hi everyone, I am fitting a cox proportional hazard model with a continuous variable "x" as the covariate: fit<-coxph(Surv(time, status)~x) Now I wanted to make a plot of survival probability vs. the covariate, and the 95% confidence interval for the survival probability. It's just like a Kaplan-Meier Survival curve, except now the x axis represents the value of covariate, not
2012 May 25
2
Query about creating time sequences
Hi All, I have a query about time based sequences. I know such questions have been asked a lot on forums, but I couldnt find the exact thing that I was looking for. I want to create a time-based sequence which will mimic the trading window AND would span multiple days. Something like below: "2011-01-03 09:15:00 IST" "2011-01-03 09:15:01 IST" .... .... .... "2011-01-03
2007 Oct 24
3
how to loop over a group of variables?
Hi All, I have a data frame with a group of variables named b1, b2, b3, ..., b18. These variables take the value 1, 2 or NA. For each observation, I want to do some computation by looping over the values for the group of variables: b1 to b18. In STATA I would do: forval i=1/18 { --- use b`i' for computation ---- } How can this be done in R? Deepankar
2012 Feb 13
3
Change dataframe-structure
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120213/d2a5afa6/attachment.pl>
2010 Sep 17
2
grouping dataframe entries using a categorical variable
DearR Users, I have a problem which I think you might be able to help. I have a dataframe which I'm trying to "filter" following different groups I specified. It's a little hard to explain, so here is an example: My dataframe: ESS DHP 1 EPB 22 2 SAB 10 3 SAB 20 4 BOJ 14 5 ERS 28 11 SAB 10 12 SAB 22 13 BOJ 26 20 SAB 10 21 SAB 22 22 BOJ 32 29 SAB 14 30 SAB
2017 Jun 01
0
Data import R: some explanatory variables not showing up correctly in summary
It looks like your printouts are based on the R summary() function? The function lists the number of cases in the 5 largest categories when the variable is coded as a function. Then it indicates how many other categories are present. This is described on the manual page for function summary(). In the first case the duplicates probably represent cases in your source data (a spreadsheet?), where
2010 Dec 09
4
lapply getting names of the list
Hello All, I have a toy dataframe like this. It has 8 columns separated by tab. Name SampleID Al1 Al2 X Y R Th rs191191 A1 A B 0.999 0.09 0.78 0.090 abc928291 A1 B J 0.3838 0.3839 0.028 0.888 abcnab A1 H K 0.3939 0.939 0.3939 0.77 rx82922 B1 J K 0.3838 0.393
2012 Jul 03
2
NADA Data Frame Format: Wide or Long?
I have water chemistry data with censored values (i.e., those less than reporting levels) in a data frame with a narrow (i.e., database table) format. The structure is: $ site : Factor w/ 64 levels "D-1","D-2","D-3",..: 1 1 1 1 1 1 1 1 ... $ sampdate: Date, format: "2007-12-12" "2007-12-12" ... $ preeq0 : logi TRUE TRUE TRUE TRUE TRUE
2016 Apr 21
1
plot 8 functions on one graph?
I'm trying to use ggplot to make a single graph that plots 8 distributions, one above the other. I created a data.frame with 9 rows. The first is the coordinate along the x-axis. The next is the y-values for the first distribution. After that is the y-values for the next distribution... and so on. How do I call ggplot to use such a data.frame to make a single graph of 8 distributions?