Displaying 20 results from an estimated 124 matches for "yourdata".
2013 Jan 01
1
Order variables automatically
Hi,
I have a dataset with 6 categorical variables. I have used this following code to make the variables u1-u6 ordered factors and this works well.
cat1cat2 cat3 cat4 cat5 cat6
? 0 ? ?? 1 ? ? 1????? 0 ??? 0? ?? 1
? 1 ? ?? 1 ? ? 0 ? ?? 0 ? ? 0 ? ? 0
.......
....
############
data<-read,table("example.txt")
data <- as.data.frame(lapply(data, ordered))
############
Now,
2007 Jan 21
1
identify selected substances across individuals
An embedded and charset-unspecified text was scrubbed...
Name: inte tillg?nglig
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070121/436ed377/attachment.pl
2011 Mar 21
3
Computing row differences in new columns
Hi
I have the following columns with dates and results, sorted by subject and date. I'd like to compute the differences in dates and results for each patient, based on the previous row. Obviously the last entry for each subject should be a NA.
Which would be the best way to accomplished that ?
I guess questions like that have been already answered a thousand times, so I apologize for
2013 Jan 17
1
Help with interpolation
hi guys
I need to interpolate values for the zero coupon yield curve. Following data
is given
date days rate
1996 01
2012 Nov 05
1
Plot 3 lines in one graph
I'm new with R. I want to plot 3 lines in one graph. This is my data:
print(x)
V1 V2 V3 V41 -4800 25195.73 7415.219 7264.282
-2800 15195.73 5415.219 7264.28
I tried using matplot, but I cannot get exactly what I want. This is what I
get, and this is my code:
matplot(x[,1],x[,-1],type='b', xlab = "epsilon_h",
ylab = "Value2", xlim=
2011 Jun 22
1
Subsetting data systematically
I would like to subset data from a larger dataset and generate a smaller
dataset. However, I don't want to use sample() because it does it randomly.
I would like to take non-random subsamples, for example, every 2nd number,
or every 3rd number. Is there a procedure that does this?
Thanks, Nate
--
View this message in context:
2007 Jan 23
3
Query about extracting subsets from a table
Hi
I am trying to process tabular data as follows:
Data in the input file is of the form
genome1 genome2 tree-dist log10escore
Genome1 and genome2 are alphabetic.
Tree-dist and log10escore are numeric.
I wish to extract only those rows from this table
where the log10escore is less than -3.
data <-read.table(filename);
data$log10escore = data$log10escore[ data$log10escore
< -3];
I
2010 Feb 23
3
how to rearrange a dataframe
Hi all,
I'd appreciate if anyone can help me with this...
I have a data frame that looks like this:
1 + name1 1 2 3
2 + name2 5 9 10
2 - name3 56 74 93
1 - name4 65 75 98
I need to rearrange this in a way so that the rows with "1" in the
first column, and "-" in the second column; then columns 4 and 6
should switch places. That is, column 6 would be now column 4 and
2010 Jul 26
1
After writing data in MMF using SEXP structure, can i reference in R?
...ot;)
> dat[ , "strongest"] <- as.numeric(dat[ , "strongest"])
> dat[ , "secondstrongest"] <- as.numeric(dat[ , "secondstrongest"])
> return(dat)
>}
>
>
>#Using your example data:
>
>yourdata <- structure(list(value0 = c(-13007L, -12838L, -12880L, -12805L,
>-12834L, -11068L, -12807L, -12770L, -12988L, -11779L), value60 =
c(-11707L,
>-13210L, -11778L, -11653L, -13527L, -11698L, -14068L, -11665L,
>-11736L, -12873L), value120 = c(-11072L, -11176L, -11113L, -...
2010 Jul 24
4
Trouble retrieving the second largest value from each row of a data.frame
I have a data frame with a couple million lines and want to retrieve the largest and second largest values in each row, along with the label of the column these values are in. For example
row 1
strongest=-11072
secondstrongest=-11707
strongestantenna=value120
secondstrongantenna=value60
Below is the code I am using and a truncated data.frame. Retrieving the largest value was easy, but I have
2008 Feb 14
1
deleting certain observations in a data frame
Hi, I'm wondering what the fastest way is to delete certain data points (observations) in a data frame.
I have a vector of the indices/row.names I would like to delete. I have tried replacing list by list, but it always complains about different lengths, "replacing list of length a with length b" and so on.
Another way to think of it is that it's a generazation of na.rm I
2009 Aug 12
1
to extract a section of the matrix
HI,
i have this matrix and i want to extract a section of the matrix which present the first and second value of optim position:
OptimYear LRPhase PriorLRPosition OptimPosition LRPosition
5 2009 1 1.15641679414676 0.33037984561357 1
6
2008 Aug 27
2
r function for calculating extreme spread in group
I'm trying to figure out how to write a r function that will calculate
the extreme spread of a group of points given their (x,y)
coordinates. Extreme Spread is the maximal Euclidean distance between
two points in a group
ex.spread = max{ sqrt [ (xi-xj)^2 - (yi-yj)^2 ] } for i not equal to j
I have 60 levels to apply this to.
There is the combination function in the dprep package but
2012 Feb 08
3
R equivalent of Python str()?
Hi,
I was wondering if there's a function in R that is meant to return a
string representation of an object. Basically, it's like print() but
it doesn't print anything, it only returns a string.
I know there's a str() function but it's not quite the same. I mean a
function that returns the same string that print() would display.
--
Bye,
Ernest
2011 Nov 23
0
R: Problems using log() in a plm() regression.
...her 'plm' users on the list:
- the problem turned out to be logs of zero values hidden in the big dataset
- trying log(xx) would not reveal the problem, because log(0)=-Inf is a valid result in log() while it is an invalid input to plm()
--> it is always advisable to try lm(yourformula, yourdata) as a first diagnostic check when plm(yourformula, yourdata, ...) fails: the result should be the same as plm(yourformula, yourdata, model="pooling"); or, for more complicated instances, a more specific "computationally robust" counterpart is lme() from 'nlme'.
Best,
Gi...
2013 Mar 09
2
grouping followed by finding frequent patterns in R
I have a data in the following form :
CIN TRN_TYP
9079954 1
9079954 2
9079954 3
9079954 4
9079954 5
9079954 4
9079954 5
9079954 6
9079954 7
9079954 8
9079954 9
9079954 9
. .
. .
. .
there are 100 types of CIN (9079954,12441087,15246633,...) and respective
TRN_TYP
first of all, I want this data to be
2008 Apr 23
3
select rows from data based on a vector of char strings
Hi,
I have loaded a dataset in R :
data =
label freq1 freq2
news 54 35
fun 37 21
milk 19 7
food 3 3
.... etc
And I have a vector
flist<-c("fun","food")
Now I want to use the vector 'flist' for selecting these values from 'data'
so that I get the following dataset :
label freq1 freq2
fun 37 21
food
2013 Mar 11
3
New Stack
Hi Experts, I am newbie in R. Could you please share your idea to create a stack with no value or zero value? Nrow=1,Ncol=1, Ncell=1, I aim to work with looping, I want to make a first layer with zero values to add other layers further. Thanks.
Best Regards,
..................Anup KhanalNorwegian Institute of science and Technology (NTNU)Trondheim, NorwayMob:(+47) 45174313
2017 Oct 13
2
How to define proper breaks in RFM analysis
> On Oct 13, 2017, at 2:51 AM, PIKAL Petr <petr.pikal at precheza.cz> wrote:
>
> Hi
>
> You expect us to solve your problem but you ignore advice already recieved.
>
> Your data are unreadable, use dput(yourdata) instead. see ?dput
>
>> test<-read.table("clipboard", heade=T)
> Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
> line 115 did not have 6 elements
I didn't have such a problem: (illustrated with a more minimal example)
dat <-...
2012 Aug 04
3
Questionnaire Analysis virtually without continuous Variables
Hello!
I am doing an analysis on a questionnaire of hunters taken in 4
different districts of some mysterious foreign country. The aim of the
study was to gather info on the factors that determine the hunting
success of a peculiarly beautiful bird in that area. All variables are
factors, i.e. they are variables such as "Use of Guns - yes / no", "Use
of Dogs - yes / no" and