Hi Everyone,

Sorry for coming back again with a new problem.
Editing question, session info and data so you don't have to scroll till
the end of page.

*Situation :*

I have a data frame and it's name is df. Now I want to add Time Stamp to
the end of *"name" of "data Frame" i.e. "df_system_time"*. Previously it
was running great and thanks to Dr. Winsemius , Kimmo and Pascal and I
believe as the function which i used was scalar.

*Data :*

dput(df)structure(list(x = 1:10, y = 1:10), .Names = c("x", "y"),
row.names = c(NA,
-10L), class = "data.frame")

*Session Info :*

R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods
[7] base

other attached packages:
[1] rcom_2.2-5     rscproxy_2.0-5

loaded via a namespace (and not attached):
 [1] colorspace_1.1-1   dichromat_1.2-4    digest_0.5.2
 [4] ggplot2_0.9.2.1    grid_2.15.1        gtable_0.1.1
 [7] labeling_0.1       MASS_7.3-18        memoise_0.1
[10] munsell_0.3        plyr_1.7.1         proto_0.3-9.2
[13] RColorBrewer_1.0-5 reshape2_1.2.1     scales_0.2.2
[16] stringr_0.6.1      tools_2.15.1


It's kind of very easy in SQL but I love doing all the work in R so don't
want to leave for just changing the name.

Best Regards,

Bhupendrasinh Thakre








Best Regards,


Bhupendrasinh Thakre

*Disclaimer :*

The information contained in this communication is confidential and may be
legally privileged. It is intended solely for the use of the individual or
entity to whom it is adressed. If you are not the intended recipient you
are hereby (a) notified that any disclosure, copying, distribution or
taking any action with respect to the content of this information is
strictly prohibited and may be unlawful, and (b) kindly requested to inform
the sender immediately and destroy any copies.



On Fri, Sep 28, 2012 at 10:13 AM, Bhupendrasinh Thakre <
vickytha...@gmail.com> wrote:

> Many thanks Dr. Winsemius , Kimmo and Pascal....
> All of them are working and really beautiful...
>
> Best Regards,
>
>
> Bhupendrasinh Thakre
>
> *Disclaimer :*
>
> The information contained in this communication is confidential and may be
> legally privileged. It is intended solely for the use of the individual or
> entity to whom it is adressed. If you are not the intended recipient you
> are hereby (a) notified that any disclosure, copying, distribution or
> taking any action with respect to the content of this information is
> strictly prohibited and may be unlawful, and (b) kindly requested to inform
> the sender immediately and destroy any copies.
>
>
>
> On Fri, Sep 28, 2012 at 1:36 AM, David Winsemius 
> <dwinsem...@comcast.net>wrote:
>
>>
>> On Sep 27, 2012, at 11:13 PM, Bhupendrasinh Thakre wrote:
>>
>> >
>> > Hi Everyone,
>> >
>> > I am trying a very simple task to append the Timestamp with a variable
>> name so something like
>> > a_2012_09_27_00_12_30 <- rnorm(1,2,1).
>>
>> If you want to assign a value to a character-name you need to use ...
>> `assign`. You cannot just stick a numeric value which is what you get with
>> sys.Time() on the LHS of a "<-" and expect R to intuit what you intend.
>>
>> ?assign
>> assign( "a_2012_09_27_00_12_30" ,  rnorm(1,2,1) )
>> assign( as.character(unclass(Sys.time())) ,  rnorm(1,2,1) )
>>
>> (I would have thought you wanted to format that sys.Time result:)
>>
>> > format(Sys.time(), "%Y_%m_%d_%H_%M_%S")
>> [1] "2012_09_27_23_32_40"
>>
>> >  assign(format(Sys.time(), "%Y_%m_%d_%H_%M_%S"),  rnorm(1,2,1) )
>> > grep("^2012", ls(), value=TRUE)
>> [1] "2012_09_27_23_33_45"
>>
>>
>> >
>> > Tried some commands but it doesn't work out well. Hope someone has some
>> answer on it.
>> >
>> > Session Info
>> >
>> > R version 2.15.1 (2012-06-22)
>> > Platform: i386-apple-darwin9.8.0/i386 (32-bit)
>> >
>> > locale:
>> > [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>> >
>> > attached base packages:
>> > [1] stats     graphics  grDevices utils     datasets  methods   base
>> >
>> > other attached packages:
>> > [1] chron_2.3-42    twitteR_0.99.19 rjson_0.2.9     RCurl_1.91-1
>>  bitops_1.0-4.1  tm_0.5-7.1      RMySQL_0.9-3    DBI_0.2-5
>> >
>> > loaded via a namespace (and not attached):
>> > [1] slam_0.1-24  tools_2.15.1
>> >
>> > Statement I tried :
>> >
>> > b <- unclass(Sys.time())
>> > b = 1348812597
>> > c_b <- rnorm(1,2,1)
>> >
>> > Works perfect but doesn't show me c_1348812597.
>> >
>> > Best Regards,
>> >
>> >
>> > Bhupendrasinh Thakre
>> >       [[alternative HTML version deleted]]
>>
>> BT; Please learn to post in plain text. It's really very simple with
>> gmail.
>>
>> --
>>
>> David Winsemius, MD
>> Alameda, CA, USA
>>
>>
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to