a simple question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

a simple question

Yuan Chun Ding
Hi R users,

in a Shiny test code, choices = list(1, 2, 3),  it generates three components in the choice list, my code works fine and generated tables and plots I want.

now I want to modify to  choices = list (1, 2, 3, ...., 5211).   list (seq(1, 5211,1) does not work, it generates one component (1, 2, 3, ....5211) in the choice list, not 5211-component list.

Can you help me?

Thank you,

Ding

----------------------------------------------------------------------
------------------------------------------------------------
-SECURITY/CONFIDENTIALITY WARNING-  

This message and any attachments are intended solely for the individual or entity to which they are addressed. This communication may contain information that is privileged, confidential, or exempt from disclosure under applicable law (e.g., personal health information, research data, financial information). Because this e-mail has been sent without encryption, individuals other than the intended recipient may be able to view the information, forward it to others or tamper with the information without the knowledge or consent of the sender. If you are not the intended recipient, or the employee or person responsible for delivering the message to the intended recipient, any dissemination, distribution or copying of the communication is strictly prohibited. If you received the communication in error, please notify the sender immediately by replying to this message and deleting the message and any accompanying files from your system. If, due to the security risks, you do not wish to rec
 eive further communications via e-mail, please reply to this message and inform the sender that you do not wish to receive further e-mail from the sender. (LCP301)
------------------------------------------------------------

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: a simple question

Rolf Turner

On 2/01/20 12:16 pm, Yuan Chun Ding wrote:

> Hi R users,
>
> in a Shiny test code, choices = list(1, 2, 3),  it generates three
> components in the choice list, my code works fine and generated
> tables and plots I want.
>
> now I want to modify to  choices = list (1, 2, 3, ...., 5211).   list
> (seq(1, 5211,1) does not work, it generates one component (1, 2, 3,
> ....5211) in the choice list, not 5211-component list.
>
> Can you help me?

I don't use/have no idea about Shiny, so this may be a case of the blind
leading the partially sighted, but perhaps you want

   choices = as.list(seq(1,5211,1))

cheers,

Rolf Turner


--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: a simple question

Yuan Chun Ding
Hi Rolf,

Yes,

choices = as.list(seq(1,5211,1))

is what I want.

Thank you so much,

Ding
________________________________________
From: Rolf Turner [[hidden email]]
Sent: Wednesday, January 1, 2020 3:29 PM
To: Yuan Chun Ding; [hidden email]
Subject: Re: [R] a simple question

[Attention: This email came from an external source. Do not open attachments or click on links from unknown senders or unexpected emails.]

----------------------------------------------------------------------

On 2/01/20 12:16 pm, Yuan Chun Ding wrote:

> Hi R users,
>
> in a Shiny test code, choices = list(1, 2, 3),  it generates three
> components in the choice list, my code works fine and generated
> tables and plots I want.
>
> now I want to modify to  choices = list (1, 2, 3, ...., 5211).   list
> (seq(1, 5211,1) does not work, it generates one component (1, 2, 3,
> ....5211) in the choice list, not 5211-component list.
>
> Can you help me?

I don't use/have no idea about Shiny, so this may be a case of the blind
leading the partially sighted, but perhaps you want

   choices = as.list(seq(1,5211,1))

cheers,

Rolf Turner


--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

----------------------------------------------------------------------
------------------------------------------------------------
-SECURITY/CONFIDENTIALITY WARNING-  

This message and any attachments are intended solely for the individual or entity to which they are addressed. This communication may contain information that is privileged, confidential, or exempt from disclosure under applicable law (e.g., personal health information, research data, financial information). Because this e-mail has been sent without encryption, individuals other than the intended recipient may be able to view the information, forward it to others or tamper with the information without the knowledge or consent of the sender. If you are not the intended recipient, or the employee or person responsible for delivering the message to the intended recipient, any dissemination, distribution or copying of the communication is strictly prohibited. If you received the communication in error, please notify the sender immediately by replying to this message and deleting the message and any accompanying files from your system. If, due to the security risks, you do not wish to receive further communications via e-mail, please reply to this message and inform the sender that you do not wish to receive further e-mail from the sender. (LCP301)

______________________________________________
[hidden email] 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.