Displaying 20 results from an estimated 3000 matches similar to: "Adding a value to one dataframe from another dataframe"
2004 Dec 17
1
reshape and split
Dear R-users,
I am trying to reshape the DF "dat2" in the "long" format,
but can't figure out how to use the "split"-option:
> dat2
a.1995.z b.1995.z a.1996.z var
1 100.00000 100.00000 100.00000 Neue Anlagen insgesamt
2 40.09904 23.60890 40.88960 Neue Ausr??stungen
3 59.90096 76.39110 59.11040 Neue Bauten
This
2009 Jul 28
1
driver for IVT SCD solar controller ?
hi,
I'm using the SCD-20 solar controller from IVT Gmbh in combination with a
230Ah battery and a photovoltaic panel to power a small server based on an
Intel ATOM N270 CPU.
the controller is (will be) connected to the server via RS232 (1200 8n1)
and works like this:
- if the battery voltage drops below 12V, a warning LED is switched on
- if the battery voltage drops below 10.5V, the load
2005 Oct 23
6
configuring DNS
Hello
I have DSL 2000 (2048 kbit/s download and 256 kbit/s upload)
I have ping to fast sites very high:
64 bytes from w2.rc.vip.scd.yahoo.com (66.94.234.13): icmp_seq=3 ttl=50 time=2185 ms
64 bytes from w2.rc.vip.scd.yahoo.com (66.94.234.13): icmp_seq=4 ttl=50 time=1983 ms
64 bytes from w2.rc.vip.scd.yahoo.com (66.94.234.13): icmp_seq=5 ttl=50 time=1826 ms
and I know why. I have 2 interfaces:
2009 Sep 06
1
IVT SCD support status
Rainer, Arjen
I was wandering around the code, and found that few things are missing
around the IVT code:
- no manpage,
- no entry in driver.list
- no device{mfr,model,type} in the code.
I was about to submit a patch to address the above (ready to commit), but
wanted first to get an update on the status. looking at the last thread,
it's a bit unclear... I'm also interested an upsc
2012 Jun 07
3
conditional statement to replace values in dataframe with NA
Hello and thanks for helping.
#some data
L3 <- LETTERS[1:3]
dat1 <- data.frame(cbind(x=1, y=rep(1:3,2), fac=sample(L3, 6, replace=TRUE)))
#When x==1 and y==1 I want to replace the 1 values with NA
#I can select the rows I want:
dat2<-subset(dat1,x==1 & y==1)
#replace the 1 with NA
dat2$x<-rep(NA,nrow(dat2)
dat2$y<-rep(NA,nrow(dat2)
#select the other rows and rbind
2007 Aug 13
2
Policy routing question
Hi,
I have a testing multihome setup, with the default gateway being one of
the links and using policy routing to honor requests for a specific
link. Everything works as expected when I request a specific IP to bind
to. But if I request a specific interface things fall apart in ways that
I can not explain:
default gw (WORKS)
----------
rabbit@Thesaurus:~$ ping -c 1 yahoo.com
PING yahoo.com
2008 May 11
1
Finding unmatched data between two dataframe using several factors
Hi R users
I am trying to find unmatched data from two dataframes. I would like to
find unmatched data based on several factors. For the following data:
dat1 <- data.frame(x = paste("A", 1:6, sep=""),
y = c("andy","bob","ciaran","dan", "eion",
"fred"))
dat1
dat2
2012 Jul 01
2
list to dataframe conversion-testing for identical
HI R help,
I was trying to get identical data frame from a list using two methods.
#Suppose my list is:
listdat1<-list(rnorm(10,20),rep(LETTERS[1:2],5),rep(1:5,2))
#Creating dataframe using cbind
dat1<-data.frame(do.call("cbind",listdat1))
colnames(dat1)<-c("Var1","Var2","Var3")
#Second dataframe conversion
2012 Aug 06
2
deleting columns from a dataframe where NA is more than 15 percent of the column length
I have a dataframe of 10 different columns (length of each column is
the same). I want to eliminate any column that has 'NA' greater than
15% of the column length. Do i first need to make a function for
calculating the percentage of NA for each column and then make another
dataframe where i apply the function? Whats the best way to do this.
2012 Oct 19
4
Creating a new by variable in a dataframe
Hello,
I have a dataframe w/ 3 variables of interest: transaction,date(tdate) &
time(event_tim).
How could I create a 4th variable (last_trans) that would flag the last
transaction of the day for each day?
In SAS I use:
proc sort data=all6;
by tdate event_tim;
run;
/*Create last transaction flag per day*/
data all6;
set all6;
by tdate event_tim;
last_trans=last.tdate;
Thanks
2013 Sep 02
1
R dataframe and looping help
HI,
You may try this:
dat1<- read.table(text="
CustID TripDate Store Bread Butter Milk Eggs
1 2-Jan-12 a 2 0 2 1
1 6-Jan-12 c 0 3 3 0
1 9-Jan-12 a 3 3 0 0
1 31-Mar-13 a 3 0 0 0
2 31-Aug-12 a 0 3 3 0
2 24-Sep-12 a 3 3 0 0
2 25-Sep-12 b 3 0 0 0
",sep="",header=TRUE,stringsAsFactors=FALSE)
dat2<- dat1[,-c(1:3)]
res<- lapply(seq_len(ncol(dat2)),function(i)
2004 Apr 25
2
Yahoo bug in tseries::get.hist.quote and its::priceIts
Both get.hist.quote, and its derivative priceIts, rely on download.file() to
fetch financial data series from Yahoo! in .csv format. They allow for nice
interactive demonstrations of what one can do with R.
Unfortunately, both are currently broken as Yahoo! decided to add a somewhat
useless html comment at the end of the csv 'stream', breaking the regular
format of n rows with k columns.
2006 May 11
1
Yahoo Container Library
Just a note that Yahoo came out with some more widgets Check out
http://com1.devnet.scd.yahoo.com/yui/container/index.html.
Maybe we can adopt some of their ideas.
* I like the Module library and its subclasses
* you can do unobtrusive html and use this when you instantiate the
javascript objects
dom
_______________________________________________
Rails-spinoffs mailing list
2012 Nov 17
3
Reshaping a dataframe
Seems like this should be easy but I'm struggling a bit. How do I rearrange a
data frame to go from the first one to the second shown below ?
State Date lbs
TX 200701 400
TX 200702 650
TX 200703 950
TX 200704 1000
FL 200701 200
FL 200702 300
FL 200703 500
FL 200704 333
NJ 200701 409
NJ 200702 308
NJ 200703 300
NJ 200704 800
Date TX FL NJ
200701 400 200 409
200702 650
2002 Sep 18
2
Use of Apply to Change Values in Dataframe
I have a question about how apply() works for changing data values. I am
using it to change NA values to zero, but the question applies to other
value changing operations as well. If I have a dataframe "Dat" with columns
"a", "b" and "c" and there are some NA values in every column:
If I do:
Dat$a[is.na(Dat$a)] <- 0
then all the NA values are changed
2013 Apr 29
1
how to add new rows in a dataframe?
Hi,
dat1<- read.table(text="
id??????????????? t???????????????????? scores
2???????????????? 0??????????????????????? 1.2
2???????????????? 2???????????????????????? 2.3
2???????????????? 3??????????????????????? 3.6
2???????????????? 4??????????????????????? 5.6
2???????????????? 6??????????????????????? 7.8
3???????????????? 0??????????????????????? 1.6
3????????????????
2012 Jul 14
2
Arrange two columns into a five variable dataframe
Hi,
I hope that folks can give me some simple approaches to taking the data set
below, which is accumulated in two columns called "long" and "group", then
arrange the data is the "long" column into a data frame containing five
variables: "Group 1", "Group 2", "Group 3", "Group 4", and "Group 5". I am
hoping for a few
2012 Jul 25
5
How to filter datetime from a dataframe
I have one month data in a dataframe..
I need to filter data based on start date and end date
Ex: Start date :- 01/Jul/2012 and End date :- 10/Jul/2012
Please help me to find the solution
--
View this message in context: http://r.789695.n4.nabble.com/How-to-filter-datetime-from-a-dataframe-tp4637721.html
Sent from the R help mailing list archive at Nabble.com.
2012 Dec 17
3
Merge more than 2 dataframe
Hello.
I have for example 4 or more dataframe which like such this example:
date value
2006-11 0.4577647
2006-12 NaN
2006-10 0.1577647
2006-11 0.3577647
2006-12 NaN
2007-01 NaN
2007-02 NaN
2007-03 0.2956429
2007-01 0.3677647
2007-02 NaN
They have the same length. I need merge by date undefined number of
dataframes. End result output will look like
2013 Mar 27
9
conditional Dataframe filling
Hi everyone:
This may be trivial but I just have not been able to figure it out.
Imagine the following dataframe:
a b c d
TRUE TRUE TRUE TRUE
FALSE FALSE FALSE TRUE
FALSE TRUE FALSE FALSE
I would like to create a new dataframe, in which TRUE gets 0 but if
false then add 1 to the cell to the left. So the results for the
example above should be something like:
a b c