how to convert from a character vector to a number?
2 posts
• Page 1 of 1
how to convert from a character vector to a number?
e.g., say I have:
how do I get to:
- Code: Select all
]display '12' '2.7' '721324'
┌→────────────────────┐
│ ┌→─┐ ┌→──┐ ┌→─────┐ │
│ │12│ │2.7│ │721324│ │
│ └──┘ └───┘ └──────┘ │
└∊────────────────────┘
how do I get to:
- Code: Select all
]display 12 2.7 721324
┌→────────────┐
│12 2.7 721324│
└~────────────┘
- AntonioDiNarzo
- Posts: 6
- Joined: Mon Oct 23, 2017 3:14 pm
Re: how to convert from a character vector to a number?
See the primitive "execute" : ⍎
And also see the system function ⎕VFI
For a vector of vectors as you show, you will need to use these functions with the each operator: ¨
Alternatively you can laminate the data together in a single, blank delimited string and avoid the each operator.
And also see the system function ⎕VFI
For a vector of vectors as you show, you will need to use these functions with the each operator: ¨
Alternatively you can laminate the data together in a single, blank delimited string and avoid the each operator.
- paulmansour
- Posts: 420
- Joined: Fri Oct 03, 2008 4:14 pm
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group