是否有一种(简便)方法将平面列联表(灵活)转换为可伸缩表

时间:2018-10-05 08:20:13

标签: r flextable contingency

我曾经根据旧的包reporteRs和rtable从“扁平”列联表(ftable,stats-package)创建FlexTable对象。在这些软件包过时并从CRAN中删除之前,有一个功能 as.Flextable.ftable 可以解决问题。

->参见:https://rdrr.io/cran/rtable/man/as.FlexTable.ftable.html

有没有办法为新的flextable包实现这种转换?我还找不到类似的功能。

1 个答案:

答案 0 :(得分:0)

一个很好的问题。迁移已开始但尚未完成。在下面应立即执行此操作的代码下面:

   return (
      <View style={{width:'100%',height:'100%'}}>
        <Card style={{position:'absolute',bottom:0,height:100,width:'100%',marginBottom:0,marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0}}>
          <CardItem style={{height:100,width:'100%',paddingLeft:0,paddingRight:0}}>
          <TouchableOpacity style={{height:100,width:'100%'}} onPress={()=>this.aba()}>
              <Text style={{position:'absolute',top:0,right:0,marginTop:10,marginRight:10,fontSize:18}}>مبلغ کل</Text>
              <Text style={{position:'absolute',top:0,left:0,marginTop:10,marginLeft:10,fontSize:18,color:'#7fbe41'}}>۱۰۰۰ تومان</Text>


              <View style={{bottom:0,position:'absolute',width:'100%',padding:10}}>
                <Button   success style={{alignSelf:'center',width:'100%',justifyContent:'center',}}>
                  <Text   style={{textAlign:'center',color:'#fff',fontSize:18,zIndex:10,width:'100%',height:'100%'}}>ادامه</Text>
                </Button>
              </View>
          </TouchableOpacity>
          </CardItem>
        </Card>
        <ScrollView>
          <Card style={{marginTop:10,marginRight:10,marginLeft:10,height:100,}}>
            <CardItem style={{width:'100%',height:'100%',paddingTop:0,paddingBottom:0}}>
              <Image resizeMode='stretch' style={{width:80,height:80,position:'absolute',right:0,top:0,marginRight:10,marginTop:10}} source={{uri: 'https://javacupcake.com/wp-content/uploads/2017/07/IceCreamConeCupcakes_0307.jpg'}} />
              <Text style={{position:'absolute',top:0,right:0,marginTop:14,marginRight:100,fontWeight:'bold',fontSize:18}}>صندلی</Text>
              <Text style={{position:'absolute',bottom:0,right:0,marginBottom:20,marginRight:100,fontWeight:'bold',color:"#ddd"}}>فروشگاه راد آراد</Text>

              <View style={{width:40,position:'absolute',left:0,height:'100%'}}>
                <View style={{height:'50%',width:'100%',backgroundColor:'#fa767b',alignItems:'center',justifyContent:'center'}}>
                  <Icon  name="close" type="EvilIcons" style={{color:'#fff',alignSelf:'center',fontSize:20,paddingLeft:6}}/>
                </View>
                <View style={{height:'50%',width:'100%',backgroundColor:'#f5f5f5',flexDirection:'column',justifyContent:'center',alignItems:'center'}}>
                  <Text>۱</Text>
                  <Text>عدد</Text>
                </View>


              </View>

                <Text style={{position:'absolute',left:0,top:0,marginTop:20,marginLeft:50,color:'#7fbe41'}}>۳۰۰.۰۰۰.۰۰۰ تومان</Text>
                <Text style={{textDecorationLine: 'line-through',position:'absolute',left:0,top:0,marginTop:40,marginLeft:50,color:'#fa767b'}}>۳۰۰.۰۰۰.۰۰۰ تومان</Text>

            </CardItem>
          </Card>


        </ScrollView>
      </View>
    );