[R] Merging data frames, or one column/vector with a data frame filling out empty rows with NA's

2009-04-22 Thread joe1985
Hello I have two data frames, SNP4 and SNP1: > head(SNP4) Animal MarkerY 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)

[R] Find common Markers for all animals in data frame

2009-04-16 Thread joe1985
Hello I have a data frame looking like this; > head(SNP2) AnimalMarker All1 All2 x 3213 194073197 P1001222 1295 194073197 P1002121 0915 194073197 P1004222 2833 194073197 P1005110 1487 194073197 P1006222 1885 19407

[R] Making a prediction model from a plot

2009-03-11 Thread joe1985
Hello I have plot looking like this: http://www.nabble.com/file/p22453304/Index%2Bgraf.jpeg Where each continues line corresponds to a period og days, and each break on the line corresponds to a shift in the index level. So what i thought about was, is it possible to make a model predicting

[R] Incorporating cumsum in for loop

2009-02-26 Thread joe1985
Hello Hello i have this DF: > c CHR_NR diffdato1 x 1022 10395 1994-05-3011.0 39 0 1994 1 1 0 024 11 24 29100 11377

[R] Using "rep", but don't know what to put after each =

2009-02-20 Thread joe1985
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 1137729 1137759 11377

[R] Use of ifelse for indicating specific rownumber

2009-02-19 Thread joe1985
Hello I have a dataset named "b2" with 1521 rows, in that dataset i have 64 rows containing specific information. the rownumbers with specific info are: + i [1] 22 53 104 127 151 196 235 238 249 250 263 335 344 353 362 370 389 422 458 459 473 492 502 530 561 624 64

[R] Making plot with "sub"-X values

2009-02-13 Thread joe1985
Hello I have a big dataset where i have pulled out some periods of time acording to a herd-number (see below): CHR_NR DATO_TEST SALMO_INDEX didiffdatoperiode 113772003-06-20 7.929 113772003-09-01 4.359 113772004-02-24 5

[R] extracting parts of words or extraxting letter to use in ifelse-func.

2009-02-13 Thread joe1985
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$sta

[R] Text in a character vector to indicate "ifelse" argument

2009-01-29 Thread joe1985
Hello I have a data set that looks like this; > b2 dato chr status PRRSvac PRRSsanVac PRRSsanDk PRRSdk 33 2007-12-03 090432Rød SPF 34 2007-02-09 090432 Rød SPF+sanDK 35 2002-12-17 090432

Re: [R] Getting data from a PDF-file into R

2009-01-26 Thread joe1985
Peter Dalgaard wrote: > > joe1985 wrote: >> 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-

[R] Getting data from a PDF-file into R

2009-01-26 Thread joe1985
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

[R] Bar plot between two different liniar models

2009-01-13 Thread joe1985
Hello I have a problem that i ant make a Bar plot like the one i have tried to illustrate below (made in paint); http://www.nabble.com/file/p21437080/LG5%2Bgraf%2Bredigeret.jpg http://www.nabble.com/file/p21437080/LG5%2Bgraf%2Bredigeret.JPG LG5+graf+redigeret.JPG Where each line represents a