Displaying 20 results from an estimated 800 matches similar to: "Use of ifelse for indicating specific rownumber"
2009 Feb 13
2
extracting parts of words or extraxting letter to use in ifelse-func.
Hello
I want to make some variables with the ifelse-function, but i don't know how
to do it.
I want to make these five variables;
b2$PRRSvac <- ifelse(b2$status=='A' | b2$status=='Aa',1,0)
b2$PRRSdk <- ifelse(b2$status=='B' | b2$status=='Bb',1,0)
b2$sanVac <- ifelse(b2$status=='C' | b2$status=='sanAa',1,0)
b2$sanDk <-
2006 Sep 10
2
rownumber
# R 2.3.1
I read the data set into R, but the data set have two rows per record.
i.e.
.........
105 1 1 1103 1 5 4 8 5 22
105 2 2 2 2 1 2 17 16 26
106 1 2 606 1 5 12 11 9 37
106 2 2 2 2 2 2 16 14 29
2012 Feb 13
1
only 0s may be mixed with negative subscripts
I'd like to get the sum of every other row in a data.frame. When I
actually set about doing this, I get the error in the subject line of
this message. A sample of my data is below, followed by the function
call that should give me the results I want:
> dput(head(sens2))
structure(list(Time = c(1328565067, 1328565067.05, 1328565067.1,
1328565067.15, 1328565067.2, 1328565067.25), Y =
2009 Feb 20
1
Using "rep", but don't know what to put after each =
Hello
I have one DF (detheleny1periode), with some variables that mathes, in some
way, variables in another DF (y2).
The DF named detheleny1periode look like this (i have not included alle
variables):
CHR_NR diffdatoperiode
11377 29
11377 59
11377 78
with many different CHR_NR's.
And the other DF named y2 look like this (i have not
2012 Jun 15
0
argument "x" is missing, with no default - Please help find argument x
R programming question, not machine learning, although that's the content.
Apologies to all for whom the following code is eye-burning. I am using
foreach() to run a simulation on a randomForest model (actually conditional
randomForest ... "party" package). The simulation is in two dimensions.
examining how "mtry" and "ntrees" are related in terms of predictive
2005 Jul 13
1
help: how to plot a circle on the scatter plot
Hello,
I have a data set with 15 variables, and use "pairs" to plot the
scatterplot of this data set. Then I want to plot some circles on the
small pictures with high correlation(e.g. > 0.9).
First, I use "cor" to obtain the corresponding correlation matrix (x)
for this scatterplot.
Second, use "seq(along = x)[x > 0.9]" to find the positions of the
small
2005 Sep 26
3
How to get the rowindices without using which?
Hi,
I was wondering if it is possible to get the
rowindices without using the function "which" because
I don't have a restriction criteria. Here's an example
of what I mean:
# take 10 randomly selected instances
iris[sample(1:nrow(iris), 10),]
# output
Sepal.Length Sepal.Width Petal.Length Petal.Width
Species
76 6.6 3.0 4.4 1.4
2009 Feb 13
0
Odp: Odp: extracting parts of words or extraxting letter to use in ifelse-func.
Hi
johannes at dsr.life.ku.dk napsal dne 13.02.2009 13:17:06:
> Hi
>
> I tried what you said, but i gives FALSE all the way down! And I think
its
> because there are other words in phrases as well. So if there is 'San'
> in the phrase it has to be TRUE even thoug there are other words before
and
> after 'San' in the phrase.
I do not understand.
>
2001 Oct 03
1
package GeneSOM ?
Hello Rprofessionals,
The SOM-Obj works very well, when i normalize
my data and the plot-function, too !
But i miss or didn't find the possibility , extract the
information from the SOMplot "clusterSize" and "mean" for every cluster as quantitative information ( i.e. the DataFrame with an additional column which
define the calculate clusters from SOM)?
My intention -
2003 Sep 02
1
package xtable
Hi,
How can I avoid xtable of printing rownumbers when exporting a
data.frame ?
Are there more packages that deal with LaTeX besides xtable and Sweave ?
Thanks
EJ
2008 Aug 11
2
sampling
Hello,
I have a matrix and I want to sample 20 rows that are the the percentiles of
0-100 in 0.05 increments. I have a vector of my sequence
(0, 0.05, 0.10, 0.15,....1.0) and also
a normalised vector of rownumbers. That is, there are 234 rows (for
example) so I do
perc<-c(1:234/234)
which looks like a bunch of numbers from 0 - 1.
In Excel (which I try not to use at every possible
2005 Apr 23
2
streaming single mp3 files
I am new to this list, so this question is already answered.
I thougth that if <webroot> and <fileserve> is set in icecast.xml i
could stream
mp3 files by http-protocol like
http://occ1.net:8003/modules/media/gallery/music/alternativerock/mab/emphasizedlove.mp3.
But it didnt work.
I have setup icecast and ices to stream *.m3u and that worked.
So my setup should be correct.
2007 Sep 06
3
kendall test
Hello,
I thougth that there is a function which does the kendall test in R,
I writed on the console apropos("kendall") and I didn't found anything can you tell me how could I do to use the kendall test?
Thanks.
_____________________________________________________________________________
l
[[alternative HTML version deleted]]
2004 Aug 06
2
what happens to a client when a streams source dissapears
Heyas all,
I've had a good root round in the docs but cant seem to find an answer to
this:
2009 Jan 26
2
Getting data from a PDF-file into R
Hello
I have around 200 PDF-documents, containing data i want organized in R as a
dataframe. The PDF-documents look like this;
http://www.nabble.com/file/p21667074/PRRS-billede%2Bmed%2Bfarver.jpeg
or like this;
http://www.nabble.com/file/p21667074/PRRS-billede%2Bmed%2Bfarver%2B2.jpeg
So i want to pull out the data in coloured boxes it become organized like
this (just in R instead of
2009 Apr 22
3
Merging data frames, or one column/vector with a data frame filling out empty rows with NA's
Hello
I have two data frames, SNP4 and SNP1:
> head(SNP4)
Animal Marker Y
3213 194073197 P1001 0.021088
1295 194073197 P1002 0.021088
915 194073197 P1004 0.021088
2833 194073197 P1005 0.021088
1487 194073197 P1006 0.021088
1885 194073197 P1007 0.021088
> head(SNP1)
Animal Marker x
3213 194073197 P1001 2
1295 194073197 P1002 1
915 194073197
2001 Sep 04
2
Installing Direct X 8.0 under Wine
Hi NG
I desperately try to install Direct X 8 under my wine.
I know from Websites that it was possible to install Directx 7.X
So i thougth there should be a way to get 8 to work too, the NG search
brougth nothing about this topic.
Im running a Suse 7.2 System with all Updates available including
newest Wine.
But if i try to start it the installer always tells me that its not pos. to
install
2011 Aug 02
1
cant get wine on Centos 5.6
i have look thougth all the guides to get wine every time i run "yum install wine"
it will say
Code:
[root at subaru-1 Toushirou]# yum install wine
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* base: mirror.cogentco.com
* extras: mirror.umoss.org
* updates: mirror.cogentco.com
Setting up Install Process
No package wine available.
Nothing to do
2002 May 14
1
probs in memory
Hi
I'm running a glm analysis and I got the following message:
glm.i01<-glm(U~y+v+i+b+v:y+v:i+v:b+y:i+y:b+i:b,family=Gamma(link="log"))
Error: cannot allocate vector of size 153594 Kb
I thougth this was not suppose to happen in version 1.5 ?! How can I
solve this problem ?? Can this a problem of swap space ?? My machine is
a pentium III 833 with 512MB of RAM and I'm using
2006 Jun 27
1
weights in multinom
Best R Help,
I like to estimate a Multinomial Logit Model with 10 Classes. The
problem is that the number of observations differs a lot over the 10
classes:
Class | num. Observations
A | 373
B | 631
C | 171
D | 700
E | 87
F | 249
G | 138
H | 133
I | 162
J | 407
Total: 3051
Where my data looks like:
x1 x2 x3 x4 Class
1 1,02 2 1 A
2 7,2 1 5 B
3 4,2 1 4 H
1 4,1 1 8 F
2 2,4 3 7 D
1 1,2 0 4 J
2 0,9