That worked! Thanks for the explanation.
On Wed, Sep 18, 2019 at 10:06 AM Duncan Murdoch
wrote:
>
> On 18/09/2019 8:43 a.m., Huzefa Khalil wrote:
> > Hello R-users,
> >
> > I have been running a script which produces objects based on the
> > column names of a data.
Hello R-users,
I have been running a script which produces objects based on the
column names of a data.frame. The column names are of the form CB_1-1,
CB_1-2, etc. Now this calculation was rather long and memory
intensive, so I would rather not have to do it again after fixing the
column names usi
try:
vect[which(names(vect) != "foo")]
On Tue, Jul 31, 2018 at 1:41 PM, إبراهيم خطاب Ibrauheem Khat'taub
wrote:
> H
> i All,
>
> If I have this vector:
>
>> vect <- c(foo = 11, bar = 2, norf = 45)
>
> I can have a subset that has only "bar and "norf" this way:
>> vect[c("bar","norf")]
>
> Now ho
Hi Bogdan,
Does the following do what you expect?
x$intersectA[[i]] <- c(x$intersectA[[i]], x$labA[j])
Note the difference between `[[` and `[`
On Wed, Jul 25, 2018 at 9:26 AM, Bogdan Tanasa wrote:
> Dear Thierry and Juan, thank you for your help. Thank you very much.
>
> Now, if I would like
Instead of
Tsp = c(2016, 2018, 12)
try
Tsp = c(2016, 2018.25, 12)
Hence, you can specify the object as
structure(c(5973156.76, 5159011.2, 6695766.64, 6365359, 6495218.53,
7226302.39, 6835272.7, 7383501.57, 6962748.19, 7623278.72, 7274994.33,
7919421.8, 7360740.81, 7436693.35, 8545765.55, 73372
Dear Miluji,
If I understand correctly, this should get you what you need.
temp1 <-
structure(list(id = 101:115, current_location = structure(c(2L,
8L, 8L, 3L, 6L, 5L, 1L, 2L, 7L, 4L, 2L, 8L, 8L, 3L, 6L), .Label =
c("Austin",
"Boston", "Cambridge", "Durham", "Houston", "Lynn", "New Orleans",
"New
Hi Kevin,
There is probably a better way, but it can be done in two steps like this
temp <- list(A=data.frame(x=1:2, y=3:4),B=data.frame(x=5:6,y=7:8))
temp <- lapply(names(temp), function(n, temp) {
temp[[n]]$type <- n
return(temp[[n]])
}, temp = temp)
do.call(rbind, temp)
On Wed, May 2,
ttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Huzefa Khalil
PhD Candidate,
Department of Political Science,
University of Michigan
_
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Hi James,
If you want to specify the y-values, you need to use stat="identity" as below:
ggplot(probability, aes(x=Fertilizer, y=prob)) +
geom_bar(stat="identity", aes(fill=Treatment))
best,
huzefa
On Tue, Apr 12, 2016 at 1:02 PM, James Henson wrote:
> Dear R Community,
>
> Below is a problem
If you want the object names, you should use lapply over the names:
lapply(names(c), function(x) {c[[x]]})
On Thu, Feb 25, 2016 at 5:25 PM, Uwe Ligges wrote:
>
>
> On 25.02.2016 22:27, Mohammad Tanvir Ahamed via R-help wrote:
>
>> Hello,
>>
>> I want to get object name of a list inside lapply
>
This is because of the presence of NA's in your "station_RT" column. If you
use which(), it will give you the correct result:
station_list <- df[which(df$station_RT==142), ]
best,
huzefa
On Mon, Feb 15, 2016 at 11:39 AM, Stefano Sofia <
stefano.so...@regione.marche.it> wrote:
> Dear R list user
Try
a["2016-01-18 15:31:54.079"]
The question though is why R displays the milliseconds as "078", when
it is clearly "079"...
-h
On Mon, Jan 18, 2016 at 8:55 PM, ce wrote:
> Dear all,
>
> I have this code :
>
> library(xts)
> a <- structure(c(1,2), class = c("xts", "zoo"), .indexCLASS = c("P
0"]
> value
> 2016-01-18 15:31:54 2
>
>> a["2016-01-18 15:31:54.07"]
> value
>
>> a["2016-01-18 15:31:54.079"]
> value
> 2016-01-18 15:31:54 2
>
>
> why it doesn't work with
14 matches
Mail list logo