search for: your_data_frame

Displaying 6 results from an estimated 6 matches for "your_data_frame".

2011 May 05
4
Using functions/loops for repetitive commands
I still need to do some repetitive statistical analysis on some outcomes from a dataset. Take the following as an example; id sex hiv age famsize bmi resprate 1 M Pos 23 2 16 15 2 F Neg 24 5 18 14 3 F Pos 56 14 23 24 4 F Pos 67 3 33 31 5 M Neg 34 2 21 23 I want to know if there are statistically detectable differences in all of the continuous variables in
2007 May 08
3
Median
Hello. I need calculate the median of several column of a data.frame, in a new column of this data frame, but the median operator only calculate from a vector. I have made a functionc that calculate the median but it is very slow. Are there any method in any package to calculate this? Best regards. Jose Sierra. A B C -0.01678042
2003 May 19
1
Line plots with different symbols on the same line
Hello, my data is an ordered list of observations where each observation is either of condition "efficient" (coded as 1) or "non-efficient" (0) as e.g. No. Obs Condition 1 1.1 0 2 1.2 1 3 1.4 1 4 1.5 0 5 2.5 1 etc. My goal is to plot a single line with lty='o' but different symbols for either condition whenever condition is 1 or 0, i.e. on the x-axis the
2007 Aug 29
1
Converting into time series object
Hi, I have a dataframe of trading dates along with the corresponding prices. I need to convert this into a time series object. How do I do this with my price values being the time series object and the dates/time being the trading dates. BR, Shubha [[alternative HTML version deleted]]
2011 Oct 09
2
variable name question
Hi All, This is surely an easy question but somehow I am not being able to get it. I am using R 2.13.2 and have a data set where variable names like this appear: pci1990, pci1991, ... , pci2009. "pci1990" has data on per capita income for 1990, "pci1991" has data on per capita income for 1991, and so on. I would like to create the logarithm of per capita for each of the
2006 Apr 14
2
another very simple loop question
I have a dataset with 4 years of students, and normally I want to estimate things using each individual year, so I have a for loop as follows for (i in 1:4){} However, the only way I know how to calculate estimates using all four years of data is to put the estimations outside of the loop. Is there anyway to make a for loop that uses all four years at once, then uses each individual year?