答案 0 :(得分:4)
编辑以在评论中显示来自@jenesaisquoi的帮助
您可以使用CSS选择要隐藏的特定值框,并将其可见性设置为“隐藏”。我对CSS很糟糕,所以这非常难看,但从技术上来说它回答了你的问题:
ui = shinyUI(
fluidPage(
tags$head(tags$style(HTML('.irs-from, .irs-to, .irs-min, .irs-max {
visibility: hidden !important;
}'))),
sliderInput("test", "slider", 0,12, value = c(0,12))))
server = shinyServer(function(input, output){
})
runApp(list(ui=ui, server=server))
我主要发布此信息是希望有人能纠正我。
答案 1 :(得分:1)
要隐藏当前滑块值,请添加var firstString = "hello world";
var secondString = "FOLLOW me";
var firstChars = [];
var secondChars = [];
var arrLength = 122;
// 0 - 122 covers ASCII values for all chars a-z (lowers), A-Z (uppers), numbers, and empty spaces.
//initialize array to arrLength number of elements, all set to 0.
for (var i = 0; i < arrLength; i++)
{
firstChars.push(0);
secondChars.push(0);
}
//count first word chars
for (var i = 0; i < firstString.length; i++)
firstChars[firstString.charCodeAt(i)]++;
//count second word chars
for (var i = 0; i < secondString.length; i++)
secondChars[secondString.charCodeAt(i)]++;
//output matching chars and the count of occurences.
for (var i = 0; i < arrLength; i++)
{
if (firstChars[i] > 0 && secondChars[i] > 0)
{
var letter = i == 32? "Empty Space" : String.fromCharCode(i);
var count = firstChars[i] + secondChars[i];
console.log(letter + " : " + count);
}
}
。
.irs-single