Displaying 20 results from an estimated 26 matches for "yourdatafram".
Did you mean:
yourdataframe
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
2012 Mar 02
1
data frame of strings formatted
Hello,
I have another question....
I have a data frame that looks like this:
a b
2007-03-31 "20070514" "20070410"
2007-06-30 "20070814" "20070709"
2007-09-30 "20071115" "20071009"
2007-12-31 "20080213" "20080109"
2008-03-31 "20080514" "20080407"
2008-06-30
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
2017 Jun 01
0
Data import R: some explanatory variables not showing up correctly in summary
...e first case the duplicates probably represent cases in your source data (a spreadsheet?), where you have inadvertently put a space at the end of the label, e.g. "combination", and "combination ". The answers to both questions are easy to find with the levels() function:
levels(yourdataframe$Position)
This will list all of the factor levels in variable Position for you. If there are extras spaces and you were using read.csv() to import the data, use the strip.white=TRUE argument to delete leading and trailing spaces. This is also documented on the manual page for function read.csv()...
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
2005 Dec 07
1
KMO sampling adequacy and SPSS -- partial solution
...cor(df)^2
cor.sumsq = (sum(cor.sq)-dim(cor.sq)[1])/2
library(corpcor)
pcor.sq = cor2pcor(cor(df))^2
pcor.sumsq = (sum(pcor.sq)-dim(pcor.sq)[1])/2
kmo = sus.cor.ss/(sus.cor.ss+sus.pcor.ss)
return(kmo)
}
Also, for those trying to reproduce the SPSS factor analysis output,
(-1 * cor2pcor(cor(yourDataFrame))) will produce the "anti-image
correlation" matrix. Unfortunately, the most useful property of that
matrix in SPSS is that the diagonals represent the individual MSA
values -- I haven't found a way to derive those yet. Still working on
that, any suggestions appreciated.
--A...
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
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
2007 Oct 25
2
the difference between temp and .temp
...What would be the advantages to doing so?
Thanks in advance for what will surely be a collection of illuminating
responses.
tim
On 10/25/07, jim holtman <jholtman at gmail.com> wrote:
> Actually I forgot you have a data frame. so use:
>
> for (i in 1:18){
> .temp <- yourDataFrame[[paste('b', i, sep='')]]
> .... use .temp ....
> }
>
>
> On 10/24/07, DEEPANKAR BASU <basu.15 at osu.edu> wrote:
> > Hi All,
> >
> > I have a data frame with a group of variables named b1, b2, b3, ..., b18. These variables take the value...
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
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?